@oxyhq/services 10.5.0 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/AccountMenu.js +9 -5
- package/lib/commonjs/ui/components/AccountMenu.js.map +1 -1
- package/lib/commonjs/ui/components/AnotherDeviceQR.js +51 -56
- package/lib/commonjs/ui/components/AnotherDeviceQR.js.map +1 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +1 -0
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +18 -5
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +23 -7
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/SignInModal.js +20 -1
- package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +19 -9
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +4 -2
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +153 -19
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +6 -17
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +5 -5
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +38 -38
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +2 -2
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +3 -3
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +16 -12
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +10 -6
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queryClient.js +6 -5
- package/lib/commonjs/ui/hooks/queryClient.js.map +1 -1
- package/lib/commonjs/ui/hooks/useOxyAuthSession.js +40 -2
- package/lib/commonjs/ui/hooks/useOxyAuthSession.js.map +1 -1
- package/lib/commonjs/ui/hooks/useProfileEditing.js +21 -0
- package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +3 -3
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +100 -108
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +227 -273
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AvatarCropScreen.js +10 -4
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +20 -37
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js +89 -201
- package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +80 -208
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +56 -208
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +303 -352
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +20 -20
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +77 -89
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +43 -58
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +67 -90
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +77 -177
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +113 -107
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +55 -114
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/NotificationsScreen.js +67 -85
- package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +71 -135
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +15 -9
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PreferencesScreen.js +65 -83
- package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +378 -1023
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +294 -242
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +192 -305
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +57 -97
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +41 -41
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +17 -24
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +83 -214
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +115 -77
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js +70 -57
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +136 -332
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +47 -137
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +182 -115
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +138 -214
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +54 -92
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/utils/activeAuthuser.js +15 -9
- package/lib/commonjs/ui/utils/activeAuthuser.js.map +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/AccountMenu.js +10 -6
- package/lib/module/ui/components/AccountMenu.js.map +1 -1
- package/lib/module/ui/components/AnotherDeviceQR.js +50 -56
- package/lib/module/ui/components/AnotherDeviceQR.js.map +1 -1
- package/lib/module/ui/components/BottomSheetRouter.js +2 -1
- package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +18 -5
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +23 -7
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/SignInModal.js +20 -1
- package/lib/module/ui/components/SignInModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js +19 -9
- package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js +4 -2
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +154 -20
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +6 -17
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js +5 -5
- package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +38 -38
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js +2 -2
- package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +3 -3
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/usePaymentQueries.js +16 -12
- package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useServicesQueries.js +9 -6
- package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/module/ui/hooks/queryClient.js +6 -5
- package/lib/module/ui/hooks/queryClient.js.map +1 -1
- package/lib/module/ui/hooks/useOxyAuthSession.js +40 -2
- package/lib/module/ui/hooks/useOxyAuthSession.js.map +1 -1
- package/lib/module/ui/hooks/useProfileEditing.js +21 -0
- package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +4 -3
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +101 -109
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +228 -275
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js +10 -4
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +19 -39
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateManagedAccountScreen.js +90 -202
- package/lib/module/ui/screens/CreateManagedAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +77 -205
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +55 -207
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +301 -350
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +20 -20
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +78 -90
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +44 -59
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +68 -91
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +75 -177
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +116 -108
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +52 -112
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/NotificationsScreen.js +68 -86
- package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +69 -134
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +16 -10
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PreferencesScreen.js +66 -84
- package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +366 -1012
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +295 -243
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +189 -302
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +58 -98
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +42 -42
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +18 -25
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +81 -212
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +114 -76
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustAboutScreen.js +69 -57
- package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +135 -332
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustFAQScreen.js +48 -138
- package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +184 -117
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +132 -208
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRulesScreen.js +58 -94
- package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/module/ui/utils/activeAuthuser.js +15 -9
- package/lib/module/ui/utils/activeAuthuser.js.map +1 -1
- package/lib/module/ui/utils/avatarUtils.js +1 -1
- package/lib/module/ui/utils/avatarUtils.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +1 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts +2 -0
- package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AnotherDeviceQR.d.ts +12 -2
- package/lib/typescript/commonjs/ui/components/AnotherDeviceQR.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts +3 -2
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TouchableRipple/TouchableRipple.native.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +34 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +3 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +3 -3
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queryClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useOxyAuthSession.d.ts +22 -0
- package/lib/typescript/commonjs/ui/hooks/useOxyAuthSession.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts +3 -0
- package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts +2 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/CreateManagedAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +1 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AccountMenu.d.ts +2 -0
- package/lib/typescript/module/ui/components/AccountMenu.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AnotherDeviceQR.d.ts +12 -2
- package/lib/typescript/module/ui/components/AnotherDeviceQR.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts +3 -2
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts +1 -1
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts +34 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +3 -0
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +3 -3
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queryClient.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useOxyAuthSession.d.ts +22 -0
- package/lib/typescript/module/ui/hooks/useOxyAuthSession.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts +3 -0
- package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts +2 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/CreateManagedAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/activeAuthuser.d.ts.map +1 -1
- package/lib/typescript/types/expo-haptics.d.ts +42 -0
- package/package.json +24 -31
- package/src/index.ts +1 -0
- package/src/types/expo-haptics.d.ts +42 -0
- package/src/ui/components/AccountMenu.tsx +11 -5
- package/src/ui/components/AnotherDeviceQR.tsx +53 -45
- package/src/ui/components/BottomSheetRouter.tsx +2 -1
- package/src/ui/components/FollowButton.tsx +24 -5
- package/src/ui/components/OxyProvider.tsx +22 -8
- package/src/ui/components/SignInModal.tsx +21 -2
- package/src/ui/components/TouchableRipple/TouchableRipple.native.tsx +1 -1
- package/src/ui/components/fileManagement/FileViewer.tsx +9 -9
- package/src/ui/components/fileManagement/UploadPreview.tsx +2 -2
- package/src/ui/context/OxyContext.tsx +178 -21
- package/src/ui/context/hooks/useAuthOperations.ts +6 -17
- package/src/ui/hooks/mutations/mutationFactory.ts +5 -5
- package/src/ui/hooks/mutations/useAccountMutations.ts +38 -38
- package/src/ui/hooks/mutations/useServicesMutations.ts +2 -2
- package/src/ui/hooks/queries/queryKeys.ts +6 -3
- package/src/ui/hooks/queries/useAccountQueries.ts +1 -1
- package/src/ui/hooks/queries/usePaymentQueries.ts +12 -12
- package/src/ui/hooks/queries/useServicesQueries.ts +9 -6
- package/src/ui/hooks/queryClient.ts +5 -5
- package/src/ui/hooks/useOxyAuthSession.ts +76 -2
- package/src/ui/hooks/useProfileEditing.ts +24 -0
- package/src/ui/hooks/useSessionManagement.ts +9 -6
- package/src/ui/screens/AccountVerificationScreen.tsx +101 -113
- package/src/ui/screens/AppInfoScreen.tsx +200 -238
- package/src/ui/screens/AvatarCropScreen.tsx +17 -4
- package/src/ui/screens/ConnectedAppsScreen.tsx +16 -34
- package/src/ui/screens/CreateManagedAccountScreen.tsx +94 -170
- package/src/ui/screens/EditProfileFieldScreen.tsx +77 -190
- package/src/ui/screens/FAQScreen.tsx +77 -208
- package/src/ui/screens/FeedbackScreen.tsx +330 -239
- package/src/ui/screens/FileManagementScreen.tsx +20 -20
- package/src/ui/screens/HelpSupportScreen.tsx +67 -82
- package/src/ui/screens/HistoryViewScreen.tsx +32 -38
- package/src/ui/screens/LanguageSelectorScreen.tsx +79 -93
- package/src/ui/screens/LearnMoreUsernamesScreen.tsx +81 -164
- package/src/ui/screens/LegalDocumentsScreen.tsx +184 -123
- package/src/ui/screens/ManageAccountScreen.tsx +48 -114
- package/src/ui/screens/NotificationsScreen.tsx +107 -106
- package/src/ui/screens/OxyAuthScreen.tsx +76 -109
- package/src/ui/screens/PaymentGatewayScreen.tsx +16 -7
- package/src/ui/screens/PreferencesScreen.tsx +96 -116
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +419 -872
- package/src/ui/screens/PrivacySettingsScreen.tsx +203 -185
- package/src/ui/screens/ProfileScreen.tsx +158 -200
- package/src/ui/screens/SavesCollectionsScreen.tsx +78 -125
- package/src/ui/screens/SearchSettingsScreen.tsx +52 -41
- package/src/ui/screens/UserLinksScreen.tsx +18 -25
- package/src/ui/screens/UserListScreen.tsx +95 -188
- package/src/ui/screens/WelcomeNewUserScreen.tsx +109 -36
- package/src/ui/screens/trust/TrustAboutScreen.tsx +52 -41
- package/src/ui/screens/trust/TrustCenterScreen.tsx +184 -222
- package/src/ui/screens/trust/TrustFAQScreen.tsx +64 -124
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +190 -67
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +147 -182
- package/src/ui/screens/trust/TrustRulesScreen.tsx +77 -50
- package/src/ui/utils/activeAuthuser.ts +15 -9
- package/src/ui/utils/avatarUtils.ts +1 -1
- package/lib/commonjs/ui/components/feedback/FormInput.js +0 -72
- package/lib/commonjs/ui/components/feedback/FormInput.js.map +0 -1
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js +0 -261
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js.map +0 -1
- package/lib/module/ui/components/feedback/FormInput.js +0 -67
- package/lib/module/ui/components/feedback/FormInput.js.map +0 -1
- package/lib/module/ui/components/feedback/feedbackStyles.js +0 -256
- package/lib/module/ui/components/feedback/feedbackStyles.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/feedback/FormInput.d.ts +0 -20
- package/lib/typescript/commonjs/ui/components/feedback/FormInput.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.d.ts +0 -279
- package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/feedback/FormInput.d.ts +0 -20
- package/lib/typescript/module/ui/components/feedback/FormInput.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/feedback/feedbackStyles.d.ts +0 -279
- package/lib/typescript/module/ui/components/feedback/feedbackStyles.d.ts.map +0 -1
- package/src/ui/components/feedback/FormInput.tsx +0 -84
- package/src/ui/components/feedback/feedbackStyles.ts +0 -246
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import React, { useState, useMemo, useCallback } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
View,
|
|
4
|
-
Text,
|
|
5
|
-
TouchableOpacity,
|
|
6
|
-
StyleSheet,
|
|
7
|
-
ScrollView,
|
|
8
|
-
Platform,
|
|
9
|
-
} from 'react-native';
|
|
2
|
+
import { View, StyleSheet, ScrollView } from 'react-native';
|
|
10
3
|
import type { BaseScreenProps } from '../types/navigation';
|
|
11
4
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
12
5
|
import { normalizeTheme } from '@oxyhq/core';
|
|
13
6
|
import { Ionicons } from '@expo/vector-icons';
|
|
14
7
|
import { toast } from '@oxyhq/bloom';
|
|
15
|
-
import
|
|
8
|
+
import { H1, Text } from '@oxyhq/bloom/typography';
|
|
9
|
+
import { SearchInput } from '@oxyhq/bloom/search-input';
|
|
16
10
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
11
|
+
import Header from '../components/Header';
|
|
17
12
|
import { useI18n } from '../hooks/useI18n';
|
|
18
13
|
import { SUPPORTED_LANGUAGES } from '@oxyhq/core';
|
|
19
14
|
import { useOxy } from '../context/OxyContext';
|
|
20
15
|
|
|
21
16
|
interface LanguageSelectorScreenProps extends BaseScreenProps { }
|
|
22
17
|
|
|
18
|
+
// Size (in dp) of the circular flag chip rendered as each row's leading icon.
|
|
19
|
+
const FLAG_CHIP_SIZE = 40;
|
|
20
|
+
// Selected-row check indicator size (dp).
|
|
21
|
+
const CHECK_ICON_SIZE = 24;
|
|
22
|
+
|
|
23
23
|
/**
|
|
24
24
|
* LanguageSelectorScreen - Optimized for performance
|
|
25
|
-
*
|
|
25
|
+
*
|
|
26
26
|
* Performance optimizations:
|
|
27
|
-
* - useMemo for language
|
|
27
|
+
* - useMemo for the filtered language list to prevent recreation on every render
|
|
28
28
|
* - useCallback for handlers to prevent unnecessary re-renders
|
|
29
|
-
* - Memoized
|
|
29
|
+
* - Memoized component to prevent unnecessary re-renders
|
|
30
30
|
*/
|
|
31
31
|
const LanguageSelectorScreen: React.FC<LanguageSelectorScreenProps> = ({
|
|
32
32
|
goBack,
|
|
@@ -39,6 +39,7 @@ const LanguageSelectorScreen: React.FC<LanguageSelectorScreenProps> = ({
|
|
|
39
39
|
const bloomTheme = useTheme();
|
|
40
40
|
const normalizedTheme = normalizeTheme(theme);
|
|
41
41
|
const [isLoading, setIsLoading] = useState(false);
|
|
42
|
+
const [query, setQuery] = useState('');
|
|
42
43
|
|
|
43
44
|
// Memoize the language select handler to prevent recreation on every render
|
|
44
45
|
const handleLanguageSelect = useCallback(async (languageId: string) => {
|
|
@@ -91,32 +92,20 @@ const LanguageSelectorScreen: React.FC<LanguageSelectorScreenProps> = ({
|
|
|
91
92
|
}
|
|
92
93
|
}, [currentLanguage, isLoading, isAuthenticated, user?.id, oxyServices, setLanguage, t, onClose, goBack]);
|
|
93
94
|
|
|
94
|
-
//
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
</View>
|
|
106
|
-
),
|
|
107
|
-
onPress: () => handleLanguageSelect(language.id),
|
|
108
|
-
rightElement: isSelected ? (
|
|
109
|
-
<Ionicons name="checkmark-circle" size={24} color={bloomTheme.colors.primary} />
|
|
110
|
-
) : undefined,
|
|
111
|
-
showChevron: false,
|
|
112
|
-
};
|
|
113
|
-
}),
|
|
114
|
-
[currentLanguage, handleLanguageSelect, bloomTheme]
|
|
115
|
-
);
|
|
116
|
-
|
|
95
|
+
// Filter the supported languages by the search query (name + native name).
|
|
96
|
+
const filteredLanguages = useMemo(() => {
|
|
97
|
+
const normalized = query.trim().toLowerCase();
|
|
98
|
+
if (!normalized) {
|
|
99
|
+
return SUPPORTED_LANGUAGES;
|
|
100
|
+
}
|
|
101
|
+
return SUPPORTED_LANGUAGES.filter((language) =>
|
|
102
|
+
language.name.toLowerCase().includes(normalized) ||
|
|
103
|
+
language.nativeName.toLowerCase().includes(normalized)
|
|
104
|
+
);
|
|
105
|
+
}, [query]);
|
|
117
106
|
|
|
118
107
|
return (
|
|
119
|
-
<View
|
|
108
|
+
<View className="flex-1 bg-bg">
|
|
120
109
|
<Header
|
|
121
110
|
title=""
|
|
122
111
|
subtitle=""
|
|
@@ -127,89 +116,86 @@ const LanguageSelectorScreen: React.FC<LanguageSelectorScreenProps> = ({
|
|
|
127
116
|
/>
|
|
128
117
|
|
|
129
118
|
<ScrollView
|
|
130
|
-
|
|
131
|
-
|
|
119
|
+
className="flex-1"
|
|
120
|
+
contentContainerClassName="px-screen-margin pt-space-24 pb-space-24"
|
|
132
121
|
showsVerticalScrollIndicator={false}
|
|
133
122
|
removeClippedSubviews={true}
|
|
123
|
+
keyboardShouldPersistTaps="handled"
|
|
134
124
|
>
|
|
135
125
|
{/* Big Title */}
|
|
136
|
-
<View
|
|
137
|
-
<
|
|
126
|
+
<View className="mb-space-16">
|
|
127
|
+
<H1 className="text-text" style={styles.bigTitle}>
|
|
138
128
|
{t('language.title')}
|
|
139
|
-
</
|
|
140
|
-
{t('language.subtitle')
|
|
141
|
-
<Text style={
|
|
129
|
+
</H1>
|
|
130
|
+
{t('language.subtitle') ? (
|
|
131
|
+
<Text className="text-text-secondary mt-space-2" style={styles.bigSubtitle}>
|
|
142
132
|
{t('language.subtitle')}
|
|
143
133
|
</Text>
|
|
144
|
-
)}
|
|
134
|
+
) : null}
|
|
145
135
|
</View>
|
|
146
136
|
|
|
147
|
-
{/*
|
|
148
|
-
<View
|
|
149
|
-
<
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
key={item.id}
|
|
156
|
-
icon={item.icon}
|
|
157
|
-
title={item.title}
|
|
158
|
-
description={item.description}
|
|
159
|
-
onPress={item.onPress}
|
|
160
|
-
rightElement={item.rightElement}
|
|
161
|
-
showChevron={false}
|
|
162
|
-
/>
|
|
163
|
-
))}
|
|
164
|
-
</SettingsListGroup>
|
|
165
|
-
</View>
|
|
137
|
+
{/* Search / filter */}
|
|
138
|
+
<View className="mb-space-16">
|
|
139
|
+
<SearchInput
|
|
140
|
+
value={query}
|
|
141
|
+
onChangeText={setQuery}
|
|
142
|
+
onClearText={() => setQuery('')}
|
|
143
|
+
label={t('language.search') || 'Search languages'}
|
|
144
|
+
/>
|
|
166
145
|
</View>
|
|
146
|
+
|
|
147
|
+
{/* Available languages - Main section */}
|
|
148
|
+
<SettingsListGroup>
|
|
149
|
+
{filteredLanguages.map((language) => {
|
|
150
|
+
const isSelected = currentLanguage === language.id;
|
|
151
|
+
return (
|
|
152
|
+
<SettingsListItem
|
|
153
|
+
key={language.id}
|
|
154
|
+
icon={
|
|
155
|
+
<View
|
|
156
|
+
className="bg-fill-secondary items-center justify-center"
|
|
157
|
+
style={styles.languageFlag}
|
|
158
|
+
>
|
|
159
|
+
<Text style={styles.flagEmoji}>{language.flag}</Text>
|
|
160
|
+
</View>
|
|
161
|
+
}
|
|
162
|
+
title={language.name}
|
|
163
|
+
description={language.nativeName}
|
|
164
|
+
onPress={() => handleLanguageSelect(language.id)}
|
|
165
|
+
rightElement={
|
|
166
|
+
isSelected ? (
|
|
167
|
+
<Ionicons
|
|
168
|
+
name="checkmark-circle"
|
|
169
|
+
size={CHECK_ICON_SIZE}
|
|
170
|
+
color={bloomTheme.colors.primary}
|
|
171
|
+
/>
|
|
172
|
+
) : undefined
|
|
173
|
+
}
|
|
174
|
+
showChevron={false}
|
|
175
|
+
/>
|
|
176
|
+
);
|
|
177
|
+
})}
|
|
178
|
+
</SettingsListGroup>
|
|
167
179
|
</ScrollView>
|
|
168
180
|
</View>
|
|
169
181
|
);
|
|
170
182
|
};
|
|
171
183
|
|
|
184
|
+
// StyleSheet retained ONLY for measured layout (sizes / line metrics) — no colors.
|
|
172
185
|
const styles = StyleSheet.create({
|
|
173
|
-
container: {
|
|
174
|
-
flex: 1,
|
|
175
|
-
},
|
|
176
|
-
content: {
|
|
177
|
-
flex: 1,
|
|
178
|
-
},
|
|
179
|
-
contentContainer: {
|
|
180
|
-
padding: 16,
|
|
181
|
-
paddingTop: 24,
|
|
182
|
-
},
|
|
183
|
-
titleContainer: {
|
|
184
|
-
marginBottom: 32,
|
|
185
|
-
paddingTop: 0,
|
|
186
|
-
},
|
|
187
186
|
bigTitle: {
|
|
188
187
|
fontSize: 34,
|
|
189
|
-
fontWeight: Platform.OS === 'web' ? 'bold' : undefined,
|
|
190
188
|
lineHeight: 40,
|
|
191
|
-
marginBottom: 8,
|
|
192
189
|
letterSpacing: -0.5,
|
|
193
190
|
},
|
|
194
191
|
bigSubtitle: {
|
|
195
192
|
fontSize: 16,
|
|
196
193
|
lineHeight: 22,
|
|
197
|
-
opacity: 0.7,
|
|
198
|
-
marginTop: 4,
|
|
199
|
-
},
|
|
200
|
-
sectionContainer: {
|
|
201
|
-
marginBottom: 8,
|
|
202
|
-
},
|
|
203
|
-
materialCard: {
|
|
204
|
-
borderRadius: 12,
|
|
205
|
-
overflow: 'hidden',
|
|
206
194
|
},
|
|
207
195
|
languageFlag: {
|
|
208
|
-
width:
|
|
209
|
-
height:
|
|
210
|
-
borderRadius:
|
|
211
|
-
alignItems: 'center',
|
|
212
|
-
justifyContent: 'center',
|
|
196
|
+
width: FLAG_CHIP_SIZE,
|
|
197
|
+
height: FLAG_CHIP_SIZE,
|
|
198
|
+
borderRadius: FLAG_CHIP_SIZE / 2,
|
|
213
199
|
},
|
|
214
200
|
flagEmoji: {
|
|
215
201
|
fontSize: 20,
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useCallback, useState } from 'react';
|
|
3
|
+
import { View, ScrollView, StyleSheet } from 'react-native';
|
|
4
|
+
import { useTheme } from '@oxyhq/bloom/theme';
|
|
5
|
+
import { Text } from '@oxyhq/bloom/typography';
|
|
6
|
+
import { IconCircle } from '@oxyhq/bloom/icon-circle';
|
|
3
7
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import {
|
|
8
|
+
Accordion,
|
|
9
|
+
AccordionItem,
|
|
10
|
+
AccordionTrigger,
|
|
11
|
+
AccordionContent,
|
|
12
|
+
} from '@oxyhq/bloom/accordion';
|
|
13
|
+
import * as Icons from '@oxyhq/bloom/icons';
|
|
14
|
+
import type { Props as IconProps } from '@oxyhq/bloom/icons';
|
|
11
15
|
import type { BaseScreenProps } from '../types/navigation';
|
|
12
|
-
import
|
|
16
|
+
import Header from '../components/Header';
|
|
13
17
|
import { useI18n } from '../hooks/useI18n';
|
|
14
18
|
|
|
15
19
|
interface InfoSection {
|
|
16
20
|
id: string;
|
|
17
21
|
titleKey: string;
|
|
18
22
|
contentKey: string;
|
|
19
|
-
|
|
23
|
+
Icon: React.ComponentType<IconProps>;
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
const INFO_SECTIONS: InfoSection[] = [
|
|
@@ -24,211 +28,124 @@ const INFO_SECTIONS: InfoSection[] = [
|
|
|
24
28
|
id: 'what',
|
|
25
29
|
titleKey: 'learnMoreUsernames.sections.what.title',
|
|
26
30
|
contentKey: 'learnMoreUsernames.sections.what.content',
|
|
27
|
-
|
|
31
|
+
Icon: Icons.At_Stroke2_Corner0_Rounded,
|
|
28
32
|
},
|
|
29
33
|
{
|
|
30
34
|
id: 'rules',
|
|
31
35
|
titleKey: 'learnMoreUsernames.sections.rules.title',
|
|
32
36
|
contentKey: 'learnMoreUsernames.sections.rules.content',
|
|
33
|
-
|
|
37
|
+
Icon: Icons.BulletList_Stroke2_Corner0_Rounded,
|
|
34
38
|
},
|
|
35
39
|
{
|
|
36
40
|
id: 'unique',
|
|
37
41
|
titleKey: 'learnMoreUsernames.sections.unique.title',
|
|
38
42
|
contentKey: 'learnMoreUsernames.sections.unique.content',
|
|
39
|
-
|
|
43
|
+
Icon: Icons.Key_Stroke2_Corner2_Rounded,
|
|
40
44
|
},
|
|
41
45
|
{
|
|
42
46
|
id: 'change',
|
|
43
47
|
titleKey: 'learnMoreUsernames.sections.change.title',
|
|
44
48
|
contentKey: 'learnMoreUsernames.sections.change.content',
|
|
45
|
-
|
|
49
|
+
Icon: Icons.ArrowRotateClockwise_Stroke2_Corner0_Rounded,
|
|
46
50
|
},
|
|
47
51
|
{
|
|
48
52
|
id: 'tips',
|
|
49
53
|
titleKey: 'learnMoreUsernames.sections.tips.title',
|
|
50
54
|
contentKey: 'learnMoreUsernames.sections.tips.content',
|
|
51
|
-
|
|
55
|
+
Icon: Icons.Sparkle_Stroke2_Corner0_Rounded,
|
|
52
56
|
},
|
|
53
57
|
];
|
|
54
58
|
|
|
55
59
|
const LearnMoreUsernamesScreen: React.FC<BaseScreenProps> = ({
|
|
56
|
-
|
|
60
|
+
onClose,
|
|
61
|
+
goBack,
|
|
57
62
|
}) => {
|
|
58
63
|
const bloomTheme = useTheme();
|
|
59
64
|
const { t } = useI18n();
|
|
60
|
-
|
|
65
|
+
// Start with the first section expanded.
|
|
66
|
+
const [expandedIds, setExpandedIds] = useState<string[]>(['what']);
|
|
61
67
|
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
const handleAccordionChange = useCallback(
|
|
69
|
+
(value: string | string[] | undefined) => {
|
|
70
|
+
if (Array.isArray(value)) {
|
|
71
|
+
setExpandedIds(value);
|
|
72
|
+
} else if (value == null) {
|
|
73
|
+
setExpandedIds([]);
|
|
67
74
|
} else {
|
|
68
|
-
|
|
75
|
+
setExpandedIds([value]);
|
|
69
76
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const styles = useMemo(() => createStyles(), []);
|
|
77
|
+
},
|
|
78
|
+
[],
|
|
79
|
+
);
|
|
75
80
|
|
|
76
81
|
return (
|
|
77
|
-
<View
|
|
82
|
+
<View className="flex-1 bg-bg">
|
|
83
|
+
<Header
|
|
84
|
+
title={t('learnMoreUsernames.introTitle')}
|
|
85
|
+
onBack={goBack || onClose}
|
|
86
|
+
variant="minimal"
|
|
87
|
+
elevation="subtle"
|
|
88
|
+
/>
|
|
78
89
|
<ScrollView
|
|
79
|
-
|
|
90
|
+
className="flex-1 px-screen-margin"
|
|
80
91
|
showsVerticalScrollIndicator={false}
|
|
81
|
-
|
|
92
|
+
contentContainerClassName="pb-space-32"
|
|
82
93
|
>
|
|
83
|
-
<View
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
</View>
|
|
87
|
-
<Text style={[styles.introTitle, { color: bloomTheme.colors.text }]}>
|
|
88
|
-
{t('learnMoreUsernames.introTitle')}
|
|
89
|
-
</Text>
|
|
90
|
-
<Text style={[styles.introText, { color: bloomTheme.colors.textSecondary }]}>
|
|
94
|
+
<View className="items-center py-space-24 gap-space-12">
|
|
95
|
+
<IconCircle icon={Icons.At_Stroke2_Corner0_Rounded} />
|
|
96
|
+
<Text className="font-sans text-body text-text-secondary text-center">
|
|
91
97
|
{t('learnMoreUsernames.introText')}
|
|
92
98
|
</Text>
|
|
93
99
|
</View>
|
|
94
100
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
{
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
101
|
+
<Accordion
|
|
102
|
+
type="multiple"
|
|
103
|
+
value={expandedIds}
|
|
104
|
+
onValueChange={handleAccordionChange}
|
|
105
|
+
>
|
|
106
|
+
{INFO_SECTIONS.map(({ id, titleKey, contentKey, Icon }) => (
|
|
107
|
+
<AccordionItem key={id} value={id}>
|
|
108
|
+
<AccordionTrigger
|
|
109
|
+
icon={
|
|
110
|
+
<View
|
|
111
|
+
className="bg-fill-secondary rounded-radius-12"
|
|
112
|
+
style={styles.iconSquare}
|
|
113
|
+
>
|
|
114
|
+
<Icon
|
|
115
|
+
size="md"
|
|
116
|
+
style={{ color: bloomTheme.colors.primary }}
|
|
117
|
+
/>
|
|
118
|
+
</View>
|
|
119
|
+
}
|
|
114
120
|
>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
/>
|
|
121
|
-
</View>
|
|
122
|
-
<Text style={[styles.sectionTitle, { color: bloomTheme.colors.text }]}>
|
|
123
|
-
{sectionTitle}
|
|
121
|
+
{t(titleKey)}
|
|
122
|
+
</AccordionTrigger>
|
|
123
|
+
<AccordionContent>
|
|
124
|
+
<Text className="font-sans text-bodyMedium text-text-secondary">
|
|
125
|
+
{t(contentKey)}
|
|
124
126
|
</Text>
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
/>
|
|
130
|
-
</TouchableOpacity>
|
|
131
|
-
{isExpanded && (
|
|
132
|
-
<View style={[styles.sectionContent, { borderTopColor: bloomTheme.colors.border }]}>
|
|
133
|
-
<Text style={[styles.sectionText, { color: bloomTheme.colors.textSecondary }]}>
|
|
134
|
-
{t(section.contentKey)}
|
|
135
|
-
</Text>
|
|
136
|
-
</View>
|
|
137
|
-
)}
|
|
138
|
-
</View>
|
|
139
|
-
);
|
|
140
|
-
})}
|
|
127
|
+
</AccordionContent>
|
|
128
|
+
</AccordionItem>
|
|
129
|
+
))}
|
|
130
|
+
</Accordion>
|
|
141
131
|
|
|
142
|
-
<
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
</Text>
|
|
146
|
-
</View>
|
|
132
|
+
<Text className="font-sans text-caption text-text-tertiary text-center mt-space-16">
|
|
133
|
+
{t('learnMoreUsernames.footer')}
|
|
134
|
+
</Text>
|
|
147
135
|
</ScrollView>
|
|
148
136
|
</View>
|
|
149
137
|
);
|
|
150
138
|
};
|
|
151
139
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
flex: 1,
|
|
158
|
-
},
|
|
159
|
-
contentContainer: {
|
|
160
|
-
padding: 16,
|
|
161
|
-
paddingBottom: 32,
|
|
162
|
-
},
|
|
163
|
-
introSection: {
|
|
164
|
-
alignItems: 'center',
|
|
165
|
-
paddingVertical: 24,
|
|
166
|
-
paddingHorizontal: 16,
|
|
167
|
-
},
|
|
168
|
-
introIcon: {
|
|
169
|
-
width: 64,
|
|
170
|
-
height: 64,
|
|
171
|
-
borderRadius: 32,
|
|
172
|
-
alignItems: 'center',
|
|
173
|
-
justifyContent: 'center',
|
|
174
|
-
marginBottom: 16,
|
|
175
|
-
},
|
|
176
|
-
introTitle: {
|
|
177
|
-
fontSize: 24,
|
|
178
|
-
fontWeight: '700',
|
|
179
|
-
marginBottom: 8,
|
|
180
|
-
textAlign: 'center',
|
|
181
|
-
},
|
|
182
|
-
introText: {
|
|
183
|
-
fontSize: 16,
|
|
184
|
-
lineHeight: 24,
|
|
185
|
-
textAlign: 'center',
|
|
186
|
-
},
|
|
187
|
-
section: {
|
|
188
|
-
borderRadius: 12,
|
|
189
|
-
borderWidth: 1,
|
|
190
|
-
marginBottom: 12,
|
|
191
|
-
overflow: 'hidden',
|
|
192
|
-
},
|
|
193
|
-
sectionFirst: {
|
|
194
|
-
marginTop: 8,
|
|
195
|
-
},
|
|
196
|
-
sectionHeader: {
|
|
197
|
-
flexDirection: 'row',
|
|
198
|
-
alignItems: 'center',
|
|
199
|
-
padding: 16,
|
|
200
|
-
},
|
|
201
|
-
sectionIconContainer: {
|
|
140
|
+
// Measured layout only (no color): fixed-size square that hosts the leading
|
|
141
|
+
// section icon inside the accordion trigger. Color comes from the
|
|
142
|
+
// `bg-fill-secondary` token class on the View.
|
|
143
|
+
const styles = StyleSheet.create({
|
|
144
|
+
iconSquare: {
|
|
202
145
|
width: 36,
|
|
203
146
|
height: 36,
|
|
204
|
-
borderRadius: 18,
|
|
205
147
|
alignItems: 'center',
|
|
206
148
|
justifyContent: 'center',
|
|
207
|
-
marginRight: 12,
|
|
208
|
-
},
|
|
209
|
-
sectionTitle: {
|
|
210
|
-
flex: 1,
|
|
211
|
-
fontSize: 16,
|
|
212
|
-
fontWeight: '600',
|
|
213
|
-
marginRight: 12,
|
|
214
|
-
},
|
|
215
|
-
sectionContent: {
|
|
216
|
-
padding: 16,
|
|
217
|
-
paddingTop: 12,
|
|
218
|
-
borderTopWidth: 1,
|
|
219
|
-
},
|
|
220
|
-
sectionText: {
|
|
221
|
-
fontSize: 14,
|
|
222
|
-
lineHeight: 22,
|
|
223
|
-
},
|
|
224
|
-
footer: {
|
|
225
|
-
marginTop: 16,
|
|
226
|
-
paddingHorizontal: 16,
|
|
227
|
-
},
|
|
228
|
-
footerText: {
|
|
229
|
-
fontSize: 14,
|
|
230
|
-
textAlign: 'center',
|
|
231
|
-
lineHeight: 20,
|
|
232
149
|
},
|
|
233
150
|
});
|
|
234
151
|
|