@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
package/lib/commonjs/index.js
CHANGED
|
@@ -141,6 +141,12 @@ Object.defineProperty(exports, "RequireOxyAuth", {
|
|
|
141
141
|
return _RequireOxyAuth.RequireOxyAuth;
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
|
+
Object.defineProperty(exports, "SurfaceHeaderAction", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function () {
|
|
147
|
+
return _SurfaceHeaderAction.SurfaceHeaderAction;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
144
150
|
Object.defineProperty(exports, "closeAccountDialog", {
|
|
145
151
|
enumerable: true,
|
|
146
152
|
get: function () {
|
|
@@ -537,6 +543,12 @@ Object.defineProperty(exports, "useStorage", {
|
|
|
537
543
|
return _useStorage.useStorage;
|
|
538
544
|
}
|
|
539
545
|
});
|
|
546
|
+
Object.defineProperty(exports, "useSurfaceHeader", {
|
|
547
|
+
enumerable: true,
|
|
548
|
+
get: function () {
|
|
549
|
+
return _useSurfaceHeader.useSurfaceHeader;
|
|
550
|
+
}
|
|
551
|
+
});
|
|
540
552
|
Object.defineProperty(exports, "useSwitchSession", {
|
|
541
553
|
enumerable: true,
|
|
542
554
|
get: function () {
|
|
@@ -713,6 +725,8 @@ var _CreateAccountScreen = _interopRequireDefault(require("./ui/screens/CreateAc
|
|
|
713
725
|
var _AccountMembersScreen = _interopRequireDefault(require("./ui/screens/AccountMembersScreen.js"));
|
|
714
726
|
var _AccountSettingsScreen = _interopRequireDefault(require("./ui/screens/AccountSettingsScreen.js"));
|
|
715
727
|
var _bottomSheetManager = require("./ui/navigation/bottomSheetManager.js");
|
|
728
|
+
var _useSurfaceHeader = require("./ui/hooks/useSurfaceHeader.js");
|
|
729
|
+
var _SurfaceHeaderAction = require("./ui/components/SurfaceHeaderAction.js");
|
|
716
730
|
var _accountDialogManager = require("./ui/navigation/accountDialogManager.js");
|
|
717
731
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
718
732
|
/**
|
|
@@ -805,13 +819,14 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
805
819
|
// wall before the device-first cold boot resolves. Opens the ONE account dialog.
|
|
806
820
|
|
|
807
821
|
// Sidebar account trigger. Pressing `ProfileButton` opens the unified
|
|
808
|
-
// `
|
|
822
|
+
// `OxyAccountDialogScreen` (the single account switcher + sign-in surface) via
|
|
809
823
|
// `useOxy().openAccountDialog`.
|
|
810
824
|
|
|
811
|
-
// The account switcher/sign-in/sign-up chooser WITHOUT dialog chrome —
|
|
812
|
-
//
|
|
813
|
-
// surface; exported directly so a bare
|
|
814
|
-
// page) can mount the exact same chooser
|
|
825
|
+
// The account switcher/sign-in/sign-up chooser WITHOUT dialog chrome — the
|
|
826
|
+
// surface stack presents `OxyAccountDialogScreen` (which renders this) into
|
|
827
|
+
// Bloom's `<Dialog>` for the normal in-app surface; exported directly so a bare
|
|
828
|
+
// host (e.g. a future auth.oxy.so hub page) can mount the exact same chooser
|
|
829
|
+
// with its own completion strategy.
|
|
815
830
|
|
|
816
831
|
// Unified switchable-accounts hook — the single source of everything the user
|
|
817
832
|
// can switch into: device sign-ins AND linked graph accounts (owned orgs +
|
|
@@ -828,6 +843,10 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
828
843
|
// Bottom-sheet navigation
|
|
829
844
|
// ---------------------------------------------------------------------------
|
|
830
845
|
|
|
846
|
+
// Surface nav header — a surface screen declares its title/subtitle (+ any
|
|
847
|
+
// action slot) into the Dialog's OWN navigation header. Screens render no header
|
|
848
|
+
// of their own.
|
|
849
|
+
|
|
831
850
|
// ---------------------------------------------------------------------------
|
|
832
851
|
// Unified account dialog — imperative entry points
|
|
833
852
|
// ---------------------------------------------------------------------------
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_reactNative","_OxyProvider","_interopRequireDefault","_OxyContext","_useAuth","_FontLoader","_authStore","_accountStore","_assetStore","_useAssets","_useFileDownloadUrl","_useFollow","_useStorage","_useAccountQueries","_useServicesQueries","_useSecurityQueries","_useAuthMethods","_usePaymentQueries","_useAccountMutations","_useServicesMutations","_mutationFactory","_mutationKeys","_queryKeys","_userCache","_useMutationStatus","_useOnlineStatus","_useOxyEvent","_errorHandlers","_useFileFiltering","_OxySignInButton","_OxyAuthPrompt","_OxyOAuthCallback","_OxyConsentScreen","_RequireOxyAuth","_FollowButton","_OxyPayButton","_LogoIcon","_LogoText","_ProfileButton","_OxyAuthChooser","_useSwitchableAccounts","_ProfileScreen","_ManageAccountScreen","_NotificationsScreen","_PreferencesScreen","_ConnectedAppsScreen","_CreateAccountScreen","_AccountMembersScreen","_AccountSettingsScreen","_bottomSheetManager","_accountDialogManager","e","__esModule","default","setPlatformOS","Platform","OS"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_core","require","_reactNative","_OxyProvider","_interopRequireDefault","_OxyContext","_useAuth","_FontLoader","_authStore","_accountStore","_assetStore","_useAssets","_useFileDownloadUrl","_useFollow","_useStorage","_useAccountQueries","_useServicesQueries","_useSecurityQueries","_useAuthMethods","_usePaymentQueries","_useAccountMutations","_useServicesMutations","_mutationFactory","_mutationKeys","_queryKeys","_userCache","_useMutationStatus","_useOnlineStatus","_useOxyEvent","_errorHandlers","_useFileFiltering","_OxySignInButton","_OxyAuthPrompt","_OxyOAuthCallback","_OxyConsentScreen","_RequireOxyAuth","_FollowButton","_OxyPayButton","_LogoIcon","_LogoText","_ProfileButton","_OxyAuthChooser","_useSwitchableAccounts","_ProfileScreen","_ManageAccountScreen","_NotificationsScreen","_PreferencesScreen","_ConnectedAppsScreen","_CreateAccountScreen","_AccountMembersScreen","_AccountSettingsScreen","_bottomSheetManager","_useSurfaceHeader","_SurfaceHeaderAction","_accountDialogManager","e","__esModule","default","setPlatformOS","Platform","OS"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C,oBAAA,GAAA3C,sBAAA,CAAAH,OAAA;AAGA,IAAA+C,oBAAA,GAAA5C,sBAAA,CAAAH,OAAA;AACA,IAAAgD,qBAAA,GAAA7C,sBAAA,CAAAH,OAAA;AACA,IAAAiD,sBAAA,GAAA9C,sBAAA,CAAAH,OAAA;AAKA,IAAAkD,mBAAA,GAAAlD,OAAA;AAMA,IAAAmD,iBAAA,GAAAnD,OAAA;AACA,IAAAoD,oBAAA,GAAApD,OAAA;AAMA,IAAAqD,qBAAA,GAAArD,OAAA;AAI8C,SAAAG,uBAAAmD,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AApS9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAIA,IAAAG,mBAAa,EAACC,qBAAQ,CAACC,EAAgB,CAAC;;AAExC;AACA;AACA;;AAOA;AACA;AACA;;AAGA;AACA;AACA;;AAgBA;AACA;AACA;;AAOA;AACA;AACA;;AAgCA;;AAeA;AACA;AACA;;AA2BA;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAeA;AACA;AACA;AACA;AACA;;AAIA;;AAMA;AACA;AACA;;AASA;AACA;AACA;;AAIA;AACA;AACA;;AAkBA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;;AAIA;;AAOA;;AAKA;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -6,17 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var _vectorIcons = require("@expo/vector-icons");
|
|
10
|
-
var _typography = require("@oxyhq/bloom/typography");
|
|
11
|
-
var _theme = require("@oxyhq/bloom/theme");
|
|
12
9
|
var _OxyContext = require("../context/OxyContext.js");
|
|
13
10
|
var _useI18n = require("../hooks/useI18n.js");
|
|
11
|
+
var _useSurfaceHeader = require("../hooks/useSurfaceHeader.js");
|
|
14
12
|
var _OxyAuthChooser = _interopRequireDefault(require("./OxyAuthChooser.js"));
|
|
15
|
-
var _LogoIcon = require("./logo/LogoIcon.js");
|
|
16
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
15
|
/**
|
|
19
|
-
*
|
|
16
|
+
* OxyAccountDialogScreen — the ONE unified account dialog BODY for `@oxyhq/services`.
|
|
20
17
|
*
|
|
21
18
|
* The header (title/subtitle per view + back button) around the headless chooser
|
|
22
19
|
* logic, which lives in `OxyAuthChooser` — the account switcher, sign-in,
|
|
@@ -51,12 +48,11 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
51
48
|
* `@oxyhq/core`. Closing routes through `useOxy().closeAccountDialog`, which
|
|
52
49
|
* dismisses the surface and runs its exit animation.
|
|
53
50
|
*/
|
|
54
|
-
const
|
|
51
|
+
const OxyAccountDialogScreen = () => {
|
|
55
52
|
const {
|
|
56
53
|
accountDialogController: controller,
|
|
57
54
|
closeAccountDialog
|
|
58
55
|
} = (0, _OxyContext.useOxy)();
|
|
59
|
-
const theme = (0, _theme.useTheme)();
|
|
60
56
|
const {
|
|
61
57
|
t
|
|
62
58
|
} = (0, _useI18n.useI18n)();
|
|
@@ -67,95 +63,33 @@ const OxyAccountDialog = () => {
|
|
|
67
63
|
const subscribe = (0, _react.useCallback)(listener => controller ? controller.subscribe(listener) : () => undefined, [controller]);
|
|
68
64
|
const getSnapshot = (0, _react.useCallback)(() => controller ? controller.getSnapshot() : EMPTY_SNAPSHOT, [controller]);
|
|
69
65
|
const snapshot = (0, _react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
70
|
-
if (!controller) {
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
66
|
const {
|
|
74
67
|
view
|
|
75
68
|
} = snapshot;
|
|
76
69
|
const showBack = view === 'qr' || view === 'signup' || view === 'add' && snapshot.accounts.length > 0;
|
|
77
|
-
|
|
78
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(DialogHeader, {
|
|
79
|
-
snapshot: snapshot,
|
|
80
|
-
theme: theme,
|
|
81
|
-
t: t,
|
|
82
|
-
showBack: showBack,
|
|
83
|
-
onBack: () => controller.setView('accounts'),
|
|
84
|
-
onClose: closeAccountDialog
|
|
85
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
86
|
-
style: styles.body,
|
|
87
|
-
contentContainerStyle: styles.bodyContent,
|
|
88
|
-
showsVerticalScrollIndicator: false,
|
|
89
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthChooser.default, {
|
|
90
|
-
onComplete: closeAccountDialog
|
|
91
|
-
})
|
|
92
|
-
})]
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
// ---------------------------------------------------------------------------
|
|
97
|
-
// Header
|
|
98
|
-
// ---------------------------------------------------------------------------
|
|
99
|
-
|
|
100
|
-
const DialogHeader = ({
|
|
101
|
-
snapshot,
|
|
102
|
-
theme,
|
|
103
|
-
t,
|
|
104
|
-
showBack,
|
|
105
|
-
onBack,
|
|
106
|
-
onClose
|
|
107
|
-
}) => {
|
|
70
|
+
const goToAccounts = (0, _react.useCallback)(() => controller?.setView('accounts'), [controller]);
|
|
108
71
|
const {
|
|
109
72
|
title,
|
|
110
73
|
subtitle
|
|
111
|
-
} = headerCopy(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoIcon.LogoIcon, {
|
|
131
|
-
height: 34,
|
|
132
|
-
color: theme.colors.primary
|
|
133
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
134
|
-
onPress: onClose,
|
|
135
|
-
style: [styles.iconButton, {
|
|
136
|
-
backgroundColor: theme.colors.backgroundSecondary
|
|
137
|
-
}],
|
|
138
|
-
accessibilityRole: "button",
|
|
139
|
-
accessibilityLabel: t('common.actions.close') || 'Close',
|
|
140
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
141
|
-
name: "close",
|
|
142
|
-
size: 20,
|
|
143
|
-
color: theme.colors.textSecondary
|
|
144
|
-
})
|
|
145
|
-
})]
|
|
146
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
147
|
-
style: [styles.title, {
|
|
148
|
-
color: theme.colors.text
|
|
149
|
-
}],
|
|
150
|
-
numberOfLines: 1,
|
|
151
|
-
children: title
|
|
152
|
-
}), subtitle ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
153
|
-
style: [styles.subtitle, {
|
|
154
|
-
color: theme.colors.textSecondary
|
|
155
|
-
}],
|
|
156
|
-
numberOfLines: 2,
|
|
157
|
-
children: subtitle
|
|
158
|
-
}) : null]
|
|
74
|
+
} = headerCopy(view, snapshot.accounts.length, t);
|
|
75
|
+
|
|
76
|
+
// The account dialog uses the SHARED Dialog nav header like every other screen
|
|
77
|
+
// (the base): the large in-content title/subtitle that collapses into the nav
|
|
78
|
+
// bar on scroll (default `largeTitle`), its per-view copy, and a per-view back
|
|
79
|
+
// that returns to the account list (the Dialog renders the frosted back/close).
|
|
80
|
+
(0, _useSurfaceHeader.useSurfaceHeader)({
|
|
81
|
+
title,
|
|
82
|
+
subtitle: subtitle ?? undefined,
|
|
83
|
+
onBack: showBack ? goToAccounts : undefined
|
|
84
|
+
});
|
|
85
|
+
if (!controller) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
89
|
+
style: styles.bodyContent,
|
|
90
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthChooser.default, {
|
|
91
|
+
onComplete: closeAccountDialog
|
|
92
|
+
})
|
|
159
93
|
});
|
|
160
94
|
};
|
|
161
95
|
|
|
@@ -207,44 +141,10 @@ const EMPTY_SNAPSHOT = {
|
|
|
207
141
|
commonsAvailability: 'unknown'
|
|
208
142
|
};
|
|
209
143
|
const styles = _reactNative.StyleSheet.create({
|
|
210
|
-
header: {
|
|
211
|
-
alignItems: 'center',
|
|
212
|
-
marginBottom: 12
|
|
213
|
-
},
|
|
214
|
-
headerBar: {
|
|
215
|
-
width: '100%',
|
|
216
|
-
flexDirection: 'row',
|
|
217
|
-
alignItems: 'center',
|
|
218
|
-
justifyContent: 'space-between',
|
|
219
|
-
marginBottom: 8
|
|
220
|
-
},
|
|
221
|
-
iconButton: {
|
|
222
|
-
width: 32,
|
|
223
|
-
height: 32,
|
|
224
|
-
borderRadius: 16,
|
|
225
|
-
alignItems: 'center',
|
|
226
|
-
justifyContent: 'center'
|
|
227
|
-
},
|
|
228
|
-
title: {
|
|
229
|
-
fontSize: 22,
|
|
230
|
-
fontWeight: '800',
|
|
231
|
-
letterSpacing: -0.4,
|
|
232
|
-
textAlign: 'center',
|
|
233
|
-
marginTop: 6
|
|
234
|
-
},
|
|
235
|
-
subtitle: {
|
|
236
|
-
fontSize: 14,
|
|
237
|
-
lineHeight: 19,
|
|
238
|
-
textAlign: 'center',
|
|
239
|
-
marginTop: 4
|
|
240
|
-
},
|
|
241
|
-
body: {
|
|
242
|
-
width: '100%'
|
|
243
|
-
},
|
|
244
144
|
bodyContent: {
|
|
245
145
|
paddingTop: 4,
|
|
246
146
|
paddingBottom: 4
|
|
247
147
|
}
|
|
248
148
|
});
|
|
249
|
-
var _default = exports.default =
|
|
250
|
-
//# sourceMappingURL=
|
|
149
|
+
var _default = exports.default = OxyAccountDialogScreen;
|
|
150
|
+
//# sourceMappingURL=OxyAccountDialogScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_OxyContext","_useI18n","_useSurfaceHeader","_OxyAuthChooser","_interopRequireDefault","_jsxRuntime","e","__esModule","default","OxyAccountDialogScreen","accountDialogController","controller","closeAccountDialog","useOxy","t","useI18n","subscribe","useCallback","listener","undefined","getSnapshot","EMPTY_SNAPSHOT","snapshot","useSyncExternalStore","view","showBack","accounts","length","goToAccounts","setView","title","subtitle","headerCopy","useSurfaceHeader","onBack","jsx","View","style","styles","bodyContent","children","onComplete","accountCount","activeAccountId","loading","error","switchingAccountId","signIn","phase","authorizeCode","qrPayload","expiresAt","commonsAvailability","StyleSheet","create","paddingTop","paddingBottom","_default","exports"],"sourceRoot":"../../../../src","sources":["ui/components/OxyAccountDialogScreen.tsx"],"mappings":";;;;;;AAwBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAC,sBAAA,CAAAN,OAAA;AAA8C,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAM,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA9B9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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EAC5CG,IAAI,EAAE,UAAU;EAChBE,QAAQ,EAAE,EAAE;EACZiB,eAAe,EAAE,IAAI;EACrBC,OAAO,EAAE,KAAK;EACdC,KAAK,EAAE,IAAI;EACXC,kBAAkB,EAAE,IAAI;EACxBC,MAAM,EAAE;IAAEC,KAAK,EAAE,MAAM;IAAEC,aAAa,EAAE,IAAI;IAAEC,SAAS,EAAE,IAAI;IAAEC,SAAS,EAAE,IAAI;IAAEN,KAAK,EAAE;EAAK,CAAC;EAC7FO,mBAAmB,EAAE;AACvB,CAAC;AAED,MAAMd,MAAM,GAAGe,uBAAU,CAACC,MAAM,CAAC;EAC/Bf,WAAW,EAAE;IACXgB,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAlD,OAAA,GAEYC,sBAAsB","ignoreList":[]}
|
|
@@ -10,6 +10,7 @@ var _vectorIcons = require("@expo/vector-icons");
|
|
|
10
10
|
var _reactNativeQrcodeSvg = _interopRequireDefault(require("react-native-qrcode-svg"));
|
|
11
11
|
var _avatar = require("@oxyhq/bloom/avatar");
|
|
12
12
|
var _button = require("@oxyhq/bloom/button");
|
|
13
|
+
var _settingsList = require("@oxyhq/bloom/settings-list");
|
|
13
14
|
var _bloom = require("@oxyhq/bloom");
|
|
14
15
|
var _typography = require("@oxyhq/bloom/typography");
|
|
15
16
|
var _theme = require("@oxyhq/bloom/theme");
|
|
@@ -28,8 +29,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
28
29
|
*
|
|
29
30
|
* A thin React Native binding over the headless `AccountDialogController` in
|
|
30
31
|
* `@oxyhq/core` (bound via `useSyncExternalStore`) — the same data/state
|
|
31
|
-
* machine {@link
|
|
32
|
-
* TWO places: wrapped in Bloom's `<Dialog>` by `
|
|
32
|
+
* machine {@link OxyAccountDialogScreen} renders, extracted so it can be mounted in
|
|
33
|
+
* TWO places: wrapped in Bloom's `<Dialog>` by `OxyAccountDialogScreen` (the normal
|
|
33
34
|
* in-app surface), and mounted bare by a future auth.oxy.so hub page for the
|
|
34
35
|
* cross-origin passkey popup (b2) — same chooser, two hosts, two completion
|
|
35
36
|
* strategies via the `onComplete` prop. Neither host duplicates view logic.
|
|
@@ -71,6 +72,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
71
72
|
*/
|
|
72
73
|
|
|
73
74
|
/** Diameter of a row avatar. */const ROW_AVATAR_SIZE = 40;
|
|
75
|
+
/** Diameter of the prominent current-account avatar in the collapsed header. */
|
|
76
|
+
const HEADER_AVATAR_SIZE = 48;
|
|
74
77
|
/** High-contrast QR colors — intentionally fixed (NOT themed) for scan reliability. */
|
|
75
78
|
const QR_PLATE_BG = '#FFFFFF';
|
|
76
79
|
const QR_FOREGROUND = '#000000';
|
|
@@ -94,7 +97,7 @@ function toPreset(color) {
|
|
|
94
97
|
return _theme.APP_COLOR_NAMES.includes(color) ? color : undefined;
|
|
95
98
|
}
|
|
96
99
|
/**
|
|
97
|
-
* The account switcher + sign-in/sign-up chooser. Mounted by `
|
|
100
|
+
* The account switcher + sign-in/sign-up chooser. Mounted by `OxyAccountDialogScreen`
|
|
98
101
|
* (wrapped in Bloom's `<Dialog>`) today; mountable bare by any future host that
|
|
99
102
|
* supplies its own `onComplete`.
|
|
100
103
|
*/
|
|
@@ -301,12 +304,28 @@ const OxyAuthChooser = ({
|
|
|
301
304
|
// Accounts view
|
|
302
305
|
// ---------------------------------------------------------------------------
|
|
303
306
|
|
|
307
|
+
/**
|
|
308
|
+
* The signed-in switcher, in the Google account-menu shape:
|
|
309
|
+
* - COLLAPSED (default): the active account is prominent at the top (avatar +
|
|
310
|
+
* name + email) with a trailing expand chevron, and a "Manage your Oxy
|
|
311
|
+
* account" outline button directly under it. Nothing else.
|
|
312
|
+
* - EXPANDED: the same header + button, then the full account list (current
|
|
313
|
+
* first with a check-circle, every other switchable account, "Add another
|
|
314
|
+
* account", and "Manage accounts on this device").
|
|
315
|
+
*
|
|
316
|
+
* Collapse state is a plain `useState` toggled in the header's press handler —
|
|
317
|
+
* no `useEffect`, no derived-from-props sync. When there is only ONE account
|
|
318
|
+
* (nothing to switch to) the chevron is hidden and the "Add another account" +
|
|
319
|
+
* "Manage accounts on this device" items render inline, so those affordances
|
|
320
|
+
* stay reachable without a pointless expand toggle.
|
|
321
|
+
*/
|
|
304
322
|
const AccountsView = ({
|
|
305
323
|
snapshot,
|
|
306
324
|
theme,
|
|
307
325
|
t,
|
|
308
326
|
handlers
|
|
309
327
|
}) => {
|
|
328
|
+
const [expanded, setExpanded] = (0, _react.useState)(false);
|
|
310
329
|
if (snapshot.loading && snapshot.accounts.length === 0) {
|
|
311
330
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
312
331
|
style: _oxyAuthChooserStyles.authChooserStyles.centeredBlock,
|
|
@@ -322,49 +341,127 @@ const AccountsView = ({
|
|
|
322
341
|
})]
|
|
323
342
|
});
|
|
324
343
|
}
|
|
344
|
+
const switchingDisabled = snapshot.switchingAccountId !== null;
|
|
345
|
+
const current = snapshot.accounts.find(account => account.isCurrent) ?? snapshot.accounts[0];
|
|
346
|
+
const hasOtherAccounts = snapshot.accounts.some(account => account.accountId !== current?.accountId);
|
|
347
|
+
// Current account first, then the rest — the expanded list order.
|
|
348
|
+
const orderedAccounts = current ? [current, ...snapshot.accounts.filter(account => account.accountId !== current.accountId)] : snapshot.accounts;
|
|
349
|
+
// Multi-account: reveal the list only when expanded. Single-account: no expand
|
|
350
|
+
// affordance, so surface add/manage inline.
|
|
351
|
+
const showList = hasOtherAccounts ? expanded : true;
|
|
352
|
+
const renderAccountItem = account => {
|
|
353
|
+
const accent = resolveAccentHex(account.color, theme.colors.primary);
|
|
354
|
+
const isSwitching = snapshot.switchingAccountId === account.accountId;
|
|
355
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
|
|
356
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
357
|
+
style: [_oxyAuthChooserStyles.authChooserStyles.avatarRing, {
|
|
358
|
+
borderColor: account.isCurrent ? accent : 'transparent'
|
|
359
|
+
}],
|
|
360
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_avatar.Avatar, {
|
|
361
|
+
source: account.avatarUrl ?? undefined,
|
|
362
|
+
variant: "thumb",
|
|
363
|
+
name: account.displayName,
|
|
364
|
+
size: ROW_AVATAR_SIZE
|
|
365
|
+
})
|
|
366
|
+
}),
|
|
367
|
+
title: account.displayName,
|
|
368
|
+
description: account.email ?? undefined,
|
|
369
|
+
onPress: () => handlers.onSwitch(account.accountId),
|
|
370
|
+
disabled: switchingDisabled,
|
|
371
|
+
accessibilityLabel: account.displayName,
|
|
372
|
+
showChevron: false,
|
|
373
|
+
rightElement: isSwitching ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
374
|
+
name: "loading",
|
|
375
|
+
size: 20,
|
|
376
|
+
color: accent
|
|
377
|
+
}) : account.isCurrent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
378
|
+
name: "check-circle",
|
|
379
|
+
size: 20,
|
|
380
|
+
color: accent
|
|
381
|
+
}) : undefined
|
|
382
|
+
}, account.accountId);
|
|
383
|
+
};
|
|
325
384
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
326
385
|
style: _oxyAuthChooserStyles.authChooserStyles.rows,
|
|
327
|
-
children: [
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
}],
|
|
337
|
-
onPress: handlers.onAdd,
|
|
338
|
-
accessibilityRole: "button",
|
|
339
|
-
accessibilityLabel: t('signin.addAccountTitle') || 'Add another account',
|
|
386
|
+
children: [current ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
387
|
+
style: _oxyAuthChooserStyles.authChooserStyles.currentAccountRow,
|
|
388
|
+
onPress: hasOtherAccounts ? () => setExpanded(value => !value) : undefined,
|
|
389
|
+
disabled: hasOtherAccounts ? switchingDisabled : true,
|
|
390
|
+
accessibilityRole: hasOtherAccounts ? 'button' : undefined,
|
|
391
|
+
accessibilityState: hasOtherAccounts ? {
|
|
392
|
+
expanded
|
|
393
|
+
} : undefined,
|
|
394
|
+
accessibilityLabel: current.displayName,
|
|
340
395
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
341
|
-
style: [_oxyAuthChooserStyles.authChooserStyles.
|
|
342
|
-
borderColor: theme.colors.
|
|
396
|
+
style: [_oxyAuthChooserStyles.authChooserStyles.avatarRing, {
|
|
397
|
+
borderColor: resolveAccentHex(current.color, theme.colors.primary)
|
|
343
398
|
}],
|
|
344
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
399
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_avatar.Avatar, {
|
|
400
|
+
source: current.avatarUrl ?? undefined,
|
|
401
|
+
variant: "thumb",
|
|
402
|
+
name: current.displayName,
|
|
403
|
+
size: HEADER_AVATAR_SIZE
|
|
348
404
|
})
|
|
349
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
350
|
-
style:
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
})]
|
|
355
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
356
|
-
style: _oxyAuthChooserStyles.authChooserStyles.footerLinks,
|
|
357
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
358
|
-
onPress: handlers.onManage,
|
|
359
|
-
accessibilityRole: "button",
|
|
360
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
361
|
-
style: [_oxyAuthChooserStyles.authChooserStyles.linkText, {
|
|
362
|
-
color: theme.colors.primary
|
|
405
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
406
|
+
style: _oxyAuthChooserStyles.authChooserStyles.currentAccountMeta,
|
|
407
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
408
|
+
style: [_oxyAuthChooserStyles.authChooserStyles.currentAccountName, {
|
|
409
|
+
color: theme.colors.text
|
|
363
410
|
}],
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
411
|
+
numberOfLines: 1,
|
|
412
|
+
children: current.displayName
|
|
413
|
+
}), current.email ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
414
|
+
style: [_oxyAuthChooserStyles.authChooserStyles.currentAccountEmail, {
|
|
415
|
+
color: theme.colors.textSecondary
|
|
416
|
+
}],
|
|
417
|
+
numberOfLines: 1,
|
|
418
|
+
children: current.email
|
|
419
|
+
}) : null]
|
|
420
|
+
}), hasOtherAccounts ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
421
|
+
name: expanded ? 'chevron-up' : 'chevron-down',
|
|
422
|
+
size: 24,
|
|
423
|
+
color: theme.colors.textSecondary
|
|
424
|
+
}) : null]
|
|
425
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
426
|
+
variant: "outline",
|
|
427
|
+
onPress: handlers.onManage,
|
|
428
|
+
style: _oxyAuthChooserStyles.authChooserStyles.manageButton,
|
|
429
|
+
children: t('accountMenu.manage') || 'Manage your Oxy account'
|
|
430
|
+
}), showList ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_settingsList.SettingsListGroup, {
|
|
431
|
+
children: [hasOtherAccounts ? orderedAccounts.map(renderAccountItem) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
|
|
432
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
433
|
+
style: [_oxyAuthChooserStyles.authChooserStyles.addBadge, {
|
|
434
|
+
borderColor: theme.colors.border
|
|
435
|
+
}],
|
|
436
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
437
|
+
name: "plus",
|
|
438
|
+
size: 20,
|
|
439
|
+
color: theme.colors.textSecondary
|
|
440
|
+
})
|
|
441
|
+
}),
|
|
442
|
+
title: t('signin.addAccountTitle') || 'Add another account',
|
|
443
|
+
onPress: handlers.onAdd,
|
|
444
|
+
disabled: switchingDisabled,
|
|
445
|
+
accessibilityLabel: t('signin.addAccountTitle') || 'Add another account',
|
|
446
|
+
showChevron: false
|
|
447
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
|
|
448
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
449
|
+
style: [_oxyAuthChooserStyles.authChooserStyles.addBadge, {
|
|
450
|
+
borderColor: theme.colors.border
|
|
451
|
+
}],
|
|
452
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
453
|
+
name: "cog-outline",
|
|
454
|
+
size: 20,
|
|
455
|
+
color: theme.colors.textSecondary
|
|
456
|
+
})
|
|
457
|
+
}),
|
|
458
|
+
title: t('accountSwitcher.manageOnDevice') || 'Manage accounts on this device',
|
|
459
|
+
onPress: handlers.onManage,
|
|
460
|
+
disabled: switchingDisabled,
|
|
461
|
+
accessibilityLabel: t('accountSwitcher.manageOnDevice') || 'Manage accounts on this device',
|
|
462
|
+
showChevron: false
|
|
463
|
+
})]
|
|
464
|
+
}) : null]
|
|
368
465
|
});
|
|
369
466
|
};
|
|
370
467
|
const AccountRow = ({
|