Skip to content

Commit 8ba5b5e

Browse files
authored
refactor: reorganize and rename mobile screens (#1207)
* refactor(screens): reorganize screen directories * fix types, linting * udpates * fix lint issues * fix vite * pr feedback and fix missing bundle resolution * remove b4a; breaks build * update gemfile.lock * use DocumentNotFound screen
1 parent c5d0e5d commit 8ba5b5e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+305
-339
lines changed

app/Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ GEM
2525
artifactory (3.0.17)
2626
atomos (0.1.3)
2727
aws-eventstream (1.4.0)
28-
aws-partitions (1.1168.0)
28+
aws-partitions (1.1170.0)
2929
aws-sdk-core (3.233.0)
3030
aws-eventstream (~> 1, >= 1.3.0)
3131
aws-partitions (~> 1, >= 1.992.0)
@@ -46,7 +46,7 @@ GEM
4646
babosa (1.0.4)
4747
base64 (0.3.0)
4848
benchmark (0.4.1)
49-
bigdecimal (3.2.3)
49+
bigdecimal (3.3.0)
5050
claide (1.1.0)
5151
cocoapods (1.16.2)
5252
addressable (~> 2.8)
@@ -225,14 +225,14 @@ GEM
225225
i18n (1.14.7)
226226
concurrent-ruby (~> 1.0)
227227
jmespath (1.6.2)
228-
json (2.15.0)
228+
json (2.15.1)
229229
jwt (2.10.2)
230230
base64
231231
logger (1.7.0)
232232
mini_magick (4.13.2)
233233
mini_mime (1.1.5)
234234
mini_portile2 (2.8.9)
235-
minitest (5.25.5)
235+
minitest (5.26.0)
236236
molinillo (0.8.0)
237237
multi_json (1.17.0)
238238
multipart-post (2.4.1)

app/src/components/NavBar/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: BUSL-1.1
33
// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE.
44

5+
export { AadhaarNavBar } from '@/components/NavBar/AadhaarNavBar';
56
export { DefaultNavBar } from '@/components/NavBar/DefaultNavBar';
67
export { HomeNavBar } from '@/components/NavBar/HomeNavBar';
78
export { IdDetailsNavBar } from '@/components/NavBar/IdDetailsNavBar';

app/src/components/homeScreen/idCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: BUSL-1.1
33
// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE.
44

5-
import type { FC } from 'react';
5+
import React, { type FC } from 'react';
66
import { Dimensions } from 'react-native';
77
import { Separator, Text, XStack, YStack } from 'tamagui';
88

app/src/hooks/useModal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import { useCallback, useRef, useState } from 'react';
66
import { useNavigation } from '@react-navigation/native';
77

8-
import type { ModalParams } from '@/screens/system/ModalScreen';
8+
import type { ModalParams } from '@/screens/app/ModalScreen';
99
import {
1010
getModalCallbacks,
1111
registerModalCallbacks,

app/src/navigation/settings.ts renamed to app/src/navigation/account.ts

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,57 @@
44

55
import type { NativeStackNavigationOptions } from '@react-navigation/native-stack';
66

7-
import CloudBackupScreen from '@/screens/settings/CloudBackupScreen';
8-
import DocumentDataInfoScreen from '@/screens/settings/DocumentDataInfoScreen';
9-
import ManageDocumentsScreen from '@/screens/settings/ManageDocumentsScreen';
10-
import SettingsScreen from '@/screens/settings/SettingsScreen';
11-
import ShowRecoveryPhraseScreen from '@/screens/settings/ShowRecoveryPhraseScreen';
7+
import AccountRecoveryChoiceScreen from '@/screens/account/recovery/AccountRecoveryChoiceScreen';
8+
import AccountRecoveryScreen from '@/screens/account/recovery/AccountRecoveryScreen';
9+
import DocumentDataNotFoundScreen from '@/screens/account/recovery/DocumentDataNotFoundScreen';
10+
import RecoverWithPhraseScreen from '@/screens/account/recovery/RecoverWithPhraseScreen';
11+
import CloudBackupScreen from '@/screens/account/settings/CloudBackupScreen';
12+
import SettingsScreen from '@/screens/account/settings/SettingsScreen';
13+
import ShowRecoveryPhraseScreen from '@/screens/account/settings/ShowRecoveryPhraseScreen';
1214
import { black, slate300, white } from '@/utils/colors';
1315

14-
const settingsScreens = {
15-
CloudBackupSettings: {
16-
screen: CloudBackupScreen,
16+
const accountScreens = {
17+
AccountRecovery: {
18+
screen: AccountRecoveryScreen,
1719
options: {
18-
title: 'Cloud backup',
20+
headerShown: false,
21+
} as NativeStackNavigationOptions,
22+
},
23+
AccountRecoveryChoice: {
24+
screen: AccountRecoveryChoiceScreen,
25+
options: {
26+
headerShown: false,
27+
} as NativeStackNavigationOptions,
28+
},
29+
RecoverWithPhrase: {
30+
screen: RecoverWithPhraseScreen,
31+
options: {
32+
headerTintColor: black,
33+
title: 'Enter Recovery Phrase',
1934
headerStyle: {
2035
backgroundColor: black,
2136
},
2237
headerTitleStyle: {
2338
color: slate300,
2439
},
40+
headerBackTitle: 'close',
2541
} as NativeStackNavigationOptions,
2642
},
27-
ManageDocuments: {
28-
screen: ManageDocumentsScreen,
43+
DocumentDataNotFound: {
44+
screen: DocumentDataNotFoundScreen,
2945
options: {
30-
title: 'Manage Documents',
31-
headerStyle: {
32-
backgroundColor: white,
33-
},
34-
headerTitleStyle: {
35-
color: black,
36-
},
46+
headerShown: false,
3747
} as NativeStackNavigationOptions,
3848
},
39-
DocumentDataInfo: {
40-
screen: DocumentDataInfoScreen,
49+
CloudBackupSettings: {
50+
screen: CloudBackupScreen,
4151
options: {
42-
title: 'Document Data Info',
52+
title: 'Cloud backup',
4353
headerStyle: {
44-
backgroundColor: white,
54+
backgroundColor: black,
55+
},
56+
headerTitleStyle: {
57+
color: slate300,
4558
},
4659
} as NativeStackNavigationOptions,
4760
},
@@ -72,4 +85,4 @@ const settingsScreens = {
7285
},
7386
};
7487

75-
export default settingsScreens;
88+
export default accountScreens;

app/src/navigation/account.web.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc.
2+
// SPDX-License-Identifier: BUSL-1.1
3+
// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE.
4+
5+
import type { NativeStackNavigationOptions } from '@react-navigation/native-stack';
6+
7+
import SettingsScreen from '@/screens/account/settings/SettingsScreen';
8+
import { black, white } from '@/utils/colors';
9+
10+
const accountScreens = {
11+
Settings: {
12+
screen: SettingsScreen,
13+
options: {
14+
animation: 'slide_from_bottom',
15+
title: 'Settings',
16+
headerStyle: {
17+
backgroundColor: white,
18+
},
19+
headerTitleStyle: {
20+
color: black,
21+
},
22+
} as NativeStackNavigationOptions,
23+
config: {
24+
screens: {},
25+
},
26+
},
27+
};
28+
29+
export default accountScreens;

app/src/navigation/system.tsx renamed to app/src/navigation/app.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import type { NativeStackNavigationOptions } from '@react-navigation/native-stac
88

99
import type { DocumentCategory } from '@selfxyz/common/utils/types';
1010

11-
import DeferredLinkingInfoScreen from '@/screens/system/DeferredLinkingInfoScreen';
12-
import LaunchScreen from '@/screens/system/LaunchScreen';
13-
import LoadingScreen from '@/screens/system/Loading';
14-
import ModalScreen from '@/screens/system/ModalScreen';
15-
import SplashScreen from '@/screens/system/SplashScreen';
11+
import DeferredLinkingInfoScreen from '@/screens/app/DeferredLinkingInfoScreen';
12+
import LaunchScreen from '@/screens/app/LaunchScreen';
13+
import LoadingScreen from '@/screens/app/LoadingScreen';
14+
import ModalScreen from '@/screens/app/ModalScreen';
15+
import SplashScreen from '@/screens/app/SplashScreen';
1616

17-
const systemScreens = {
17+
const appScreens = {
1818
Launch: {
1919
screen: LaunchScreen,
2020
options: {
@@ -56,4 +56,4 @@ const systemScreens = {
5656
},
5757
};
5858

59-
export default systemScreens;
59+
export default appScreens;

app/src/navigation/document.ts

Lines changed: 0 additions & 103 deletions
This file was deleted.

0 commit comments

Comments
 (0)