From a229b90a403c3f2bc62fdad79cf54c1a9c81eacf Mon Sep 17 00:00:00 2001 From: desperado1802 Date: Fri, 24 Nov 2023 12:05:29 +0200 Subject: [PATCH] fixed code filed for iOS devices, and reduced card options dropdown height --- apps/mobile/app/components/CodeField.tsx | 8 ++++++-- .../Authenticated/TeamScreen/components/ListCardItem.tsx | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/mobile/app/components/CodeField.tsx b/apps/mobile/app/components/CodeField.tsx index f6a8bb23c..d67f9b811 100644 --- a/apps/mobile/app/components/CodeField.tsx +++ b/apps/mobile/app/components/CodeField.tsx @@ -1,7 +1,7 @@ /* eslint-disable react-native/no-inline-styles */ /* eslint-disable react-native/no-color-literals */ import React, { FC, useEffect, useState } from 'react'; -import { View, StyleSheet, Text } from 'react-native'; +import { View, StyleSheet, Text, Dimensions, PixelRatio, Platform } from 'react-native'; import { colors, typography, useAppTheme } from '../theme'; import { CodeField, Cursor, useBlurOnFulfill, useClearByFocusCell } from 'react-native-confirmation-code-field'; @@ -12,6 +12,9 @@ interface ICodeField { defaultValue?: string; } +const { height: screeHeight } = Dimensions.get('screen'); +const screenDimension = PixelRatio.get(); + export const CodeInputField: FC = (props) => { const { onChange, editable, length = 6 } = props; const { colors } = useAppTheme(); @@ -54,7 +57,8 @@ export const CodeInputField: FC = (props) => { flexDirection: 'column', justifyContent: 'center', alignItems: 'center', - lineHeight: 52 + lineHeight: + Platform.OS === 'ios' ? screeHeight * 0.055 * (screenDimension / 3) : undefined } ]} onLayout={getCellOnLayoutHandler(index)} diff --git a/apps/mobile/app/screens/Authenticated/TeamScreen/components/ListCardItem.tsx b/apps/mobile/app/screens/Authenticated/TeamScreen/components/ListCardItem.tsx index 74a11c19d..d2a526455 100644 --- a/apps/mobile/app/screens/Authenticated/TeamScreen/components/ListCardItem.tsx +++ b/apps/mobile/app/screens/Authenticated/TeamScreen/components/ListCardItem.tsx @@ -201,7 +201,7 @@ const ListCardItem: React.FC = observer((props) => { ...(props.index !== props.openMenuIndex ? { display: 'none' } : {}) }} > - + {(memberInfo.isAuthTeamManager || memberInfo.isAuthUser) && taskEdition.task && (