Skip to content

Commit

Permalink
fixup! feat(suite-native): uninitialized device landing screen
Browse files Browse the repository at this point in the history
  • Loading branch information
PeKne committed Feb 3, 2025
1 parent 6cb12b4 commit 68cc994
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 42 deletions.
73 changes: 35 additions & 38 deletions suite-native/app/src/navigation/RootStackNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,7 @@ export const RootStackNavigator = () => {
initialRouteName={getInitialRouteName()}
screenOptions={stackNavigationOptionsConfig}
>
<RootStack.Screen
name={RootStackRoutes.OnboardingStack}
component={OnboardingStackNavigator}
/>
<RootStack.Screen name={RootStackRoutes.AppTabs} component={AppTabNavigator} />
<RootStack.Screen
name={RootStackRoutes.AccountsImport}
component={AccountsImportStackNavigator}
options={{ animation: 'slide_from_bottom' }}
/>
<RootStack.Screen
options={{ title: RootStackRoutes.AccountSettings }}
name={RootStackRoutes.AccountSettings}
Expand All @@ -83,41 +74,47 @@ export const RootStackNavigator = () => {
name={RootStackRoutes.DevUtilsStack}
component={DevUtilsStackNavigator}
/>
<RootStack.Screen
name={RootStackRoutes.AddCoinAccountStack}
component={AddCoinAccountStackNavigator}
options={{ animation: 'slide_from_bottom' }}
/>
<RootStack.Screen
name={RootStackRoutes.CoinEnablingInit}
component={CoinEnablingInitScreen}
options={{ animation: 'slide_from_bottom' }}
/>
<RootStack.Screen
name={RootStackRoutes.ReceiveStack}
component={ReceiveStackNavigator}
options={{ animation: 'slide_from_bottom' }}
/>
<RootStack.Screen
name={RootStackRoutes.AuthorizeDeviceStack}
component={AuthorizeDeviceStackNavigator}
options={{
...stackNavigationOptionsConfig,
animation: 'slide_from_bottom',
gestureEnabled: false,
}}
/>
<RootStack.Screen
name={RootStackRoutes.DeviceSettingsStack}
component={DeviceSettingsStackNavigator}
options={{ animation: 'slide_from_bottom' }}
/>
<RootStack.Screen name={RootStackRoutes.SendStack} component={SendStackNavigator} />
<RootStack.Screen name={RootStackRoutes.ConnectPopup} component={ConnectPopupScreen} />
<RootStack.Screen
name={RootStackRoutes.SettingsScreenStack}
component={SettingsStackNavigator}
/>
{/* Navigation flows that start by push from bottom animation on the first screen of its stack. */}
<RootStack.Group screenOptions={{ animation: 'slide_from_bottom' }}>
<RootStack.Screen
name={RootStackRoutes.OnboardingStack}
component={OnboardingStackNavigator}
/>
<RootStack.Screen
name={RootStackRoutes.AccountsImport}
component={AccountsImportStackNavigator}
/>
<RootStack.Screen
name={RootStackRoutes.AddCoinAccountStack}
component={AddCoinAccountStackNavigator}
/>
<RootStack.Screen
name={RootStackRoutes.CoinEnablingInit}
component={CoinEnablingInitScreen}
/>
<RootStack.Screen
name={RootStackRoutes.ReceiveStack}
component={ReceiveStackNavigator}
/>
<RootStack.Screen
name={RootStackRoutes.AuthorizeDeviceStack}
component={AuthorizeDeviceStackNavigator}
options={{
...stackNavigationOptionsConfig,
gestureEnabled: false,
}}
/>
<RootStack.Screen
name={RootStackRoutes.DeviceSettingsStack}
component={DeviceSettingsStackNavigator}
/>
</RootStack.Group>
</RootStack.Navigator>
);
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const trezorImageStyle = prepareNativeStyle<{ hasDeviceFirmwareInstalled: boolea
);

const trezorModelImageMap = {
[DeviceModelInternal.T2B1]: require('../assets/trezorSafe3.png'),
[DeviceModelInternal.T3B1]: require('../assets/trezorSafe3.png'),
[DeviceModelInternal.T3T1]: require('../assets/trezorSafe5.png'),
[DeviceModelInternal.T2B1]: require('../assets/t3b1.png'),
[DeviceModelInternal.T3B1]: require('../assets/t3b1.png'),
[DeviceModelInternal.T3T1]: require('../assets/t3t1.png'),
} as const satisfies Record<SetupSupportingDeviceModel, string>;

const UninitializedDeviceLandingScreenContent = () => {
Expand Down Expand Up @@ -84,7 +84,7 @@ export const UninitializedDeviceLandingScreen = () => {
return (
// TODO: add handling of close button event
<Screen header={<ScreenHeader closeActionType="close" />}>
<VStack justifyContent="space-between" flex={1} paddingVertical="sp16">
<VStack justifyContent="space-between" flex={1} paddingTop="sp16">
<VStack spacing="sp32">
<UninitializedDeviceLandingScreenContent />
<TextButton
Expand Down

0 comments on commit 68cc994

Please sign in to comment.