@oxyhq/services 22.8.7 → 22.10.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 +24 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +150 -0
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -0
- package/lib/commonjs/ui/components/OxyAuthChooser.js +137 -40
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyConsentScreen.js +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +9 -29
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +1 -1
- package/lib/commonjs/ui/components/RequireOxyAuth.js +1 -1
- package/lib/commonjs/ui/components/SurfaceHeaderAction.js +63 -0
- package/lib/commonjs/ui/components/SurfaceHeaderAction.js.map +1 -0
- package/lib/commonjs/ui/components/SurfaceScreen.js +193 -0
- package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -0
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +46 -29
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +47 -23
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js +22 -12
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +1 -1
- package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js +83 -0
- package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +49 -4
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +34 -39
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js +46 -0
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +1 -1
- package/lib/commonjs/ui/navigation/accountDialogManager.js +14 -2
- package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/bottomSheetManager.js +38 -56
- package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +7 -57
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaceBackBridge.js +68 -0
- package/lib/commonjs/ui/navigation/surfaceBackBridge.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaceNavStack.js +98 -0
- package/lib/commonjs/ui/navigation/surfaceNavStack.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaceRegistry.js +152 -0
- package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaces.js +256 -0
- package/lib/commonjs/ui/navigation/surfaces.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +214 -283
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +88 -118
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +22 -36
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +219 -226
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AvatarCropScreen.js +10 -14
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +24 -39
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +136 -158
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +29 -36
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileScreen.js +101 -109
- package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +10 -15
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +8 -16
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +219 -206
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +62 -69
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +63 -79
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +69 -98
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +8 -14
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +77 -94
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +99 -134
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/NotificationsScreen.js +69 -76
- package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -8
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PreferencesScreen.js +67 -74
- package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +55 -91
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +291 -304
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +100 -114
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +38 -45
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +44 -57
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +24 -31
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +14 -24
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +9 -7
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js +66 -75
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +111 -139
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +13 -20
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +14 -27
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +68 -85
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +28 -36
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/types/surfaceScreen.js +6 -0
- package/lib/commonjs/ui/types/surfaceScreen.js.map +1 -0
- package/lib/module/index.js +12 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialogScreen.js +145 -0
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -0
- package/lib/module/ui/components/OxyAuthChooser.js +137 -40
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyConsentScreen.js +1 -1
- package/lib/module/ui/components/OxyProvider.js +10 -30
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js +1 -1
- package/lib/module/ui/components/RequireOxyAuth.js +1 -1
- package/lib/module/ui/components/SurfaceHeaderAction.js +58 -0
- package/lib/module/ui/components/SurfaceHeaderAction.js.map +1 -0
- package/lib/module/ui/components/SurfaceScreen.js +188 -0
- package/lib/module/ui/components/SurfaceScreen.js.map +1 -0
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +46 -29
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js +46 -23
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/module/ui/components/oxyAuthChooserStyles.js +22 -12
- package/lib/module/ui/components/oxyAuthChooserStyles.js.map +1 -1
- package/lib/module/ui/components/surfaces/ActionSheetSurface.js +78 -0
- package/lib/module/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +49 -4
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +34 -39
- package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/module/ui/hooks/useSurfaceHeader.js +42 -0
- package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -0
- package/lib/module/ui/hooks/useSwitchableAccounts.js +1 -1
- package/lib/module/ui/navigation/accountDialogManager.js +14 -2
- package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/module/ui/navigation/bottomSheetManager.js +37 -53
- package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +6 -56
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/navigation/surfaceBackBridge.js +63 -0
- package/lib/module/ui/navigation/surfaceBackBridge.js.map +1 -0
- package/lib/module/ui/navigation/surfaceNavStack.js +95 -0
- package/lib/module/ui/navigation/surfaceNavStack.js.map +1 -0
- package/lib/module/ui/navigation/surfaceRegistry.js +146 -0
- package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -0
- package/lib/module/ui/navigation/surfaces.js +244 -0
- package/lib/module/ui/navigation/surfaces.js.map +1 -0
- package/lib/module/ui/screens/AccountMembersScreen.js +218 -286
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +92 -121
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +25 -38
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +220 -227
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js +10 -14
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +26 -40
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js +139 -160
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +32 -38
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileScreen.js +102 -110
- package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +11 -15
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +10 -17
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +222 -208
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +64 -70
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +65 -81
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +71 -99
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +10 -15
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +78 -94
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +102 -137
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/NotificationsScreen.js +71 -77
- package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +4 -9
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PreferencesScreen.js +69 -75
- package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +58 -93
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +293 -305
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +102 -116
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +40 -46
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +46 -58
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +26 -32
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +14 -24
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +8 -7
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustAboutScreen.js +67 -75
- package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +112 -139
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustFAQScreen.js +15 -21
- package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +14 -26
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +69 -85
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRulesScreen.js +30 -37
- package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/module/ui/types/surfaceScreen.js +4 -0
- package/lib/module/ui/types/surfaceScreen.js.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts +39 -0
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +3 -3
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.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/ProfileButton.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/RequireOxyAuth.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts +16 -0
- package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts +26 -0
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +17 -2
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts +19 -9
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
- package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +7 -11
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +31 -0
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +14 -2
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +24 -16
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +2 -60
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts +16 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts +51 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +135 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts +79 -0
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.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 +0 -4
- 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/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.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/FileManagementScreen.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 +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/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/fileManagement/hooks/useFileUploadState.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/types/navigation.d.ts +8 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/surfaceScreen.d.ts +38 -0
- package/lib/typescript/commonjs/ui/types/surfaceScreen.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts +39 -0
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +3 -3
- package/lib/typescript/module/ui/components/OxyAuthChooser.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/ProfileButton.d.ts +2 -2
- package/lib/typescript/module/ui/components/RequireOxyAuth.d.ts +1 -1
- package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts +16 -0
- package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts +26 -0
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +17 -2
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts +19 -9
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
- package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +7 -11
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +31 -0
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +14 -2
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +24 -16
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +2 -60
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts +16 -0
- package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts +51 -0
- package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +135 -0
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaces.d.ts +79 -0
- package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.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 +0 -4
- 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/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileScreen.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/FileManagementScreen.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 +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/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/fileManagement/hooks/useFileUploadState.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/types/navigation.d.ts +8 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/surfaceScreen.d.ts +38 -0
- package/lib/typescript/module/ui/types/surfaceScreen.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/index.ts +12 -5
- package/src/ui/components/OxyAccountDialogScreen.tsx +148 -0
- package/src/ui/components/OxyAuthChooser.tsx +153 -33
- package/src/ui/components/OxyConsentScreen.tsx +1 -1
- package/src/ui/components/OxyProvider.tsx +12 -34
- package/src/ui/components/ProfileButton.tsx +2 -2
- package/src/ui/components/RequireOxyAuth.tsx +1 -1
- package/src/ui/components/SurfaceHeaderAction.tsx +60 -0
- package/src/ui/components/SurfaceScreen.tsx +226 -0
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +50 -36
- package/src/ui/components/modals/DeleteAccountModal.tsx +47 -26
- package/src/ui/components/oxyAuthChooserStyles.ts +22 -12
- package/src/ui/components/surfaces/ActionSheetSurface.tsx +98 -0
- package/src/ui/context/OxyContext.tsx +43 -3
- package/src/ui/hooks/useAvatarPicker.ts +53 -66
- package/src/ui/hooks/useSurfaceHeader.ts +56 -0
- package/src/ui/hooks/useSwitchableAccounts.ts +1 -1
- package/src/ui/navigation/__tests__/getSurfaceConfig.test.ts +39 -0
- package/src/ui/navigation/__tests__/surfaceNavStack.test.ts +68 -0
- package/src/ui/navigation/accountDialogManager.ts +14 -2
- package/src/ui/navigation/bottomSheetManager.ts +46 -73
- package/src/ui/navigation/routes.ts +7 -106
- package/src/ui/navigation/surfaceBackBridge.ts +69 -0
- package/src/ui/navigation/surfaceNavStack.ts +110 -0
- package/src/ui/navigation/surfaceRegistry.ts +240 -0
- package/src/ui/navigation/surfaces.ts +272 -0
- package/src/ui/screens/AccountMembersScreen.tsx +39 -100
- package/src/ui/screens/AccountSettingsScreen.tsx +32 -54
- package/src/ui/screens/AccountVerificationScreen.tsx +23 -51
- package/src/ui/screens/AppInfoScreen.tsx +6 -13
- package/src/ui/screens/AvatarCropScreen.tsx +8 -17
- package/src/ui/screens/ConnectedAppsScreen.tsx +39 -60
- package/src/ui/screens/CreateAccountScreen.tsx +13 -39
- package/src/ui/screens/EditProfileFieldScreen.tsx +30 -48
- package/src/ui/screens/EditProfileScreen.tsx +7 -16
- package/src/ui/screens/FAQScreen.tsx +9 -13
- package/src/ui/screens/FeedbackScreen.tsx +8 -22
- package/src/ui/screens/FileManagementScreen.tsx +191 -188
- package/src/ui/screens/HelpSupportScreen.tsx +7 -13
- package/src/ui/screens/HistoryViewScreen.tsx +26 -31
- package/src/ui/screens/LanguageSelectorScreen.tsx +12 -46
- package/src/ui/screens/LearnMoreUsernamesScreen.tsx +8 -16
- package/src/ui/screens/LegalDocumentsScreen.tsx +7 -22
- package/src/ui/screens/ManageAccountScreen.tsx +96 -165
- package/src/ui/screens/NotificationsScreen.tsx +7 -13
- package/src/ui/screens/PaymentGatewayScreen.tsx +3 -10
- package/src/ui/screens/PreferencesScreen.tsx +7 -13
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +52 -90
- package/src/ui/screens/PrivacySettingsScreen.tsx +9 -21
- package/src/ui/screens/ProfileScreen.tsx +9 -11
- package/src/ui/screens/SavesCollectionsScreen.tsx +7 -13
- package/src/ui/screens/SearchSettingsScreen.tsx +9 -21
- package/src/ui/screens/UserLinksScreen.tsx +7 -14
- package/src/ui/screens/UserListScreen.tsx +2 -5
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +1 -1
- package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +9 -7
- package/src/ui/screens/trust/TrustAboutScreen.tsx +10 -17
- package/src/ui/screens/trust/TrustCenterScreen.tsx +9 -28
- package/src/ui/screens/trust/TrustFAQScreen.tsx +15 -18
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +3 -5
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +11 -26
- package/src/ui/screens/trust/TrustRulesScreen.tsx +10 -13
- package/src/ui/types/navigation.ts +8 -0
- package/src/ui/types/surfaceScreen.ts +38 -0
- package/lib/commonjs/ui/components/BottomSheet.js +0 -49
- package/lib/commonjs/ui/components/BottomSheet.js.map +0 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +0 -298
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +0 -1
- package/lib/commonjs/ui/components/Header.js +0 -305
- package/lib/commonjs/ui/components/Header.js.map +0 -1
- package/lib/commonjs/ui/components/OxyAccountDialog.js +0 -259
- package/lib/commonjs/ui/components/OxyAccountDialog.js.map +0 -1
- package/lib/module/ui/components/BottomSheet.js +0 -45
- package/lib/module/ui/components/BottomSheet.js.map +0 -1
- package/lib/module/ui/components/BottomSheetRouter.js +0 -292
- package/lib/module/ui/components/BottomSheetRouter.js.map +0 -1
- package/lib/module/ui/components/Header.js +0 -299
- package/lib/module/ui/components/Header.js.map +0 -1
- package/lib/module/ui/components/OxyAccountDialog.js +0 -254
- package/lib/module/ui/components/OxyAccountDialog.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts +0 -29
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts +0 -9
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/Header.d.ts +0 -33
- package/lib/typescript/commonjs/ui/components/Header.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts +0 -37
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/BottomSheet.d.ts +0 -29
- package/lib/typescript/module/ui/components/BottomSheet.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts +0 -9
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Header.d.ts +0 -33
- package/lib/typescript/module/ui/components/Header.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts +0 -37
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +0 -1
- package/src/ui/components/BottomSheet.tsx +0 -48
- package/src/ui/components/BottomSheetRouter.tsx +0 -310
- package/src/ui/components/Header.tsx +0 -224
- package/src/ui/components/OxyAccountDialog.tsx +0 -243
- package/src/ui/navigation/__tests__/getSheetConfig.test.ts +0 -36
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React, { useState, useCallback } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
View,
|
|
4
|
-
ScrollView,
|
|
5
4
|
StyleSheet,
|
|
6
|
-
Platform,
|
|
7
|
-
KeyboardAvoidingView,
|
|
8
5
|
} from 'react-native';
|
|
9
6
|
import type { BaseScreenProps } from '../types/navigation';
|
|
10
|
-
import {
|
|
7
|
+
import { toast } from '@oxyhq/bloom';
|
|
8
|
+
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
11
9
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
12
10
|
import { H4, Text } from '@oxyhq/bloom/typography';
|
|
13
11
|
import { Button } from '@oxyhq/bloom/button';
|
|
@@ -15,8 +13,8 @@ import { TextField, TextFieldInput } from '@oxyhq/bloom/text-field';
|
|
|
15
13
|
import { IconCircle } from '@oxyhq/bloom/icon-circle';
|
|
16
14
|
import { BenefitList, BenefitRow } from '@oxyhq/bloom/benefit-list';
|
|
17
15
|
import * as Icons from '@oxyhq/bloom/icons';
|
|
18
|
-
import Header from '../components/Header';
|
|
19
16
|
import { useI18n } from '../hooks/useI18n';
|
|
17
|
+
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
20
18
|
import { useOxy } from '../context/OxyContext';
|
|
21
19
|
|
|
22
20
|
const AccountVerificationScreen: React.FC<BaseScreenProps> = ({
|
|
@@ -26,21 +24,13 @@ const AccountVerificationScreen: React.FC<BaseScreenProps> = ({
|
|
|
26
24
|
// Use useOxy() hook for OxyContext values
|
|
27
25
|
const { oxyServices } = useOxy();
|
|
28
26
|
const { t } = useI18n();
|
|
27
|
+
|
|
28
|
+
useSurfaceHeader({ title: t('accountVerification.title') || 'Account Verification' });
|
|
29
29
|
const bloomTheme = useTheme();
|
|
30
30
|
|
|
31
31
|
const [reason, setReason] = useState('');
|
|
32
32
|
const [evidence, setEvidence] = useState('');
|
|
33
33
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
34
|
-
const [successMessage, setSuccessMessage] = useState('');
|
|
35
|
-
|
|
36
|
-
// Dialog controls
|
|
37
|
-
const successDialog = useDialogControl();
|
|
38
|
-
|
|
39
|
-
const handleSuccessAcknowledged = useCallback(() => {
|
|
40
|
-
setReason('');
|
|
41
|
-
setEvidence('');
|
|
42
|
-
goBack?.();
|
|
43
|
-
}, [goBack]);
|
|
44
34
|
|
|
45
35
|
const handleSubmit = useCallback(async () => {
|
|
46
36
|
if (!reason.trim()) {
|
|
@@ -60,10 +50,18 @@ const AccountVerificationScreen: React.FC<BaseScreenProps> = ({
|
|
|
60
50
|
evidence.trim() || undefined
|
|
61
51
|
);
|
|
62
52
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
53
|
+
// Acknowledgement surface — dismiss (button OR backdrop) resets and
|
|
54
|
+
// returns; there is no negative action.
|
|
55
|
+
await surfaces.confirm({
|
|
56
|
+
title: t('accountVerification.successTitle') || 'Request Submitted',
|
|
57
|
+
message:
|
|
58
|
+
t('accountVerification.successMessage') || `Your verification request has been submitted. Request ID: ${result.requestId}`,
|
|
59
|
+
confirmLabel: t('accountVerification.ok') || 'OK',
|
|
60
|
+
hideCancel: true,
|
|
61
|
+
});
|
|
62
|
+
setReason('');
|
|
63
|
+
setEvidence('');
|
|
64
|
+
goBack?.();
|
|
67
65
|
} catch (error: unknown) {
|
|
68
66
|
if (__DEV__) {
|
|
69
67
|
console.error('Failed to submit verification request:', error);
|
|
@@ -74,28 +72,14 @@ const AccountVerificationScreen: React.FC<BaseScreenProps> = ({
|
|
|
74
72
|
} finally {
|
|
75
73
|
setIsSubmitting(false);
|
|
76
74
|
}
|
|
77
|
-
}, [reason, evidence, oxyServices, t,
|
|
75
|
+
}, [reason, evidence, oxyServices, t, goBack]);
|
|
78
76
|
|
|
79
77
|
const canSubmit = Boolean(reason.trim()) && !isSubmitting;
|
|
80
78
|
|
|
81
79
|
return (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
>
|
|
86
|
-
<Header
|
|
87
|
-
title={t('accountVerification.title') || 'Account Verification'}
|
|
88
|
-
onBack={goBack || onClose}
|
|
89
|
-
variant="minimal"
|
|
90
|
-
elevation="subtle"
|
|
91
|
-
/>
|
|
92
|
-
|
|
93
|
-
<ScrollView
|
|
94
|
-
className="flex-1 px-screen-margin"
|
|
95
|
-
showsVerticalScrollIndicator={false}
|
|
96
|
-
contentContainerClassName="pb-space-32"
|
|
97
|
-
keyboardShouldPersistTaps="handled"
|
|
98
|
-
>
|
|
80
|
+
<>
|
|
81
|
+
|
|
82
|
+
<View className="px-screen-margin pb-space-32">
|
|
99
83
|
{/* Hero */}
|
|
100
84
|
<View className="items-center py-space-24 gap-space-12">
|
|
101
85
|
<IconCircle icon={Icons.Verified_Stroke2_Corner2_Rounded} />
|
|
@@ -185,20 +169,8 @@ const AccountVerificationScreen: React.FC<BaseScreenProps> = ({
|
|
|
185
169
|
{t('accountVerification.note') || 'Note: Verification requests are reviewed manually and may take several days. We will notify you once your request has been reviewed.'}
|
|
186
170
|
</Text>
|
|
187
171
|
</View>
|
|
188
|
-
</
|
|
189
|
-
|
|
190
|
-
<Dialog
|
|
191
|
-
control={successDialog}
|
|
192
|
-
title={t('accountVerification.successTitle') || 'Request Submitted'}
|
|
193
|
-
description={successMessage}
|
|
194
|
-
actions={[
|
|
195
|
-
{
|
|
196
|
-
label: t('accountVerification.ok') || 'OK',
|
|
197
|
-
onPress: handleSuccessAcknowledged,
|
|
198
|
-
},
|
|
199
|
-
]}
|
|
200
|
-
/>
|
|
201
|
-
</KeyboardAvoidingView>
|
|
172
|
+
</View>
|
|
173
|
+
</>
|
|
202
174
|
);
|
|
203
175
|
};
|
|
204
176
|
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
Platform,
|
|
6
6
|
Dimensions,
|
|
7
7
|
Clipboard,
|
|
8
|
-
ScrollView,
|
|
9
8
|
ActivityIndicator,
|
|
10
9
|
} from 'react-native';
|
|
11
10
|
import type { BaseScreenProps } from '../types/navigation';
|
|
@@ -13,10 +12,10 @@ import { packageInfo } from '@oxyhq/core';
|
|
|
13
12
|
import { toast } from '@oxyhq/bloom';
|
|
14
13
|
import OxyServicesLogo from '../../assets/icons/OxyServices';
|
|
15
14
|
import { SettingsIcon } from '../components/SettingsIcon';
|
|
16
|
-
import Header from '../components/Header';
|
|
17
15
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
18
16
|
import { useOxy } from '../context/OxyContext';
|
|
19
17
|
import { useI18n } from '../hooks/useI18n';
|
|
18
|
+
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
20
19
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
21
20
|
|
|
22
21
|
interface SystemInfo {
|
|
@@ -37,6 +36,8 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
37
36
|
// Use useOxy() hook for OxyContext values
|
|
38
37
|
const { user, sessions, oxyServices, isAuthenticated } = useOxy();
|
|
39
38
|
const { t } = useI18n();
|
|
39
|
+
|
|
40
|
+
useSurfaceHeader({ title: t('appInfo.title') });
|
|
40
41
|
const [systemInfo, setSystemInfo] = useState<SystemInfo | null>(null);
|
|
41
42
|
const [isRunningSystemCheck, setIsRunningSystemCheck] = useState(false);
|
|
42
43
|
const [connectionStatus, setConnectionStatus] = useState<'checking' | 'connected' | 'disconnected' | 'unknown'>('unknown');
|
|
@@ -148,16 +149,9 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
148
149
|
};
|
|
149
150
|
|
|
150
151
|
return (
|
|
151
|
-
|
|
152
|
-
<Header
|
|
153
|
-
title={t('appInfo.title')}
|
|
154
|
-
onBack={goBack || onClose}
|
|
155
|
-
variant="minimal"
|
|
156
|
-
elevation="subtle"
|
|
157
|
-
/>
|
|
152
|
+
<>
|
|
158
153
|
|
|
159
|
-
<
|
|
160
|
-
<View className="px-screen-margin py-space-16 pb-space-24">
|
|
154
|
+
<View className="px-screen-margin py-space-16 pb-space-24">
|
|
161
155
|
{/* Package Information */}
|
|
162
156
|
<SettingsListGroup title={t('appInfo.sections.package')}>
|
|
163
157
|
<SettingsListItem
|
|
@@ -353,8 +347,7 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
353
347
|
/>
|
|
354
348
|
</SettingsListGroup>
|
|
355
349
|
</View>
|
|
356
|
-
|
|
357
|
-
</View>
|
|
350
|
+
</>
|
|
358
351
|
);
|
|
359
352
|
};
|
|
360
353
|
|
|
@@ -72,10 +72,6 @@ export interface AvatarCropScreenProps extends BaseScreenProps {
|
|
|
72
72
|
sourceWidth?: number;
|
|
73
73
|
/** Natural height of the source image (optional — measured if absent). */
|
|
74
74
|
sourceHeight?: number;
|
|
75
|
-
/** Called with the cropped file once the user confirms. */
|
|
76
|
-
onConfirm?: (result: AvatarCropResult) => void | Promise<void>;
|
|
77
|
-
/** Called if the user cancels without confirming. */
|
|
78
|
-
onCancel?: () => void;
|
|
79
75
|
}
|
|
80
76
|
|
|
81
77
|
/** Side length (in dp) of the crop viewport. The output is always 512x512px. */
|
|
@@ -296,13 +292,10 @@ async function hapticSelection(): Promise<void> {
|
|
|
296
292
|
}
|
|
297
293
|
|
|
298
294
|
const AvatarCropScreen: React.FC<AvatarCropScreenProps> = ({
|
|
299
|
-
|
|
300
|
-
onClose,
|
|
295
|
+
dismiss,
|
|
301
296
|
imageUri,
|
|
302
297
|
sourceWidth,
|
|
303
298
|
sourceHeight,
|
|
304
|
-
onConfirm,
|
|
305
|
-
onCancel,
|
|
306
299
|
}) => {
|
|
307
300
|
const theme = useTheme();
|
|
308
301
|
const { t } = useI18n();
|
|
@@ -765,16 +758,15 @@ const AvatarCropScreen: React.FC<AvatarCropScreenProps> = ({
|
|
|
765
758
|
|
|
766
759
|
void hapticNotification('success');
|
|
767
760
|
|
|
768
|
-
|
|
761
|
+
// Resolve the surface's present() promise with the cropped JPEG and
|
|
762
|
+
// close it. The awaiting caller (`useAvatarPicker`) handles the
|
|
763
|
+
// upload + any success toast.
|
|
764
|
+
dismiss?.({
|
|
769
765
|
uri: result.uri,
|
|
770
766
|
width: result.width,
|
|
771
767
|
height: result.height,
|
|
772
768
|
mime: 'image/jpeg',
|
|
773
769
|
});
|
|
774
|
-
|
|
775
|
-
// Close the sheet on success. The caller is responsible for any
|
|
776
|
-
// success toast (uploads typically toast their own outcome).
|
|
777
|
-
onClose?.();
|
|
778
770
|
} catch (err) {
|
|
779
771
|
const normalizedError = normalizeCropError(err);
|
|
780
772
|
logger.error('handleConfirm failed', normalizedError, { component: LOG_COMPONENT });
|
|
@@ -786,12 +778,11 @@ const AvatarCropScreen: React.FC<AvatarCropScreenProps> = ({
|
|
|
786
778
|
preparedImageCleanup?.();
|
|
787
779
|
setIsProcessing(false);
|
|
788
780
|
}
|
|
789
|
-
}, [baseFit, imageUri, naturalSize,
|
|
781
|
+
}, [baseFit, imageUri, naturalSize, dismiss, t]);
|
|
790
782
|
|
|
791
783
|
const handleCancel = useCallback(() => {
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
}, [goBack, onCancel]);
|
|
784
|
+
dismiss?.();
|
|
785
|
+
}, [dismiss]);
|
|
795
786
|
|
|
796
787
|
const topInset = Platform.OS === 'ios' ? Math.max(insets.top, 12) : Math.max(insets.top, 16);
|
|
797
788
|
const bottomInset = Math.max(insets.bottom, 16);
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import React, { useCallback, useState } from 'react';
|
|
2
2
|
import { ActivityIndicator, FlatList, RefreshControl, StyleSheet, View } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import { toast } from '@oxyhq/bloom';
|
|
4
|
+
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
4
5
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
5
6
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
6
7
|
import type { ConnectedApp } from '@oxyhq/core';
|
|
7
8
|
import { logger as loggerUtil } from '@oxyhq/core';
|
|
8
9
|
import type { BaseScreenProps } from '../types/navigation';
|
|
9
|
-
import Header from '../components/Header';
|
|
10
10
|
import { Avatar } from '@oxyhq/bloom/avatar';
|
|
11
11
|
import { Loading } from '@oxyhq/bloom/loading';
|
|
12
12
|
import { Text } from '@oxyhq/bloom/typography';
|
|
13
13
|
import { useI18n } from '../hooks/useI18n';
|
|
14
|
+
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
14
15
|
import { useOxy } from '../context/OxyContext';
|
|
15
16
|
import { useConnectedApps } from '../hooks/queries/useAccountQueries';
|
|
16
17
|
import { useRevokeConnectedApp } from '../hooks/mutations/useAccountMutations';
|
|
@@ -48,6 +49,8 @@ const formatRelative = (iso: string): string => {
|
|
|
48
49
|
const ConnectedAppsScreen: React.FC<BaseScreenProps> = ({ onClose, goBack }) => {
|
|
49
50
|
const bloomTheme = useTheme();
|
|
50
51
|
const { t } = useI18n();
|
|
52
|
+
|
|
53
|
+
useSurfaceHeader({ title: t('connectedApps.title') || 'Connected apps' });
|
|
51
54
|
const { isAuthenticated } = useOxy();
|
|
52
55
|
const {
|
|
53
56
|
data: apps,
|
|
@@ -56,46 +59,46 @@ const ConnectedAppsScreen: React.FC<BaseScreenProps> = ({ onClose, goBack }) =>
|
|
|
56
59
|
isRefetching,
|
|
57
60
|
} = useConnectedApps({ enabled: isAuthenticated });
|
|
58
61
|
const revokeMutation = useRevokeConnectedApp();
|
|
59
|
-
const revokeDialog = useDialogControl();
|
|
60
|
-
const [pendingRevoke, setPendingRevoke] = useState<ConnectedApp | null>(null);
|
|
61
62
|
const [revokingAppId, setRevokingAppId] = useState<string | null>(null);
|
|
62
63
|
|
|
63
64
|
const confirmRevoke = useCallback(
|
|
64
|
-
(app: ConnectedApp) => {
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
async (app: ConnectedApp) => {
|
|
66
|
+
const confirmed = await surfaces.confirm({
|
|
67
|
+
title: t('connectedApps.confirm.title') || 'Revoke access',
|
|
68
|
+
message:
|
|
69
|
+
t('connectedApps.confirm.message', { name: app.name })
|
|
70
|
+
|| `Revoke ${app.name}'s access to your Oxy account?`,
|
|
71
|
+
confirmLabel: t('common.revoke') || 'Revoke',
|
|
72
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
73
|
+
destructive: true,
|
|
74
|
+
});
|
|
75
|
+
if (!confirmed) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
setRevokingAppId(app.applicationId);
|
|
79
|
+
try {
|
|
80
|
+
await revokeMutation.mutateAsync(app.applicationId);
|
|
81
|
+
toast.success(
|
|
82
|
+
t('connectedApps.toasts.revoked', { name: app.name })
|
|
83
|
+
|| `Revoked access for ${app.name}`,
|
|
84
|
+
);
|
|
85
|
+
} catch (error) {
|
|
86
|
+
loggerUtil.warn(
|
|
87
|
+
'Revoke connected app failed',
|
|
88
|
+
{ component: 'ConnectedAppsScreen' },
|
|
89
|
+
error,
|
|
90
|
+
);
|
|
91
|
+
toast.error(
|
|
92
|
+
t('connectedApps.toasts.revokeFailed')
|
|
93
|
+
|| 'Failed to revoke access',
|
|
94
|
+
);
|
|
95
|
+
} finally {
|
|
96
|
+
setRevokingAppId(null);
|
|
97
|
+
}
|
|
67
98
|
},
|
|
68
|
-
[
|
|
99
|
+
[revokeMutation, t],
|
|
69
100
|
);
|
|
70
101
|
|
|
71
|
-
const handleRevoke = useCallback(async () => {
|
|
72
|
-
if (!pendingRevoke) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
const target = pendingRevoke;
|
|
76
|
-
setRevokingAppId(target.applicationId);
|
|
77
|
-
try {
|
|
78
|
-
await revokeMutation.mutateAsync(target.applicationId);
|
|
79
|
-
toast.success(
|
|
80
|
-
t('connectedApps.toasts.revoked', { name: target.name })
|
|
81
|
-
|| `Revoked access for ${target.name}`,
|
|
82
|
-
);
|
|
83
|
-
} catch (error) {
|
|
84
|
-
loggerUtil.warn(
|
|
85
|
-
'Revoke connected app failed',
|
|
86
|
-
{ component: 'ConnectedAppsScreen' },
|
|
87
|
-
error,
|
|
88
|
-
);
|
|
89
|
-
toast.error(
|
|
90
|
-
t('connectedApps.toasts.revokeFailed')
|
|
91
|
-
|| 'Failed to revoke access',
|
|
92
|
-
);
|
|
93
|
-
} finally {
|
|
94
|
-
setRevokingAppId(null);
|
|
95
|
-
setPendingRevoke(null);
|
|
96
|
-
}
|
|
97
|
-
}, [pendingRevoke, revokeMutation, t]);
|
|
98
|
-
|
|
99
102
|
const renderEmpty = useCallback(
|
|
100
103
|
() => (
|
|
101
104
|
<View className="flex-1 items-center justify-center py-space-32">
|
|
@@ -142,12 +145,6 @@ const ConnectedAppsScreen: React.FC<BaseScreenProps> = ({ onClose, goBack }) =>
|
|
|
142
145
|
|
|
143
146
|
return (
|
|
144
147
|
<View className="flex-1 bg-bg">
|
|
145
|
-
<Header
|
|
146
|
-
title={t('connectedApps.title') || 'Connected apps'}
|
|
147
|
-
onBack={goBack || onClose}
|
|
148
|
-
variant="minimal"
|
|
149
|
-
elevation="subtle"
|
|
150
|
-
/>
|
|
151
148
|
{isLoading && !apps ? (
|
|
152
149
|
<Loading size="large" color={bloomTheme.colors.primary} />
|
|
153
150
|
) : (
|
|
@@ -167,24 +164,6 @@ const ConnectedAppsScreen: React.FC<BaseScreenProps> = ({ onClose, goBack }) =>
|
|
|
167
164
|
}
|
|
168
165
|
/>
|
|
169
166
|
)}
|
|
170
|
-
<Dialog
|
|
171
|
-
control={revokeDialog}
|
|
172
|
-
title={t('connectedApps.confirm.title') || 'Revoke access'}
|
|
173
|
-
description={
|
|
174
|
-
pendingRevoke
|
|
175
|
-
? (t('connectedApps.confirm.message', { name: pendingRevoke.name })
|
|
176
|
-
|| `Revoke ${pendingRevoke.name}'s access to your Oxy account?`)
|
|
177
|
-
: ''
|
|
178
|
-
}
|
|
179
|
-
actions={[
|
|
180
|
-
{
|
|
181
|
-
label: t('common.revoke') || 'Revoke',
|
|
182
|
-
color: 'destructive',
|
|
183
|
-
onPress: handleRevoke,
|
|
184
|
-
},
|
|
185
|
-
{ label: t('common.cancel') || 'Cancel', color: 'cancel' },
|
|
186
|
-
]}
|
|
187
|
-
/>
|
|
188
167
|
</View>
|
|
189
168
|
);
|
|
190
169
|
};
|
|
@@ -2,20 +2,17 @@ import type React from 'react';
|
|
|
2
2
|
import { useState, useCallback, useRef, useEffect } from 'react';
|
|
3
3
|
import {
|
|
4
4
|
View,
|
|
5
|
-
Platform,
|
|
6
5
|
ActivityIndicator,
|
|
7
|
-
ScrollView,
|
|
8
|
-
KeyboardAvoidingView,
|
|
9
6
|
TouchableOpacity,
|
|
10
7
|
} from 'react-native';
|
|
11
8
|
import { Ionicons } from '@expo/vector-icons';
|
|
12
9
|
import type { AccountKind, CreateAccountInput, OrganizationCategory } from '@oxyhq/core';
|
|
13
10
|
import { ORGANIZATION_CATEGORIES } from '@oxyhq/core';
|
|
14
11
|
import type { BaseScreenProps } from '../types/navigation';
|
|
15
|
-
import Header from '../components/Header';
|
|
16
12
|
import { useI18n } from '../hooks/useI18n';
|
|
13
|
+
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
17
14
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
18
|
-
import {
|
|
15
|
+
import { Text } from '@oxyhq/bloom/typography';
|
|
19
16
|
import { Button } from '@oxyhq/bloom/button';
|
|
20
17
|
import { TextField, TextFieldInput } from '@oxyhq/bloom/text-field';
|
|
21
18
|
import { useOxy } from '../context/OxyContext';
|
|
@@ -106,6 +103,12 @@ const CreateAccountScreen: React.FC<BaseScreenProps> = ({
|
|
|
106
103
|
const { oxyServices, createAccount, switchToAccount } = useOxy();
|
|
107
104
|
const { t } = useI18n();
|
|
108
105
|
|
|
106
|
+
useSurfaceHeader({
|
|
107
|
+
title: t('accounts.create.title') || 'Create account',
|
|
108
|
+
subtitle: t('accounts.create.subtitle')
|
|
109
|
+
|| 'Create an account you control. It will have its own profile, members, and apps.',
|
|
110
|
+
});
|
|
111
|
+
|
|
109
112
|
const parentId = typeof parentAccountId === 'string' ? parentAccountId : undefined;
|
|
110
113
|
|
|
111
114
|
const [kind, setKind] = useState<CreatableAccountKind>('project');
|
|
@@ -231,37 +234,9 @@ const CreateAccountScreen: React.FC<BaseScreenProps> = ({
|
|
|
231
234
|
const title = t('accounts.create.title') || 'Create account';
|
|
232
235
|
|
|
233
236
|
return (
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
onBack={goBack}
|
|
238
|
-
onClose={onClose}
|
|
239
|
-
showBackButton={true}
|
|
240
|
-
showCloseButton={true}
|
|
241
|
-
elevation="subtle"
|
|
242
|
-
/>
|
|
243
|
-
|
|
244
|
-
<KeyboardAvoidingView
|
|
245
|
-
className="flex-1"
|
|
246
|
-
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
|
|
247
|
-
keyboardVerticalOffset={Platform.OS === 'ios' ? 88 : 0}
|
|
248
|
-
>
|
|
249
|
-
<ScrollView
|
|
250
|
-
className="flex-1"
|
|
251
|
-
contentContainerClassName="px-screen-margin pt-space-24 pb-space-32 gap-space-24"
|
|
252
|
-
showsVerticalScrollIndicator={false}
|
|
253
|
-
keyboardShouldPersistTaps="handled"
|
|
254
|
-
>
|
|
255
|
-
{/* Big Title */}
|
|
256
|
-
<View className="gap-space-8">
|
|
257
|
-
<H1 className="text-headerBold font-headerBold text-text">
|
|
258
|
-
{title}
|
|
259
|
-
</H1>
|
|
260
|
-
<Text className="text-body font-body text-text-secondary">
|
|
261
|
-
{t('accounts.create.subtitle')
|
|
262
|
-
|| 'Create an account you control. It will have its own profile, members, and apps.'}
|
|
263
|
-
</Text>
|
|
264
|
-
</View>
|
|
237
|
+
<>
|
|
238
|
+
|
|
239
|
+
<View className="px-screen-margin pt-space-16 pb-space-32 gap-space-24">
|
|
265
240
|
|
|
266
241
|
{/* Kind picker */}
|
|
267
242
|
<View className="gap-space-8">
|
|
@@ -419,9 +394,8 @@ const CreateAccountScreen: React.FC<BaseScreenProps> = ({
|
|
|
419
394
|
>
|
|
420
395
|
{title}
|
|
421
396
|
</Button>
|
|
422
|
-
</
|
|
423
|
-
|
|
424
|
-
</View>
|
|
397
|
+
</View>
|
|
398
|
+
</>
|
|
425
399
|
);
|
|
426
400
|
};
|
|
427
401
|
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
import React, { useState, useCallback, useMemo } from 'react';
|
|
1
|
+
import React, { useState, useCallback, useMemo, useRef } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
View,
|
|
4
|
-
Platform,
|
|
5
4
|
Image,
|
|
6
5
|
StyleSheet,
|
|
7
|
-
ScrollView,
|
|
8
6
|
TouchableOpacity,
|
|
9
7
|
type TextInputProps,
|
|
10
|
-
KeyboardAvoidingView,
|
|
11
8
|
} from 'react-native';
|
|
12
9
|
import { Ionicons } from '@expo/vector-icons';
|
|
13
10
|
import type { BaseScreenProps } from '../types/navigation';
|
|
14
11
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
15
|
-
import {
|
|
12
|
+
import { Text } from '@oxyhq/bloom/typography';
|
|
16
13
|
import { Button } from '@oxyhq/bloom/button';
|
|
17
14
|
import { TextField, TextFieldInput } from '@oxyhq/bloom/text-field';
|
|
18
15
|
import { normalizeTheme } from '@oxyhq/core';
|
|
19
16
|
import type { User } from '@oxyhq/core';
|
|
20
|
-
import Header from '../components/Header';
|
|
21
17
|
import { useI18n } from '../hooks/useI18n';
|
|
18
|
+
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
19
|
+
import { SurfaceHeaderAction } from '../components/SurfaceHeaderAction';
|
|
22
20
|
import { useOxy } from '../context/OxyContext';
|
|
23
21
|
import { useProfileEditing } from '../hooks/useProfileEditing';
|
|
24
22
|
import { toast } from '@oxyhq/bloom';
|
|
@@ -464,6 +462,26 @@ const EditProfileFieldScreen: React.FC<EditProfileFieldScreenProps> = ({
|
|
|
464
462
|
}
|
|
465
463
|
};
|
|
466
464
|
|
|
465
|
+
// Contribute the field title/subtitle + a Save action into the Dialog's own
|
|
466
|
+
// nav header (this screen renders no header of its own). `handleSave` closes
|
|
467
|
+
// over the live form values, so route it through a ref to keep the Save node
|
|
468
|
+
// stable across keystrokes (only re-created when the saving state flips).
|
|
469
|
+
const handleSaveRef = useRef(handleSave);
|
|
470
|
+
handleSaveRef.current = handleSave;
|
|
471
|
+
const onSavePress = useCallback(() => { void handleSaveRef.current(); }, []);
|
|
472
|
+
const saveAction = useMemo(
|
|
473
|
+
() => (
|
|
474
|
+
<SurfaceHeaderAction
|
|
475
|
+
label={isSaving ? (t('common.saving') || 'Saving…') : (t('common.save') || 'Save')}
|
|
476
|
+
onPress={onSavePress}
|
|
477
|
+
loading={isSaving}
|
|
478
|
+
disabled={isSaving}
|
|
479
|
+
/>
|
|
480
|
+
),
|
|
481
|
+
[isSaving, onSavePress, t],
|
|
482
|
+
);
|
|
483
|
+
useSurfaceHeader({ title: fieldConfig.title, subtitle: fieldConfig.subtitle, right: saveAction });
|
|
484
|
+
|
|
467
485
|
// Render a single field input
|
|
468
486
|
const renderField = (field: FieldConfig['fields'][0], index: number) => {
|
|
469
487
|
const error = fieldErrors[field.key];
|
|
@@ -569,48 +587,12 @@ const EditProfileFieldScreen: React.FC<EditProfileFieldScreenProps> = ({
|
|
|
569
587
|
};
|
|
570
588
|
|
|
571
589
|
return (
|
|
572
|
-
<
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
subtitle=""
|
|
579
|
-
onBack={onClose || goBack}
|
|
580
|
-
variant="minimal"
|
|
581
|
-
elevation="none"
|
|
582
|
-
actions={[{
|
|
583
|
-
text: isSaving ? (t('common.saving') || 'Saving...') : (t('common.save') || 'Save'),
|
|
584
|
-
onPress: handleSave,
|
|
585
|
-
disabled: isSaving,
|
|
586
|
-
loading: isSaving,
|
|
587
|
-
}]}
|
|
588
|
-
/>
|
|
589
|
-
|
|
590
|
-
<ScrollView
|
|
591
|
-
className="flex-1"
|
|
592
|
-
contentContainerClassName="px-screen-margin pt-space-24 pb-space-32 gap-space-24"
|
|
593
|
-
showsVerticalScrollIndicator={false}
|
|
594
|
-
keyboardShouldPersistTaps="handled"
|
|
595
|
-
>
|
|
596
|
-
{/* Big Title */}
|
|
597
|
-
<View className="gap-space-8">
|
|
598
|
-
<H1 className="text-headerBold font-headerBold text-text">
|
|
599
|
-
{fieldConfig.title}
|
|
600
|
-
</H1>
|
|
601
|
-
{fieldConfig.subtitle && (
|
|
602
|
-
<Text className="text-body font-body text-text-secondary">
|
|
603
|
-
{fieldConfig.subtitle}
|
|
604
|
-
</Text>
|
|
605
|
-
)}
|
|
606
|
-
</View>
|
|
607
|
-
|
|
608
|
-
{/* Form Content */}
|
|
609
|
-
<View className="gap-space-16 p-space-16 rounded-radius-20 bg-fill">
|
|
610
|
-
{fieldConfig.isList ? renderListContent() : fieldConfig.fields.map(renderField)}
|
|
611
|
-
</View>
|
|
612
|
-
</ScrollView>
|
|
613
|
-
</KeyboardAvoidingView>
|
|
590
|
+
<View className="px-screen-margin pt-space-16 pb-space-32 gap-space-24">
|
|
591
|
+
{/* Form Content */}
|
|
592
|
+
<View className="gap-space-16 p-space-16 rounded-radius-20 bg-fill">
|
|
593
|
+
{fieldConfig.isList ? renderListContent() : fieldConfig.fields.map(renderField)}
|
|
594
|
+
</View>
|
|
595
|
+
</View>
|
|
614
596
|
);
|
|
615
597
|
};
|
|
616
598
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
|
-
import { View
|
|
3
|
+
import { View } from 'react-native';
|
|
4
4
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
5
5
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
6
6
|
import { getAccountDisplayName } from '@oxyhq/core';
|
|
7
7
|
import type { BaseScreenProps } from '../types/navigation';
|
|
8
|
-
import Header from '../components/Header';
|
|
9
8
|
import { Avatar } from '@oxyhq/bloom/avatar';
|
|
10
9
|
import ProfileSummaryCard from '../components/ProfileSummaryCard';
|
|
11
10
|
import { SettingsIcon } from '../components/SettingsIcon';
|
|
12
11
|
import { useOxy } from '../context/OxyContext';
|
|
13
12
|
import { useI18n } from '../hooks/useI18n';
|
|
13
|
+
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
14
14
|
import type { ProfileFieldType } from './EditProfileFieldScreen';
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -22,11 +22,13 @@ import type { ProfileFieldType } from './EditProfileFieldScreen';
|
|
|
22
22
|
* {@link ManageAccountScreen} uses. This is the single entry into per-field
|
|
23
23
|
* editing — reached from ManageAccount's "Edit profile" row.
|
|
24
24
|
*/
|
|
25
|
-
const EditProfileScreen: React.FC<BaseScreenProps> = ({
|
|
25
|
+
const EditProfileScreen: React.FC<BaseScreenProps> = ({ navigate }) => {
|
|
26
26
|
const bloomTheme = useTheme();
|
|
27
27
|
const { t, locale } = useI18n();
|
|
28
28
|
const { user, oxyServices, openAvatarPicker } = useOxy();
|
|
29
29
|
|
|
30
|
+
useSurfaceHeader({ title: t('editProfile.title') || 'Edit Profile' });
|
|
31
|
+
|
|
30
32
|
const displayName = useMemo(() => getAccountDisplayName(user, locale), [user, locale]);
|
|
31
33
|
const avatarUri = useMemo(
|
|
32
34
|
() => (user?.avatar ? oxyServices.getFileDownloadUrl(user.avatar, 'thumb') : undefined),
|
|
@@ -51,17 +53,7 @@ const EditProfileScreen: React.FC<BaseScreenProps> = ({ onClose, goBack, navigat
|
|
|
51
53
|
const goToField = (fieldType: ProfileFieldType) => navigate?.('EditProfileField', { fieldType });
|
|
52
54
|
|
|
53
55
|
return (
|
|
54
|
-
|
|
55
|
-
<Header
|
|
56
|
-
title={t('editProfile.title') || 'Edit Profile'}
|
|
57
|
-
onBack={goBack || onClose}
|
|
58
|
-
elevation="subtle"
|
|
59
|
-
/>
|
|
60
|
-
<ScrollView
|
|
61
|
-
className="flex-1"
|
|
62
|
-
contentContainerClassName="px-screen-margin pb-space-24"
|
|
63
|
-
showsVerticalScrollIndicator={false}
|
|
64
|
-
>
|
|
56
|
+
<View className="px-screen-margin pt-space-16 pb-space-24">
|
|
65
57
|
{/* Profile card */}
|
|
66
58
|
<ProfileSummaryCard
|
|
67
59
|
displayName={displayName}
|
|
@@ -141,8 +133,7 @@ const EditProfileScreen: React.FC<BaseScreenProps> = ({ onClose, goBack, navigat
|
|
|
141
133
|
onPress={() => goToField('locations')}
|
|
142
134
|
/>
|
|
143
135
|
</SettingsListGroup>
|
|
144
|
-
</
|
|
145
|
-
</View>
|
|
136
|
+
</View>
|
|
146
137
|
);
|
|
147
138
|
};
|
|
148
139
|
|