@oxyhq/services 22.9.0 → 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/{OxyAccountDialog.js → OxyAccountDialogScreen.js} +25 -125
- 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/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 +52 -5
- package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -1
- 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 +23 -9
- 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/routes.js +3 -3
- 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/surfaceRegistry.js +52 -8
- package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaces.js +42 -5
- package/lib/commonjs/ui/navigation/surfaces.js.map +1 -1
- 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/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/module/index.js +12 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/{OxyAccountDialog.js → OxyAccountDialogScreen.js} +27 -127
- 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/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 +53 -6
- package/lib/module/ui/components/SurfaceScreen.js.map +1 -1
- 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 +23 -9
- 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/routes.js +3 -3
- 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/surfaceRegistry.js +52 -8
- package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -1
- package/lib/module/ui/navigation/surfaces.js +42 -5
- package/lib/module/ui/navigation/surfaces.js.map +1 -1
- 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/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/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/{OxyAccountDialog.d.ts → OxyAccountDialogScreen.d.ts} +4 -4
- 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/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 +4 -2
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -1
- 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/surfaceBackBridge.d.ts +16 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +31 -13
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -1
- 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/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/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/{OxyAccountDialog.d.ts → OxyAccountDialogScreen.d.ts} +4 -4
- 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/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 +4 -2
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -1
- 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/surfaceBackBridge.d.ts +16 -0
- package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +31 -13
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -1
- 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/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/package.json +2 -2
- package/src/index.ts +12 -5
- package/src/ui/components/{OxyAccountDialog.tsx → OxyAccountDialogScreen.tsx} +21 -110
- package/src/ui/components/OxyAuthChooser.tsx +153 -33
- package/src/ui/components/OxyConsentScreen.tsx +1 -1
- 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 +66 -6
- 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 +22 -8
- 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__/surfaceNavStack.test.ts +68 -0
- package/src/ui/navigation/accountDialogManager.ts +14 -2
- package/src/ui/navigation/routes.ts +3 -3
- package/src/ui/navigation/surfaceBackBridge.ts +69 -0
- package/src/ui/navigation/surfaceRegistry.ts +80 -14
- package/src/ui/navigation/surfaces.ts +33 -5
- 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/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/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.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.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.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.map +0 -1
- package/src/ui/components/Header.tsx +0 -224
|
@@ -10,12 +10,11 @@ var _bloom = require("@oxyhq/bloom");
|
|
|
10
10
|
var _theme = require("@oxyhq/bloom/theme");
|
|
11
11
|
var _settingsList = require("@oxyhq/bloom/settings-list");
|
|
12
12
|
var _core = require("@oxyhq/core");
|
|
13
|
-
var
|
|
13
|
+
var _useSurfaceHeader = require("../hooks/useSurfaceHeader.js");
|
|
14
14
|
var _loading = require("@oxyhq/bloom/loading");
|
|
15
15
|
var _SettingsIcon = require("../components/SettingsIcon.js");
|
|
16
16
|
var _useI18n = require("../hooks/useI18n.js");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
20
19
|
/** Component name used in `logger` context for filtered diagnostics. */const LOG_COMPONENT = 'LegalDocumentsScreen';
|
|
21
20
|
|
|
@@ -100,105 +99,89 @@ const LegalDocumentsScreen = ({
|
|
|
100
99
|
};
|
|
101
100
|
return titles[key];
|
|
102
101
|
};
|
|
102
|
+
(0, _useSurfaceHeader.useSurfaceHeader)({
|
|
103
|
+
title: documentType ? getPolicyTitle(documentType) : t('legal.title') || 'Legal Documents'
|
|
104
|
+
});
|
|
103
105
|
|
|
104
106
|
// Deep-link entry: show loading state while the document opens.
|
|
105
107
|
if (documentType) {
|
|
106
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
onBack: goBack || onClose,
|
|
111
|
-
variant: "minimal",
|
|
112
|
-
elevation: "subtle"
|
|
113
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_loading.Loading, {
|
|
114
|
-
size: "large",
|
|
115
|
-
color: bloomTheme.colors.text,
|
|
116
|
-
text: t('legal.opening') || 'Opening document...'
|
|
117
|
-
})]
|
|
108
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_loading.Loading, {
|
|
109
|
+
size: "large",
|
|
110
|
+
color: bloomTheme.colors.text,
|
|
111
|
+
text: t('legal.opening') || 'Opening document...'
|
|
118
112
|
});
|
|
119
113
|
}
|
|
120
114
|
|
|
121
115
|
// Default: show the full list of policies & guidelines.
|
|
122
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
123
|
-
className: "
|
|
124
|
-
children:
|
|
125
|
-
title: t('legal.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
name: "cookie",
|
|
192
|
-
color: bloomTheme.colors.textTertiary
|
|
193
|
-
}),
|
|
194
|
-
title: t('legal.cookiePolicy.title') || 'Cookie Policy',
|
|
195
|
-
description: t('legal.cookiePolicy.subtitle') || 'How we use cookies and similar technologies',
|
|
196
|
-
onPress: handleOpenPolicy('cookie'),
|
|
197
|
-
disabled: loading
|
|
198
|
-
})]
|
|
199
|
-
})
|
|
200
|
-
})
|
|
201
|
-
})]
|
|
116
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
117
|
+
className: "px-screen-margin py-space-16",
|
|
118
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_settingsList.SettingsListGroup, {
|
|
119
|
+
title: t('legal.policies') || 'Policies & Guidelines',
|
|
120
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
|
|
121
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
|
|
122
|
+
name: "shield-check",
|
|
123
|
+
color: bloomTheme.colors.success
|
|
124
|
+
}),
|
|
125
|
+
title: t('legal.privacyPolicy.title') || 'Privacy Policy',
|
|
126
|
+
description: t('legal.privacyPolicy.subtitle') || 'How we handle your data',
|
|
127
|
+
onPress: handleOpenPolicy('privacy'),
|
|
128
|
+
disabled: loading
|
|
129
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
|
|
130
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
|
|
131
|
+
name: "file-document",
|
|
132
|
+
color: bloomTheme.colors.primary
|
|
133
|
+
}),
|
|
134
|
+
title: t('legal.termsOfService.title') || 'Terms of Service',
|
|
135
|
+
description: t('legal.termsOfService.subtitle') || 'Terms and conditions of use',
|
|
136
|
+
onPress: handleOpenPolicy('terms'),
|
|
137
|
+
disabled: loading
|
|
138
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
|
|
139
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
|
|
140
|
+
name: "account-group",
|
|
141
|
+
color: bloomTheme.colors.secondary
|
|
142
|
+
}),
|
|
143
|
+
title: t('legal.communityGuidelines.title') || 'Community Guidelines',
|
|
144
|
+
description: t('legal.communityGuidelines.subtitle') || 'Rules and expectations for our community',
|
|
145
|
+
onPress: handleOpenPolicy('community'),
|
|
146
|
+
disabled: loading
|
|
147
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
|
|
148
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
|
|
149
|
+
name: "clock",
|
|
150
|
+
color: bloomTheme.colors.warning
|
|
151
|
+
}),
|
|
152
|
+
title: t('legal.dataRetention.title') || 'Data Retention Policy',
|
|
153
|
+
description: t('legal.dataRetention.subtitle') || 'How long we keep your data',
|
|
154
|
+
onPress: handleOpenPolicy('dataRetention'),
|
|
155
|
+
disabled: loading
|
|
156
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
|
|
157
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
|
|
158
|
+
name: "eye",
|
|
159
|
+
color: bloomTheme.colors.info
|
|
160
|
+
}),
|
|
161
|
+
title: t('legal.contentModeration.title') || 'Content Moderation Policy',
|
|
162
|
+
description: t('legal.contentModeration.subtitle') || 'How we moderate content',
|
|
163
|
+
onPress: handleOpenPolicy('contentModeration'),
|
|
164
|
+
disabled: loading
|
|
165
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
|
|
166
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
|
|
167
|
+
name: "heart",
|
|
168
|
+
color: bloomTheme.colors.error
|
|
169
|
+
}),
|
|
170
|
+
title: t('legal.childSafety.title') || 'Child Safety Policy',
|
|
171
|
+
description: t('legal.childSafety.subtitle') || 'Protecting minors on our platform',
|
|
172
|
+
onPress: handleOpenPolicy('childSafety'),
|
|
173
|
+
disabled: loading
|
|
174
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
|
|
175
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
|
|
176
|
+
name: "cookie",
|
|
177
|
+
color: bloomTheme.colors.textTertiary
|
|
178
|
+
}),
|
|
179
|
+
title: t('legal.cookiePolicy.title') || 'Cookie Policy',
|
|
180
|
+
description: t('legal.cookiePolicy.subtitle') || 'How we use cookies and similar technologies',
|
|
181
|
+
onPress: handleOpenPolicy('cookie'),
|
|
182
|
+
disabled: loading
|
|
183
|
+
})]
|
|
184
|
+
})
|
|
202
185
|
});
|
|
203
186
|
};
|
|
204
187
|
var _default = exports.default = /*#__PURE__*/_react.default.memo(LegalDocumentsScreen);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_bloom","_theme","_settingsList","_core","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_bloom","_theme","_settingsList","_core","_useSurfaceHeader","_loading","_SettingsIcon","_useI18n","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","LOG_COMPONENT","POLICY_URLS","privacy","terms","community","dataRetention","contentModeration","childSafety","cookie","STEP_TO_DOCUMENT","LegalDocumentsScreen","onClose","goBack","initialStep","useI18n","bloomTheme","useTheme","loading","setLoading","useState","documentType","handleOpenPolicy","useCallback","policyKey","url","canOpen","Linking","canOpenURL","openURL","toast","error","logger","component","React","useEffect","getPolicyTitle","key","titles","useSurfaceHeader","title","jsx","Loading","size","color","colors","text","View","className","children","jsxs","SettingsListGroup","SettingsListItem","icon","SettingsIcon","name","success","description","onPress","disabled","primary","secondary","warning","info","textTertiary","_default","exports","memo"],"sourceRoot":"../../../../src","sources":["ui/screens/LegalDocumentsScreen.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAEA,IAAAM,iBAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAA2C,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAD,wBAAAY,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAd,uBAAA,YAAAA,CAAAY,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,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CAAA6E,gBAAgB;QACbC,IAAI,eACA,IAAAxE,WAAA,CAAA4D,GAAA,EAAC9D,aAAA,CAAA2E,YAAY;UACTC,IAAI,EAAC,QAAQ;UACbX,KAAK,EAAE5B,UAAU,CAAC6B,MAAM,CAACmB;QAAa,CACzC,CACJ;QACDxB,KAAK,EAAEzD,CAAC,CAAC,0BAA0B,CAAC,IAAI,eAAgB;QACxD0E,WAAW,EACP1E,CAAC,CAAC,6BAA6B,CAAC,IAC7B,6CACN;QACD2E,OAAO,EAAEpC,gBAAgB,CAAC,QAAQ,CAAE;QACpCqC,QAAQ,EAAEzC;MAAQ,CACrB,CAAC;IAAA,CACa;EAAC,CAClB,CAAC;AAEvB,CAAC;AAAC,IAAA+C,QAAA,GAAAC,OAAA,CAAA1E,OAAA,gBAEa0C,cAAK,CAACiC,IAAI,CAACxD,oBAAoB,CAAC","ignoreList":[]}
|
|
@@ -8,16 +8,18 @@ var _react = require("react");
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _vectorIcons = require("@expo/vector-icons");
|
|
10
10
|
var _bloom = require("@oxyhq/bloom");
|
|
11
|
+
var _surfaces = require("@oxyhq/bloom/surfaces");
|
|
11
12
|
var _theme = require("@oxyhq/bloom/theme");
|
|
12
13
|
var _typography = require("@oxyhq/bloom/typography");
|
|
13
14
|
var _settingsList = require("@oxyhq/bloom/settings-list");
|
|
14
15
|
var _core = require("@oxyhq/core");
|
|
15
|
-
var _Header = _interopRequireDefault(require("../components/Header.js"));
|
|
16
16
|
var _ProfileSummaryCard = _interopRequireDefault(require("../components/ProfileSummaryCard.js"));
|
|
17
17
|
var _SettingsIcon = require("../components/SettingsIcon.js");
|
|
18
|
-
var _DeleteAccountModal =
|
|
18
|
+
var _DeleteAccountModal = require("../components/modals/DeleteAccountModal.js");
|
|
19
|
+
var _ActionSheetSurface = require("../components/surfaces/ActionSheetSurface.js");
|
|
19
20
|
var _OxyContext = require("../context/OxyContext.js");
|
|
20
21
|
var _useI18n = require("../hooks/useI18n.js");
|
|
22
|
+
var _useSurfaceHeader = require("../hooks/useSurfaceHeader.js");
|
|
21
23
|
var _useAccountQueries = require("../hooks/queries/useAccountQueries.js");
|
|
22
24
|
var _usePaymentQueries = require("../hooks/queries/usePaymentQueries.js");
|
|
23
25
|
var _useServicesQueries = require("../hooks/queries/useServicesQueries.js");
|
|
@@ -59,7 +61,7 @@ const formatRelative = dateString => {
|
|
|
59
61
|
* Replaces AccountOverview + AccountSettings + the per-account half of
|
|
60
62
|
* SessionManagement. Lists ONLY the active user's profile, sessions on this
|
|
61
63
|
* device, and security/destructive actions for THIS account. Multi-account
|
|
62
|
-
* surface lives in the unified `
|
|
64
|
+
* surface lives in the unified `OxyAccountDialogScreen` — keep these concerns separate.
|
|
63
65
|
*/
|
|
64
66
|
const ManageAccountScreen = ({
|
|
65
67
|
onClose,
|
|
@@ -71,6 +73,9 @@ const ManageAccountScreen = ({
|
|
|
71
73
|
t,
|
|
72
74
|
locale
|
|
73
75
|
} = (0, _useI18n.useI18n)();
|
|
76
|
+
(0, _useSurfaceHeader.useSurfaceHeader)({
|
|
77
|
+
title: t('manageAccount.title') || 'Manage your Oxy Account'
|
|
78
|
+
});
|
|
74
79
|
const {
|
|
75
80
|
user: contextUser,
|
|
76
81
|
isAuthenticated,
|
|
@@ -101,17 +106,10 @@ const ManageAccountScreen = ({
|
|
|
101
106
|
const {
|
|
102
107
|
data: deviceSessions,
|
|
103
108
|
isLoading: deviceSessionsLoading,
|
|
104
|
-
refetch: refetchDeviceSessions
|
|
105
|
-
isRefetching: deviceSessionsRefetching
|
|
109
|
+
refetch: refetchDeviceSessions
|
|
106
110
|
} = (0, _useServicesQueries.useDeviceSessions)({
|
|
107
111
|
enabled: isAuthenticated && !!activeSessionId
|
|
108
112
|
});
|
|
109
|
-
const signOutDialog = (0, _bloom.useDialogControl)();
|
|
110
|
-
const signOutAllDevicesDialog = (0, _bloom.useDialogControl)();
|
|
111
|
-
const removeDeviceDialog = (0, _bloom.useDialogControl)();
|
|
112
|
-
const downloadDataDialog = (0, _bloom.useDialogControl)();
|
|
113
|
-
const deleteAccountDialog = (0, _bloom.useDialogControl)();
|
|
114
|
-
const [pendingRemoveDevice, setPendingRemoveDevice] = (0, _react.useState)(null);
|
|
115
113
|
const [removingDeviceId, setRemovingDeviceId] = (0, _react.useState)(null);
|
|
116
114
|
const [signingOutAllDevices, setSigningOutAllDevices] = (0, _react.useState)(false);
|
|
117
115
|
const [signingOut, setSigningOut] = (0, _react.useState)(false);
|
|
@@ -124,6 +122,16 @@ const ManageAccountScreen = ({
|
|
|
124
122
|
if (signingOut) {
|
|
125
123
|
return;
|
|
126
124
|
}
|
|
125
|
+
const confirmed = await _surfaces.surfaces.confirm({
|
|
126
|
+
title: t('common.actions.signOut') || 'Sign out',
|
|
127
|
+
message: t('common.confirms.signOut') || 'Are you sure you want to sign out?',
|
|
128
|
+
confirmLabel: t('common.actions.signOut') || 'Sign out',
|
|
129
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
130
|
+
destructive: true
|
|
131
|
+
});
|
|
132
|
+
if (!confirmed) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
127
135
|
setSigningOut(true);
|
|
128
136
|
try {
|
|
129
137
|
await logout();
|
|
@@ -138,22 +146,29 @@ const ManageAccountScreen = ({
|
|
|
138
146
|
setSigningOut(false);
|
|
139
147
|
}
|
|
140
148
|
}, [signingOut, logout, t, onClose]);
|
|
141
|
-
const confirmRemoveDevice = (0, _react.useCallback)(device => {
|
|
142
|
-
|
|
143
|
-
removeDeviceDialog.open();
|
|
144
|
-
}, [removeDeviceDialog]);
|
|
145
|
-
const handleRemoveDevice = (0, _react.useCallback)(async () => {
|
|
146
|
-
if (!pendingRemoveDevice || !activeSessionId) {
|
|
149
|
+
const confirmRemoveDevice = (0, _react.useCallback)(async device => {
|
|
150
|
+
if (!activeSessionId) {
|
|
147
151
|
return;
|
|
148
152
|
}
|
|
149
|
-
const
|
|
150
|
-
|
|
153
|
+
const confirmed = await _surfaces.surfaces.confirm({
|
|
154
|
+
title: t('manageAccount.confirms.removeDeviceTitle') || 'Remove device',
|
|
155
|
+
message: t('manageAccount.confirms.removeDevice', {
|
|
156
|
+
name: device.deviceName
|
|
157
|
+
}) || `Sign out from "${device.deviceName}"?`,
|
|
158
|
+
confirmLabel: t('common.remove') || 'Remove',
|
|
159
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
160
|
+
destructive: true
|
|
161
|
+
});
|
|
162
|
+
if (!confirmed) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
setRemovingDeviceId(device.sessionId);
|
|
151
166
|
try {
|
|
152
|
-
await oxyServices.logoutSession(activeSessionId,
|
|
167
|
+
await oxyServices.logoutSession(activeSessionId, device.sessionId);
|
|
153
168
|
await refetchDeviceSessions();
|
|
154
169
|
_bloom.toast.success(t('manageAccount.toasts.deviceRemoved', {
|
|
155
|
-
name:
|
|
156
|
-
}) || `Signed out from ${
|
|
170
|
+
name: device.deviceName
|
|
171
|
+
}) || `Signed out from ${device.deviceName}`);
|
|
157
172
|
} catch (error) {
|
|
158
173
|
_core.logger.warn('Remove device failed', {
|
|
159
174
|
component: 'ManageAccountScreen'
|
|
@@ -161,13 +176,25 @@ const ManageAccountScreen = ({
|
|
|
161
176
|
_bloom.toast.error(t('manageAccount.toasts.deviceRemoveFailed') || 'Failed to remove device');
|
|
162
177
|
} finally {
|
|
163
178
|
setRemovingDeviceId(null);
|
|
164
|
-
setPendingRemoveDevice(null);
|
|
165
179
|
}
|
|
166
|
-
}, [
|
|
180
|
+
}, [activeSessionId, oxyServices, refetchDeviceSessions, t]);
|
|
167
181
|
const handleSignOutAllDevices = (0, _react.useCallback)(async () => {
|
|
168
182
|
if (!activeSessionId || signingOutAllDevices) {
|
|
169
183
|
return;
|
|
170
184
|
}
|
|
185
|
+
const otherDeviceCount = (deviceSessions ?? []).filter(device => !device.isCurrent).length;
|
|
186
|
+
const confirmed = await _surfaces.surfaces.confirm({
|
|
187
|
+
title: t('manageAccount.confirms.signOutAllDevicesTitle') || 'Sign out of all other devices',
|
|
188
|
+
message: t('manageAccount.confirms.signOutAllDevices', {
|
|
189
|
+
count: otherDeviceCount
|
|
190
|
+
}) || `End ${otherDeviceCount} other device session(s)? This won't sign you out here.`,
|
|
191
|
+
confirmLabel: t('common.actions.signOut') || 'Sign out',
|
|
192
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
193
|
+
destructive: true
|
|
194
|
+
});
|
|
195
|
+
if (!confirmed) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
171
198
|
setSigningOutAllDevices(true);
|
|
172
199
|
try {
|
|
173
200
|
await oxyServices.logoutAllDeviceSessions(activeSessionId);
|
|
@@ -181,7 +208,7 @@ const ManageAccountScreen = ({
|
|
|
181
208
|
} finally {
|
|
182
209
|
setSigningOutAllDevices(false);
|
|
183
210
|
}
|
|
184
|
-
}, [activeSessionId, signingOutAllDevices, oxyServices, refetchDeviceSessions, t]);
|
|
211
|
+
}, [activeSessionId, signingOutAllDevices, deviceSessions, oxyServices, refetchDeviceSessions, t]);
|
|
185
212
|
const performDownload = (0, _react.useCallback)(async format => {
|
|
186
213
|
if (!user) {
|
|
187
214
|
_bloom.toast.error(t('accountOverview.items.downloadData.error') || 'Service not available');
|
|
@@ -208,78 +235,80 @@ const ManageAccountScreen = ({
|
|
|
208
235
|
_bloom.toast.error((error instanceof Error ? error.message : null) || t('accountOverview.items.downloadData.error') || 'Failed to download data');
|
|
209
236
|
}
|
|
210
237
|
}, [oxyServices, user, t]);
|
|
238
|
+
|
|
239
|
+
// Runs the actual deletion from inside the delete-account surface; it throws
|
|
240
|
+
// on failure so the surface can surface the error and stay open. Sign-out +
|
|
241
|
+
// close happen in `handleDeleteAccount` once the surface resolves `true`.
|
|
211
242
|
const handleConfirmDelete = (0, _react.useCallback)(async confirmText => {
|
|
212
243
|
if (!user) {
|
|
213
244
|
throw new Error(t('accountOverview.items.deleteAccount.error') || 'Service not available');
|
|
214
245
|
}
|
|
215
246
|
await oxyServices.deleteAccount(confirmText);
|
|
216
247
|
_bloom.toast.success(t('accountOverview.items.deleteAccount.success') || 'Account deleted successfully');
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
onClose?.();
|
|
220
|
-
}, [oxyServices, user, logout, onClose, t, deleteAccountDialog]);
|
|
221
|
-
const handleDownloadData = (0, _react.useCallback)(() => {
|
|
248
|
+
}, [oxyServices, user, t]);
|
|
249
|
+
const handleDownloadData = (0, _react.useCallback)(async () => {
|
|
222
250
|
if (!user) {
|
|
223
251
|
_bloom.toast.error(t('accountOverview.items.downloadData.error') || 'Service not available');
|
|
224
252
|
return;
|
|
225
253
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
254
|
+
const format = await (0, _ActionSheetSurface.presentActionSheet)({
|
|
255
|
+
title: t('accountOverview.items.downloadData.confirmTitle') || 'Download account data',
|
|
256
|
+
message: t('accountOverview.items.downloadData.confirmMessage') || 'Choose the format for your account data export:',
|
|
257
|
+
options: [{
|
|
258
|
+
label: 'JSON',
|
|
259
|
+
value: 'json'
|
|
260
|
+
}, {
|
|
261
|
+
label: 'CSV',
|
|
262
|
+
value: 'csv'
|
|
263
|
+
}],
|
|
264
|
+
cancelLabel: t('common.cancel') || 'Cancel'
|
|
265
|
+
});
|
|
266
|
+
if (format) {
|
|
267
|
+
await performDownload(format);
|
|
268
|
+
}
|
|
269
|
+
}, [user, t, performDownload]);
|
|
270
|
+
const handleDeleteAccount = (0, _react.useCallback)(async () => {
|
|
229
271
|
if (!user) {
|
|
230
272
|
_bloom.toast.error(t('accountOverview.items.deleteAccount.error') || 'User not available');
|
|
231
273
|
return;
|
|
232
274
|
}
|
|
233
|
-
|
|
234
|
-
|
|
275
|
+
const deleted = await (0, _DeleteAccountModal.presentDeleteAccount)({
|
|
276
|
+
username: user.username || '',
|
|
277
|
+
onDelete: handleConfirmDelete,
|
|
278
|
+
t
|
|
279
|
+
});
|
|
280
|
+
if (deleted) {
|
|
281
|
+
await logout();
|
|
282
|
+
onClose?.();
|
|
283
|
+
}
|
|
284
|
+
}, [user, t, handleConfirmDelete, logout, onClose]);
|
|
235
285
|
if (!isAuthenticated) {
|
|
236
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
title: t('manageAccount.title') || 'Manage your Oxy Account',
|
|
240
|
-
onBack: goBack || onClose,
|
|
241
|
-
elevation: "subtle"
|
|
242
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
243
|
-
style: styles.center,
|
|
286
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
287
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
288
|
+
className: "items-center py-space-40",
|
|
244
289
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
245
290
|
className: "text-text font-medium text-base",
|
|
246
291
|
children: t('common.status.notSignedIn') || 'Not signed in'
|
|
247
292
|
})
|
|
248
|
-
})
|
|
293
|
+
})
|
|
249
294
|
});
|
|
250
295
|
}
|
|
251
296
|
if (userLoading && !user) {
|
|
252
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
title: t('manageAccount.title') || 'Manage your Oxy Account',
|
|
256
|
-
onBack: goBack || onClose,
|
|
257
|
-
elevation: "subtle"
|
|
258
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
259
|
-
style: styles.center,
|
|
297
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
298
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
299
|
+
className: "items-center py-space-40",
|
|
260
300
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
261
301
|
color: bloomTheme.colors.primary,
|
|
262
302
|
size: "large"
|
|
263
303
|
})
|
|
264
|
-
})
|
|
304
|
+
})
|
|
265
305
|
});
|
|
266
306
|
}
|
|
267
307
|
const deviceRows = deviceSessions ?? [];
|
|
268
308
|
const otherDevices = deviceRows.filter(d => !d.isCurrent);
|
|
269
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
title: t('manageAccount.title') || 'Manage your Oxy Account',
|
|
273
|
-
onBack: goBack || onClose,
|
|
274
|
-
elevation: "subtle"
|
|
275
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
|
|
276
|
-
className: "flex-1",
|
|
277
|
-
contentContainerClassName: "px-screen-margin pb-space-24",
|
|
278
|
-
refreshControl: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.RefreshControl, {
|
|
279
|
-
refreshing: deviceSessionsRefetching,
|
|
280
|
-
onRefresh: refetchDeviceSessions,
|
|
281
|
-
tintColor: bloomTheme.colors.primary
|
|
282
|
-
}),
|
|
309
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
310
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
311
|
+
className: "px-screen-margin pb-space-24",
|
|
283
312
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ProfileSummaryCard.default, {
|
|
284
313
|
displayName: displayName,
|
|
285
314
|
avatarUri: avatarUri,
|
|
@@ -377,7 +406,7 @@ const ManageAccountScreen = ({
|
|
|
377
406
|
description: t('manageAccount.sessions.signOutAllSubtitle', {
|
|
378
407
|
count: otherDevices.length
|
|
379
408
|
}) || `End ${otherDevices.length} other device session(s)`,
|
|
380
|
-
onPress:
|
|
409
|
+
onPress: handleSignOutAllDevices,
|
|
381
410
|
destructive: true,
|
|
382
411
|
showChevron: false,
|
|
383
412
|
disabled: signingOutAllDevices,
|
|
@@ -581,7 +610,7 @@ const ManageAccountScreen = ({
|
|
|
581
610
|
color: bloomTheme.colors.error
|
|
582
611
|
}),
|
|
583
612
|
title: t('manageAccount.signOutOfThisAccount') || 'Sign out of this account',
|
|
584
|
-
onPress:
|
|
613
|
+
onPress: handleSignOut,
|
|
585
614
|
destructive: true,
|
|
586
615
|
showChevron: false,
|
|
587
616
|
disabled: signingOut,
|
|
@@ -601,66 +630,7 @@ const ManageAccountScreen = ({
|
|
|
601
630
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
602
631
|
style: styles.footerSpacer
|
|
603
632
|
})]
|
|
604
|
-
})
|
|
605
|
-
control: signOutDialog,
|
|
606
|
-
title: t('common.actions.signOut') || 'Sign out',
|
|
607
|
-
description: t('common.confirms.signOut') || 'Are you sure you want to sign out?',
|
|
608
|
-
actions: [{
|
|
609
|
-
label: t('common.actions.signOut') || 'Sign out',
|
|
610
|
-
color: 'destructive',
|
|
611
|
-
onPress: handleSignOut
|
|
612
|
-
}, {
|
|
613
|
-
label: t('common.cancel') || 'Cancel',
|
|
614
|
-
color: 'cancel'
|
|
615
|
-
}]
|
|
616
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
|
|
617
|
-
control: signOutAllDevicesDialog,
|
|
618
|
-
title: t('manageAccount.confirms.signOutAllDevicesTitle') || 'Sign out of all other devices',
|
|
619
|
-
description: t('manageAccount.confirms.signOutAllDevices', {
|
|
620
|
-
count: otherDevices.length
|
|
621
|
-
}) || `End ${otherDevices.length} other device session(s)? This won't sign you out here.`,
|
|
622
|
-
actions: [{
|
|
623
|
-
label: t('common.actions.signOut') || 'Sign out',
|
|
624
|
-
color: 'destructive',
|
|
625
|
-
onPress: handleSignOutAllDevices
|
|
626
|
-
}, {
|
|
627
|
-
label: t('common.cancel') || 'Cancel',
|
|
628
|
-
color: 'cancel'
|
|
629
|
-
}]
|
|
630
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
|
|
631
|
-
control: removeDeviceDialog,
|
|
632
|
-
title: t('manageAccount.confirms.removeDeviceTitle') || 'Remove device',
|
|
633
|
-
description: pendingRemoveDevice ? t('manageAccount.confirms.removeDevice', {
|
|
634
|
-
name: pendingRemoveDevice.deviceName
|
|
635
|
-
}) || `Sign out from "${pendingRemoveDevice.deviceName}"?` : '',
|
|
636
|
-
actions: [{
|
|
637
|
-
label: t('common.remove') || 'Remove',
|
|
638
|
-
color: 'destructive',
|
|
639
|
-
onPress: handleRemoveDevice
|
|
640
|
-
}, {
|
|
641
|
-
label: t('common.cancel') || 'Cancel',
|
|
642
|
-
color: 'cancel'
|
|
643
|
-
}]
|
|
644
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
|
|
645
|
-
control: downloadDataDialog,
|
|
646
|
-
title: t('accountOverview.items.downloadData.confirmTitle') || 'Download account data',
|
|
647
|
-
description: t('accountOverview.items.downloadData.confirmMessage') || 'Choose the format for your account data export:',
|
|
648
|
-
actions: [{
|
|
649
|
-
label: 'JSON',
|
|
650
|
-
onPress: () => performDownload('json')
|
|
651
|
-
}, {
|
|
652
|
-
label: 'CSV',
|
|
653
|
-
onPress: () => performDownload('csv')
|
|
654
|
-
}, {
|
|
655
|
-
label: t('common.cancel') || 'Cancel',
|
|
656
|
-
color: 'cancel'
|
|
657
|
-
}]
|
|
658
|
-
}), user ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_DeleteAccountModal.default, {
|
|
659
|
-
control: deleteAccountDialog,
|
|
660
|
-
username: user.username || '',
|
|
661
|
-
onDelete: handleConfirmDelete,
|
|
662
|
-
t: t
|
|
663
|
-
}) : null]
|
|
633
|
+
})
|
|
664
634
|
});
|
|
665
635
|
};
|
|
666
636
|
|
|
@@ -669,11 +639,6 @@ const ManageAccountScreen = ({
|
|
|
669
639
|
// spacing, radius, and typography roles live on Bloom components + NativeWind
|
|
670
640
|
// token classes.
|
|
671
641
|
const styles = _reactNative.StyleSheet.create({
|
|
672
|
-
center: {
|
|
673
|
-
flex: 1,
|
|
674
|
-
alignItems: 'center',
|
|
675
|
-
justifyContent: 'center'
|
|
676
|
-
},
|
|
677
642
|
footerSpacer: {
|
|
678
643
|
height: 24
|
|
679
644
|
}
|