@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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React, { useState, useCallback } from 'react';
|
|
4
|
-
import { View,
|
|
4
|
+
import { View, Linking } from 'react-native';
|
|
5
5
|
import { toast } from '@oxyhq/bloom';
|
|
6
6
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
7
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
8
8
|
import { logger } from '@oxyhq/core';
|
|
9
|
-
import
|
|
9
|
+
import { useSurfaceHeader } from "../hooks/useSurfaceHeader.js";
|
|
10
10
|
import { Loading } from '@oxyhq/bloom/loading';
|
|
11
11
|
import { SettingsIcon } from "../components/SettingsIcon.js";
|
|
12
12
|
import { useI18n } from "../hooks/useI18n.js";
|
|
@@ -96,105 +96,89 @@ const LegalDocumentsScreen = ({
|
|
|
96
96
|
};
|
|
97
97
|
return titles[key];
|
|
98
98
|
};
|
|
99
|
+
useSurfaceHeader({
|
|
100
|
+
title: documentType ? getPolicyTitle(documentType) : t('legal.title') || 'Legal Documents'
|
|
101
|
+
});
|
|
99
102
|
|
|
100
103
|
// Deep-link entry: show loading state while the document opens.
|
|
101
104
|
if (documentType) {
|
|
102
|
-
return /*#__PURE__*/
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
onBack: goBack || onClose,
|
|
107
|
-
variant: "minimal",
|
|
108
|
-
elevation: "subtle"
|
|
109
|
-
}), /*#__PURE__*/_jsx(Loading, {
|
|
110
|
-
size: "large",
|
|
111
|
-
color: bloomTheme.colors.text,
|
|
112
|
-
text: t('legal.opening') || 'Opening document...'
|
|
113
|
-
})]
|
|
105
|
+
return /*#__PURE__*/_jsx(Loading, {
|
|
106
|
+
size: "large",
|
|
107
|
+
color: bloomTheme.colors.text,
|
|
108
|
+
text: t('legal.opening') || 'Opening document...'
|
|
114
109
|
});
|
|
115
110
|
}
|
|
116
111
|
|
|
117
112
|
// Default: show the full list of policies & guidelines.
|
|
118
|
-
return /*#__PURE__*/
|
|
119
|
-
className: "
|
|
120
|
-
children:
|
|
121
|
-
title: t('legal.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
-
name: "cookie",
|
|
188
|
-
color: bloomTheme.colors.textTertiary
|
|
189
|
-
}),
|
|
190
|
-
title: t('legal.cookiePolicy.title') || 'Cookie Policy',
|
|
191
|
-
description: t('legal.cookiePolicy.subtitle') || 'How we use cookies and similar technologies',
|
|
192
|
-
onPress: handleOpenPolicy('cookie'),
|
|
193
|
-
disabled: loading
|
|
194
|
-
})]
|
|
195
|
-
})
|
|
196
|
-
})
|
|
197
|
-
})]
|
|
113
|
+
return /*#__PURE__*/_jsx(View, {
|
|
114
|
+
className: "px-screen-margin py-space-16",
|
|
115
|
+
children: /*#__PURE__*/_jsxs(SettingsListGroup, {
|
|
116
|
+
title: t('legal.policies') || 'Policies & Guidelines',
|
|
117
|
+
children: [/*#__PURE__*/_jsx(SettingsListItem, {
|
|
118
|
+
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
119
|
+
name: "shield-check",
|
|
120
|
+
color: bloomTheme.colors.success
|
|
121
|
+
}),
|
|
122
|
+
title: t('legal.privacyPolicy.title') || 'Privacy Policy',
|
|
123
|
+
description: t('legal.privacyPolicy.subtitle') || 'How we handle your data',
|
|
124
|
+
onPress: handleOpenPolicy('privacy'),
|
|
125
|
+
disabled: loading
|
|
126
|
+
}), /*#__PURE__*/_jsx(SettingsListItem, {
|
|
127
|
+
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
128
|
+
name: "file-document",
|
|
129
|
+
color: bloomTheme.colors.primary
|
|
130
|
+
}),
|
|
131
|
+
title: t('legal.termsOfService.title') || 'Terms of Service',
|
|
132
|
+
description: t('legal.termsOfService.subtitle') || 'Terms and conditions of use',
|
|
133
|
+
onPress: handleOpenPolicy('terms'),
|
|
134
|
+
disabled: loading
|
|
135
|
+
}), /*#__PURE__*/_jsx(SettingsListItem, {
|
|
136
|
+
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
137
|
+
name: "account-group",
|
|
138
|
+
color: bloomTheme.colors.secondary
|
|
139
|
+
}),
|
|
140
|
+
title: t('legal.communityGuidelines.title') || 'Community Guidelines',
|
|
141
|
+
description: t('legal.communityGuidelines.subtitle') || 'Rules and expectations for our community',
|
|
142
|
+
onPress: handleOpenPolicy('community'),
|
|
143
|
+
disabled: loading
|
|
144
|
+
}), /*#__PURE__*/_jsx(SettingsListItem, {
|
|
145
|
+
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
146
|
+
name: "clock",
|
|
147
|
+
color: bloomTheme.colors.warning
|
|
148
|
+
}),
|
|
149
|
+
title: t('legal.dataRetention.title') || 'Data Retention Policy',
|
|
150
|
+
description: t('legal.dataRetention.subtitle') || 'How long we keep your data',
|
|
151
|
+
onPress: handleOpenPolicy('dataRetention'),
|
|
152
|
+
disabled: loading
|
|
153
|
+
}), /*#__PURE__*/_jsx(SettingsListItem, {
|
|
154
|
+
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
155
|
+
name: "eye",
|
|
156
|
+
color: bloomTheme.colors.info
|
|
157
|
+
}),
|
|
158
|
+
title: t('legal.contentModeration.title') || 'Content Moderation Policy',
|
|
159
|
+
description: t('legal.contentModeration.subtitle') || 'How we moderate content',
|
|
160
|
+
onPress: handleOpenPolicy('contentModeration'),
|
|
161
|
+
disabled: loading
|
|
162
|
+
}), /*#__PURE__*/_jsx(SettingsListItem, {
|
|
163
|
+
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
164
|
+
name: "heart",
|
|
165
|
+
color: bloomTheme.colors.error
|
|
166
|
+
}),
|
|
167
|
+
title: t('legal.childSafety.title') || 'Child Safety Policy',
|
|
168
|
+
description: t('legal.childSafety.subtitle') || 'Protecting minors on our platform',
|
|
169
|
+
onPress: handleOpenPolicy('childSafety'),
|
|
170
|
+
disabled: loading
|
|
171
|
+
}), /*#__PURE__*/_jsx(SettingsListItem, {
|
|
172
|
+
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
173
|
+
name: "cookie",
|
|
174
|
+
color: bloomTheme.colors.textTertiary
|
|
175
|
+
}),
|
|
176
|
+
title: t('legal.cookiePolicy.title') || 'Cookie Policy',
|
|
177
|
+
description: t('legal.cookiePolicy.subtitle') || 'How we use cookies and similar technologies',
|
|
178
|
+
onPress: handleOpenPolicy('cookie'),
|
|
179
|
+
disabled: loading
|
|
180
|
+
})]
|
|
181
|
+
})
|
|
198
182
|
});
|
|
199
183
|
};
|
|
200
184
|
export default /*#__PURE__*/React.memo(LegalDocumentsScreen);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","useCallback","View","
|
|
1
|
+
{"version":3,"names":["React","useState","useCallback","View","Linking","toast","useTheme","SettingsListGroup","SettingsListItem","logger","useSurfaceHeader","Loading","SettingsIcon","useI18n","jsx","_jsx","jsxs","_jsxs","LOG_COMPONENT","POLICY_URLS","privacy","terms","community","dataRetention","contentModeration","childSafety","cookie","STEP_TO_DOCUMENT","LegalDocumentsScreen","onClose","goBack","initialStep","t","bloomTheme","loading","setLoading","documentType","handleOpenPolicy","policyKey","url","canOpen","canOpenURL","openURL","error","component","useEffect","getPolicyTitle","key","titles","title","size","color","colors","text","className","children","icon","name","success","description","onPress","disabled","primary","secondary","warning","info","textTertiary","memo"],"sourceRoot":"../../../../src","sources":["ui/screens/LegalDocumentsScreen.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AACpD,SAASC,IAAI,EAAEC,OAAO,QAAQ,cAAc;AAC5C,SAASC,KAAK,QAAQ,cAAc;AACpC,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,iBAAiB,EAAEC,gBAAgB,QAAQ,4BAA4B;AAChF,SAASC,MAAM,QAAQ,aAAa;AAEpC,SAASC,gBAAgB,QAAQ,8BAA2B;AAC5D,SAASC,OAAO,QAAQ,sBAAsB;AAC9C,SAASC,YAAY,QAAQ,+BAA4B;AACzD,SAASC,OAAO,QAAQ,qBAAkB;;AAE1C;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACA,MAAMC,aAAa,GAAG,sBAAsB;;AAE5C;AACA,MAAMC,WAAW,GAAG;EAChBC,OAAO,EAAE,sDAAsD;EAC/DC,KAAK,EAAE,+DAA+D;EACtEC,SAAS,EAAE,mEAAmE;EAC9EC,aAAa,EAAE,6DAA6D;EAC5EC,iBAAiB,EAAE,iEAAiE;EACpFC,WAAW,EAAE,2DAA2D;EACxEC,MAAM,EAAE;AACZ,CAAU;AAIV;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAA2C,GAAG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AK,EAAElB,UAAU,CAACmB,MAAM,CAACc;QAAa,CACzC,CACJ;QACDjB,KAAK,EAAEjB,CAAC,CAAC,0BAA0B,CAAC,IAAI,eAAgB;QACxD2B,WAAW,EACP3B,CAAC,CAAC,6BAA6B,CAAC,IAC7B,6CACN;QACD4B,OAAO,EAAEvB,gBAAgB,CAAC,QAAQ,CAAE;QACpCwB,QAAQ,EAAE3B;MAAQ,CACrB,CAAC;IAAA,CACa;EAAC,CAClB,CAAC;AAEvB,CAAC;AAED,4BAAelC,KAAK,CAACmE,IAAI,CAACvC,oBAAoB,CAAC","ignoreList":[]}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useCallback, useMemo, useState } from 'react';
|
|
4
|
-
import { View,
|
|
4
|
+
import { View, StyleSheet, ActivityIndicator, Platform } from 'react-native';
|
|
5
5
|
import { Ionicons } from '@expo/vector-icons';
|
|
6
|
-
import {
|
|
6
|
+
import { toast } from '@oxyhq/bloom';
|
|
7
|
+
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
7
8
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
8
9
|
import { Text } from '@oxyhq/bloom/typography';
|
|
9
10
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
10
11
|
import { getAccountDisplayName, getAccountFallbackHandle, logger as loggerUtil, packageInfo } from '@oxyhq/core';
|
|
11
|
-
import Header from "../components/Header.js";
|
|
12
12
|
import ProfileSummaryCard from "../components/ProfileSummaryCard.js";
|
|
13
13
|
import { SettingsIcon } from "../components/SettingsIcon.js";
|
|
14
|
-
import
|
|
14
|
+
import { presentDeleteAccount } from "../components/modals/DeleteAccountModal.js";
|
|
15
|
+
import { presentActionSheet } from "../components/surfaces/ActionSheetSurface.js";
|
|
15
16
|
import { useOxy } from "../context/OxyContext.js";
|
|
16
17
|
import { useI18n } from "../hooks/useI18n.js";
|
|
18
|
+
import { useSurfaceHeader } from "../hooks/useSurfaceHeader.js";
|
|
17
19
|
import { useCurrentUser } from "../hooks/queries/useAccountQueries.js";
|
|
18
20
|
import { useUserSubscription } from "../hooks/queries/usePaymentQueries.js";
|
|
19
21
|
import { useDeviceSessions } from "../hooks/queries/useServicesQueries.js";
|
|
20
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
23
|
const AVATAR_SIZE = 88;
|
|
22
24
|
const formatRelative = dateString => {
|
|
23
25
|
if (!dateString) {
|
|
@@ -54,7 +56,7 @@ const formatRelative = dateString => {
|
|
|
54
56
|
* Replaces AccountOverview + AccountSettings + the per-account half of
|
|
55
57
|
* SessionManagement. Lists ONLY the active user's profile, sessions on this
|
|
56
58
|
* device, and security/destructive actions for THIS account. Multi-account
|
|
57
|
-
* surface lives in the unified `
|
|
59
|
+
* surface lives in the unified `OxyAccountDialogScreen` — keep these concerns separate.
|
|
58
60
|
*/
|
|
59
61
|
const ManageAccountScreen = ({
|
|
60
62
|
onClose,
|
|
@@ -66,6 +68,9 @@ const ManageAccountScreen = ({
|
|
|
66
68
|
t,
|
|
67
69
|
locale
|
|
68
70
|
} = useI18n();
|
|
71
|
+
useSurfaceHeader({
|
|
72
|
+
title: t('manageAccount.title') || 'Manage your Oxy Account'
|
|
73
|
+
});
|
|
69
74
|
const {
|
|
70
75
|
user: contextUser,
|
|
71
76
|
isAuthenticated,
|
|
@@ -96,17 +101,10 @@ const ManageAccountScreen = ({
|
|
|
96
101
|
const {
|
|
97
102
|
data: deviceSessions,
|
|
98
103
|
isLoading: deviceSessionsLoading,
|
|
99
|
-
refetch: refetchDeviceSessions
|
|
100
|
-
isRefetching: deviceSessionsRefetching
|
|
104
|
+
refetch: refetchDeviceSessions
|
|
101
105
|
} = useDeviceSessions({
|
|
102
106
|
enabled: isAuthenticated && !!activeSessionId
|
|
103
107
|
});
|
|
104
|
-
const signOutDialog = useDialogControl();
|
|
105
|
-
const signOutAllDevicesDialog = useDialogControl();
|
|
106
|
-
const removeDeviceDialog = useDialogControl();
|
|
107
|
-
const downloadDataDialog = useDialogControl();
|
|
108
|
-
const deleteAccountDialog = useDialogControl();
|
|
109
|
-
const [pendingRemoveDevice, setPendingRemoveDevice] = useState(null);
|
|
110
108
|
const [removingDeviceId, setRemovingDeviceId] = useState(null);
|
|
111
109
|
const [signingOutAllDevices, setSigningOutAllDevices] = useState(false);
|
|
112
110
|
const [signingOut, setSigningOut] = useState(false);
|
|
@@ -119,6 +117,16 @@ const ManageAccountScreen = ({
|
|
|
119
117
|
if (signingOut) {
|
|
120
118
|
return;
|
|
121
119
|
}
|
|
120
|
+
const confirmed = await surfaces.confirm({
|
|
121
|
+
title: t('common.actions.signOut') || 'Sign out',
|
|
122
|
+
message: t('common.confirms.signOut') || 'Are you sure you want to sign out?',
|
|
123
|
+
confirmLabel: t('common.actions.signOut') || 'Sign out',
|
|
124
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
125
|
+
destructive: true
|
|
126
|
+
});
|
|
127
|
+
if (!confirmed) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
122
130
|
setSigningOut(true);
|
|
123
131
|
try {
|
|
124
132
|
await logout();
|
|
@@ -133,22 +141,29 @@ const ManageAccountScreen = ({
|
|
|
133
141
|
setSigningOut(false);
|
|
134
142
|
}
|
|
135
143
|
}, [signingOut, logout, t, onClose]);
|
|
136
|
-
const confirmRemoveDevice = useCallback(device => {
|
|
137
|
-
|
|
138
|
-
removeDeviceDialog.open();
|
|
139
|
-
}, [removeDeviceDialog]);
|
|
140
|
-
const handleRemoveDevice = useCallback(async () => {
|
|
141
|
-
if (!pendingRemoveDevice || !activeSessionId) {
|
|
144
|
+
const confirmRemoveDevice = useCallback(async device => {
|
|
145
|
+
if (!activeSessionId) {
|
|
142
146
|
return;
|
|
143
147
|
}
|
|
144
|
-
const
|
|
145
|
-
|
|
148
|
+
const confirmed = await surfaces.confirm({
|
|
149
|
+
title: t('manageAccount.confirms.removeDeviceTitle') || 'Remove device',
|
|
150
|
+
message: t('manageAccount.confirms.removeDevice', {
|
|
151
|
+
name: device.deviceName
|
|
152
|
+
}) || `Sign out from "${device.deviceName}"?`,
|
|
153
|
+
confirmLabel: t('common.remove') || 'Remove',
|
|
154
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
155
|
+
destructive: true
|
|
156
|
+
});
|
|
157
|
+
if (!confirmed) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
setRemovingDeviceId(device.sessionId);
|
|
146
161
|
try {
|
|
147
|
-
await oxyServices.logoutSession(activeSessionId,
|
|
162
|
+
await oxyServices.logoutSession(activeSessionId, device.sessionId);
|
|
148
163
|
await refetchDeviceSessions();
|
|
149
164
|
toast.success(t('manageAccount.toasts.deviceRemoved', {
|
|
150
|
-
name:
|
|
151
|
-
}) || `Signed out from ${
|
|
165
|
+
name: device.deviceName
|
|
166
|
+
}) || `Signed out from ${device.deviceName}`);
|
|
152
167
|
} catch (error) {
|
|
153
168
|
loggerUtil.warn('Remove device failed', {
|
|
154
169
|
component: 'ManageAccountScreen'
|
|
@@ -156,13 +171,25 @@ const ManageAccountScreen = ({
|
|
|
156
171
|
toast.error(t('manageAccount.toasts.deviceRemoveFailed') || 'Failed to remove device');
|
|
157
172
|
} finally {
|
|
158
173
|
setRemovingDeviceId(null);
|
|
159
|
-
setPendingRemoveDevice(null);
|
|
160
174
|
}
|
|
161
|
-
}, [
|
|
175
|
+
}, [activeSessionId, oxyServices, refetchDeviceSessions, t]);
|
|
162
176
|
const handleSignOutAllDevices = useCallback(async () => {
|
|
163
177
|
if (!activeSessionId || signingOutAllDevices) {
|
|
164
178
|
return;
|
|
165
179
|
}
|
|
180
|
+
const otherDeviceCount = (deviceSessions ?? []).filter(device => !device.isCurrent).length;
|
|
181
|
+
const confirmed = await surfaces.confirm({
|
|
182
|
+
title: t('manageAccount.confirms.signOutAllDevicesTitle') || 'Sign out of all other devices',
|
|
183
|
+
message: t('manageAccount.confirms.signOutAllDevices', {
|
|
184
|
+
count: otherDeviceCount
|
|
185
|
+
}) || `End ${otherDeviceCount} other device session(s)? This won't sign you out here.`,
|
|
186
|
+
confirmLabel: t('common.actions.signOut') || 'Sign out',
|
|
187
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
188
|
+
destructive: true
|
|
189
|
+
});
|
|
190
|
+
if (!confirmed) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
166
193
|
setSigningOutAllDevices(true);
|
|
167
194
|
try {
|
|
168
195
|
await oxyServices.logoutAllDeviceSessions(activeSessionId);
|
|
@@ -176,7 +203,7 @@ const ManageAccountScreen = ({
|
|
|
176
203
|
} finally {
|
|
177
204
|
setSigningOutAllDevices(false);
|
|
178
205
|
}
|
|
179
|
-
}, [activeSessionId, signingOutAllDevices, oxyServices, refetchDeviceSessions, t]);
|
|
206
|
+
}, [activeSessionId, signingOutAllDevices, deviceSessions, oxyServices, refetchDeviceSessions, t]);
|
|
180
207
|
const performDownload = useCallback(async format => {
|
|
181
208
|
if (!user) {
|
|
182
209
|
toast.error(t('accountOverview.items.downloadData.error') || 'Service not available');
|
|
@@ -203,78 +230,80 @@ const ManageAccountScreen = ({
|
|
|
203
230
|
toast.error((error instanceof Error ? error.message : null) || t('accountOverview.items.downloadData.error') || 'Failed to download data');
|
|
204
231
|
}
|
|
205
232
|
}, [oxyServices, user, t]);
|
|
233
|
+
|
|
234
|
+
// Runs the actual deletion from inside the delete-account surface; it throws
|
|
235
|
+
// on failure so the surface can surface the error and stay open. Sign-out +
|
|
236
|
+
// close happen in `handleDeleteAccount` once the surface resolves `true`.
|
|
206
237
|
const handleConfirmDelete = useCallback(async confirmText => {
|
|
207
238
|
if (!user) {
|
|
208
239
|
throw new Error(t('accountOverview.items.deleteAccount.error') || 'Service not available');
|
|
209
240
|
}
|
|
210
241
|
await oxyServices.deleteAccount(confirmText);
|
|
211
242
|
toast.success(t('accountOverview.items.deleteAccount.success') || 'Account deleted successfully');
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
onClose?.();
|
|
215
|
-
}, [oxyServices, user, logout, onClose, t, deleteAccountDialog]);
|
|
216
|
-
const handleDownloadData = useCallback(() => {
|
|
243
|
+
}, [oxyServices, user, t]);
|
|
244
|
+
const handleDownloadData = useCallback(async () => {
|
|
217
245
|
if (!user) {
|
|
218
246
|
toast.error(t('accountOverview.items.downloadData.error') || 'Service not available');
|
|
219
247
|
return;
|
|
220
248
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
249
|
+
const format = await presentActionSheet({
|
|
250
|
+
title: t('accountOverview.items.downloadData.confirmTitle') || 'Download account data',
|
|
251
|
+
message: t('accountOverview.items.downloadData.confirmMessage') || 'Choose the format for your account data export:',
|
|
252
|
+
options: [{
|
|
253
|
+
label: 'JSON',
|
|
254
|
+
value: 'json'
|
|
255
|
+
}, {
|
|
256
|
+
label: 'CSV',
|
|
257
|
+
value: 'csv'
|
|
258
|
+
}],
|
|
259
|
+
cancelLabel: t('common.cancel') || 'Cancel'
|
|
260
|
+
});
|
|
261
|
+
if (format) {
|
|
262
|
+
await performDownload(format);
|
|
263
|
+
}
|
|
264
|
+
}, [user, t, performDownload]);
|
|
265
|
+
const handleDeleteAccount = useCallback(async () => {
|
|
224
266
|
if (!user) {
|
|
225
267
|
toast.error(t('accountOverview.items.deleteAccount.error') || 'User not available');
|
|
226
268
|
return;
|
|
227
269
|
}
|
|
228
|
-
|
|
229
|
-
|
|
270
|
+
const deleted = await presentDeleteAccount({
|
|
271
|
+
username: user.username || '',
|
|
272
|
+
onDelete: handleConfirmDelete,
|
|
273
|
+
t
|
|
274
|
+
});
|
|
275
|
+
if (deleted) {
|
|
276
|
+
await logout();
|
|
277
|
+
onClose?.();
|
|
278
|
+
}
|
|
279
|
+
}, [user, t, handleConfirmDelete, logout, onClose]);
|
|
230
280
|
if (!isAuthenticated) {
|
|
231
|
-
return /*#__PURE__*/
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
title: t('manageAccount.title') || 'Manage your Oxy Account',
|
|
235
|
-
onBack: goBack || onClose,
|
|
236
|
-
elevation: "subtle"
|
|
237
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
238
|
-
style: styles.center,
|
|
281
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
282
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
283
|
+
className: "items-center py-space-40",
|
|
239
284
|
children: /*#__PURE__*/_jsx(Text, {
|
|
240
285
|
className: "text-text font-medium text-base",
|
|
241
286
|
children: t('common.status.notSignedIn') || 'Not signed in'
|
|
242
287
|
})
|
|
243
|
-
})
|
|
288
|
+
})
|
|
244
289
|
});
|
|
245
290
|
}
|
|
246
291
|
if (userLoading && !user) {
|
|
247
|
-
return /*#__PURE__*/
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
title: t('manageAccount.title') || 'Manage your Oxy Account',
|
|
251
|
-
onBack: goBack || onClose,
|
|
252
|
-
elevation: "subtle"
|
|
253
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
254
|
-
style: styles.center,
|
|
292
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
293
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
294
|
+
className: "items-center py-space-40",
|
|
255
295
|
children: /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
256
296
|
color: bloomTheme.colors.primary,
|
|
257
297
|
size: "large"
|
|
258
298
|
})
|
|
259
|
-
})
|
|
299
|
+
})
|
|
260
300
|
});
|
|
261
301
|
}
|
|
262
302
|
const deviceRows = deviceSessions ?? [];
|
|
263
303
|
const otherDevices = deviceRows.filter(d => !d.isCurrent);
|
|
264
|
-
return /*#__PURE__*/
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
title: t('manageAccount.title') || 'Manage your Oxy Account',
|
|
268
|
-
onBack: goBack || onClose,
|
|
269
|
-
elevation: "subtle"
|
|
270
|
-
}), /*#__PURE__*/_jsxs(ScrollView, {
|
|
271
|
-
className: "flex-1",
|
|
272
|
-
contentContainerClassName: "px-screen-margin pb-space-24",
|
|
273
|
-
refreshControl: /*#__PURE__*/_jsx(RefreshControl, {
|
|
274
|
-
refreshing: deviceSessionsRefetching,
|
|
275
|
-
onRefresh: refetchDeviceSessions,
|
|
276
|
-
tintColor: bloomTheme.colors.primary
|
|
277
|
-
}),
|
|
304
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
305
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
306
|
+
className: "px-screen-margin pb-space-24",
|
|
278
307
|
children: [/*#__PURE__*/_jsx(ProfileSummaryCard, {
|
|
279
308
|
displayName: displayName,
|
|
280
309
|
avatarUri: avatarUri,
|
|
@@ -372,7 +401,7 @@ const ManageAccountScreen = ({
|
|
|
372
401
|
description: t('manageAccount.sessions.signOutAllSubtitle', {
|
|
373
402
|
count: otherDevices.length
|
|
374
403
|
}) || `End ${otherDevices.length} other device session(s)`,
|
|
375
|
-
onPress:
|
|
404
|
+
onPress: handleSignOutAllDevices,
|
|
376
405
|
destructive: true,
|
|
377
406
|
showChevron: false,
|
|
378
407
|
disabled: signingOutAllDevices,
|
|
@@ -576,7 +605,7 @@ const ManageAccountScreen = ({
|
|
|
576
605
|
color: bloomTheme.colors.error
|
|
577
606
|
}),
|
|
578
607
|
title: t('manageAccount.signOutOfThisAccount') || 'Sign out of this account',
|
|
579
|
-
onPress:
|
|
608
|
+
onPress: handleSignOut,
|
|
580
609
|
destructive: true,
|
|
581
610
|
showChevron: false,
|
|
582
611
|
disabled: signingOut,
|
|
@@ -596,66 +625,7 @@ const ManageAccountScreen = ({
|
|
|
596
625
|
}), /*#__PURE__*/_jsx(View, {
|
|
597
626
|
style: styles.footerSpacer
|
|
598
627
|
})]
|
|
599
|
-
})
|
|
600
|
-
control: signOutDialog,
|
|
601
|
-
title: t('common.actions.signOut') || 'Sign out',
|
|
602
|
-
description: t('common.confirms.signOut') || 'Are you sure you want to sign out?',
|
|
603
|
-
actions: [{
|
|
604
|
-
label: t('common.actions.signOut') || 'Sign out',
|
|
605
|
-
color: 'destructive',
|
|
606
|
-
onPress: handleSignOut
|
|
607
|
-
}, {
|
|
608
|
-
label: t('common.cancel') || 'Cancel',
|
|
609
|
-
color: 'cancel'
|
|
610
|
-
}]
|
|
611
|
-
}), /*#__PURE__*/_jsx(Dialog, {
|
|
612
|
-
control: signOutAllDevicesDialog,
|
|
613
|
-
title: t('manageAccount.confirms.signOutAllDevicesTitle') || 'Sign out of all other devices',
|
|
614
|
-
description: t('manageAccount.confirms.signOutAllDevices', {
|
|
615
|
-
count: otherDevices.length
|
|
616
|
-
}) || `End ${otherDevices.length} other device session(s)? This won't sign you out here.`,
|
|
617
|
-
actions: [{
|
|
618
|
-
label: t('common.actions.signOut') || 'Sign out',
|
|
619
|
-
color: 'destructive',
|
|
620
|
-
onPress: handleSignOutAllDevices
|
|
621
|
-
}, {
|
|
622
|
-
label: t('common.cancel') || 'Cancel',
|
|
623
|
-
color: 'cancel'
|
|
624
|
-
}]
|
|
625
|
-
}), /*#__PURE__*/_jsx(Dialog, {
|
|
626
|
-
control: removeDeviceDialog,
|
|
627
|
-
title: t('manageAccount.confirms.removeDeviceTitle') || 'Remove device',
|
|
628
|
-
description: pendingRemoveDevice ? t('manageAccount.confirms.removeDevice', {
|
|
629
|
-
name: pendingRemoveDevice.deviceName
|
|
630
|
-
}) || `Sign out from "${pendingRemoveDevice.deviceName}"?` : '',
|
|
631
|
-
actions: [{
|
|
632
|
-
label: t('common.remove') || 'Remove',
|
|
633
|
-
color: 'destructive',
|
|
634
|
-
onPress: handleRemoveDevice
|
|
635
|
-
}, {
|
|
636
|
-
label: t('common.cancel') || 'Cancel',
|
|
637
|
-
color: 'cancel'
|
|
638
|
-
}]
|
|
639
|
-
}), /*#__PURE__*/_jsx(Dialog, {
|
|
640
|
-
control: downloadDataDialog,
|
|
641
|
-
title: t('accountOverview.items.downloadData.confirmTitle') || 'Download account data',
|
|
642
|
-
description: t('accountOverview.items.downloadData.confirmMessage') || 'Choose the format for your account data export:',
|
|
643
|
-
actions: [{
|
|
644
|
-
label: 'JSON',
|
|
645
|
-
onPress: () => performDownload('json')
|
|
646
|
-
}, {
|
|
647
|
-
label: 'CSV',
|
|
648
|
-
onPress: () => performDownload('csv')
|
|
649
|
-
}, {
|
|
650
|
-
label: t('common.cancel') || 'Cancel',
|
|
651
|
-
color: 'cancel'
|
|
652
|
-
}]
|
|
653
|
-
}), user ? /*#__PURE__*/_jsx(DeleteAccountModal, {
|
|
654
|
-
control: deleteAccountDialog,
|
|
655
|
-
username: user.username || '',
|
|
656
|
-
onDelete: handleConfirmDelete,
|
|
657
|
-
t: t
|
|
658
|
-
}) : null]
|
|
628
|
+
})
|
|
659
629
|
});
|
|
660
630
|
};
|
|
661
631
|
|
|
@@ -664,11 +634,6 @@ const ManageAccountScreen = ({
|
|
|
664
634
|
// spacing, radius, and typography roles live on Bloom components + NativeWind
|
|
665
635
|
// token classes.
|
|
666
636
|
const styles = StyleSheet.create({
|
|
667
|
-
center: {
|
|
668
|
-
flex: 1,
|
|
669
|
-
alignItems: 'center',
|
|
670
|
-
justifyContent: 'center'
|
|
671
|
-
},
|
|
672
637
|
footerSpacer: {
|
|
673
638
|
height: 24
|
|
674
639
|
}
|