diff --git a/apps/mobile/ios/Podfile.lock b/apps/mobile/ios/Podfile.lock index fbee23343..618696f8d 100644 --- a/apps/mobile/ios/Podfile.lock +++ b/apps/mobile/ios/Podfile.lock @@ -1997,7 +1997,7 @@ SPEC CHECKSUMS: SDWebImageSVGCoder: 15a300a97ec1c8ac958f009c02220ac0402e936c SDWebImageWebPCoder: e38c0a70396191361d60c092933e22c20d5b1380 SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d - Yoga: 348f8b538c3ed4423eb58a8e5730feec50bce372 + Yoga: b9a182ab00cf25926e7f79657d08c5d23c2d03b0 PODFILE CHECKSUM: 1183a5e3969c957f2df7140e9b85ba46d355b320 diff --git a/apps/mobile/package.json b/apps/mobile/package.json index 2207b6668..7058bf614 100644 --- a/apps/mobile/package.json +++ b/apps/mobile/package.json @@ -69,6 +69,7 @@ "buffer": "6.0.3", "dayjs": "1.11.13", "expo": "51.0.26", + "expo-application": "~5.9.1", "expo-asset": "10.0.6", "expo-blur": "13.0.2", "expo-clipboard": "6.0.3", diff --git a/apps/mobile/src/app/(home)/_layout.tsx b/apps/mobile/src/app/(home)/_layout.tsx index 63cbc17a2..45c30ed69 100644 --- a/apps/mobile/src/app/(home)/_layout.tsx +++ b/apps/mobile/src/app/(home)/_layout.tsx @@ -2,12 +2,9 @@ import { RefObject, createContext } from 'react'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { ActionBarMethods } from '@/components/action-bar'; -import { AccountsHeader } from '@/components/headers/account'; import { BackButtonHeader } from '@/components/headers/back-button'; -import { BlurredHeader } from '@/components/headers/containers/blurred-header'; import { SimpleHeader } from '@/components/headers/containers/simple-header'; import { LeatherLogoHeader } from '@/components/headers/leather-logo'; -import { MenuHeader } from '@/components/headers/menu'; import { OptionsHeader } from '@/components/headers/options'; import { TitleHeader } from '@/components/headers/title'; import { t } from '@lingui/macro'; @@ -26,14 +23,14 @@ export default function StackLayout() { const insets = useSafeAreaInsets(); const router = useRouter(); - const NavigationHeader = ( - router.back()} />} - center={} - right={} - /> - ); + // const NavigationHeader = ( + // router.back()} />} + // center={} + // right={} + // /> + // ); const NavigationHeaderHome = ( } right={} /> @@ -94,11 +91,12 @@ export default function StackLayout() { return ( - + {/* TODO: Can these be removed, or they should go after index route? */} + {/* NavigationHeader }} /> NavigationHeader }} /> NavigationHeader }} /> - + */} NavigationHeaderHome }} /> NavigationBackSimple }} /> NavigationBackSimple }} /> diff --git a/apps/mobile/src/app/(home)/settings/display/display-cell.tsx b/apps/mobile/src/app/(home)/settings/display/display-cell.tsx index 81f7bc169..5332e82ec 100644 --- a/apps/mobile/src/app/(home)/settings/display/display-cell.tsx +++ b/apps/mobile/src/app/(home)/settings/display/display-cell.tsx @@ -1,12 +1,7 @@ import { ReactNode } from 'react'; +import { Pressable } from 'react-native'; -import { - Avatar, - ChevronRightIcon, - Flag, - ItemLayout, - TouchableOpacity, -} from '@leather.io/ui/native'; +import { Avatar, ChevronRightIcon, Flag, ItemLayout } from '@leather.io/ui/native'; interface DisplayCellProps { caption: string; @@ -16,7 +11,7 @@ interface DisplayCellProps { } export function DisplayCell({ caption, icon, onCreateSheetRef, title }: DisplayCellProps) { return ( - + {icon}}> } @@ -24,6 +19,6 @@ export function DisplayCell({ caption, icon, onCreateSheetRef, title }: DisplayC titleLeft={title} /> - + ); } diff --git a/apps/mobile/src/app/(home)/settings/help/help-cell.tsx b/apps/mobile/src/app/(home)/settings/help/help-cell.tsx new file mode 100644 index 000000000..c6f83a851 --- /dev/null +++ b/apps/mobile/src/app/(home)/settings/help/help-cell.tsx @@ -0,0 +1,24 @@ +import { ReactNode } from 'react'; +import { Pressable } from 'react-native'; + +import { Avatar, ChevronRightIcon, Flag, ItemLayout } from '@leather.io/ui/native'; + +interface DisplayCellProps { + caption: string; + icon: ReactNode; + onPress(): void; + title: string; +} +export function HelpCell({ caption, icon, onPress, title }: DisplayCellProps) { + return ( + + {icon}}> + } + captionLeft={caption} + titleLeft={title} + /> + + + ); +} diff --git a/apps/mobile/src/app/(home)/settings/help/index.tsx b/apps/mobile/src/app/(home)/settings/help/index.tsx index e4044bd6b..ca9824313 100644 --- a/apps/mobile/src/app/(home)/settings/help/index.tsx +++ b/apps/mobile/src/app/(home)/settings/help/index.tsx @@ -4,14 +4,9 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { t } from '@lingui/macro'; import { useTheme } from '@shopify/restyle'; -import { - Box, - Cell, - GraduateCapIcon, - MagicBookIcon, - SupportIcon, - Theme, -} from '@leather.io/ui/native'; +import { Box, GraduateCapIcon, MagicBookIcon, SupportIcon, Theme } from '@leather.io/ui/native'; + +import { HelpCell } from './help-cell'; export default function SettingsHelpScreen() { const { bottom } = useSafeAreaInsets(); @@ -27,17 +22,22 @@ export default function SettingsHelpScreen() { gap: theme.spacing[5], }} > - } + onPress={() => {}} + /> + } onPress={() => {}} /> - {}} /> - } onPress={() => {}} /> diff --git a/apps/mobile/src/app/(home)/settings/index.tsx b/apps/mobile/src/app/(home)/settings/index.tsx index b5f51453a..5e50c46f8 100644 --- a/apps/mobile/src/app/(home)/settings/index.tsx +++ b/apps/mobile/src/app/(home)/settings/index.tsx @@ -1,10 +1,11 @@ -import { ScrollView } from 'react-native-gesture-handler'; +import { ScrollView } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { Divider } from '@/components/divider'; import { AppRoutes } from '@/routes'; import { t } from '@lingui/macro'; import { useTheme } from '@shopify/restyle'; +import * as Application from 'expo-application'; import { useRouter } from 'expo-router'; import { @@ -12,97 +13,91 @@ import { BellIcon, Box, Button, - Cell, GlobeTiltedIcon, - SettingsSliderThreeIcon, + SettingsGearIcon, ShieldIcon, - SunIcon, + SquareLinesBottomIcon, SupportIcon, Text, Theme, + UsersTwoIcon, WalletIcon, } from '@leather.io/ui/native'; +import { SettingsCell } from './settings-cell'; + export default function SettingsScreen() { const { bottom } = useSafeAreaInsets(); const theme = useTheme(); const router = useRouter(); return ( - - - { - router.navigate(AppRoutes.SettingsWallet); - }} - /> + + + + } + onPress={() => router.navigate(AppRoutes.SettingsWallet)} + /> + - { - router.navigate(AppRoutes.SettingsDisplay); - }} - /> - { - router.navigate(AppRoutes.SettingsSecurity); - }} - /> - { - router.navigate(AppRoutes.SettingsNetworks); - }} - /> - { - router.navigate(AppRoutes.SettingsNotifications); - }} - /> - { - router.navigate(AppRoutes.SettingsHelp); + + } + onPress={() => router.navigate(AppRoutes.SettingsDisplay)} + /> + } + onPress={() => router.navigate(AppRoutes.SettingsSecurity)} + /> + } + onPress={() => router.navigate(AppRoutes.SettingsNetworks)} + /> + } + onPress={() => router.navigate(AppRoutes.SettingsNotifications)} + /> + } + onPress={() => router.navigate(AppRoutes.SettingsHelp)} + /> + + } onPress={() => {}} /> + } onPress={() => {}} /> + + } + /> + + + - - - - - } - /> - {/* TODO: Replace with shared Footer */} - - + > {t`Version`} - 0.0 + {process.env.NODE_ENV === 'development' + ? Application.nativeBuildVersion + : Application.nativeApplicationVersion}