@oxyhq/services 22.8.7 → 22.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/index.js +24 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +150 -0
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -0
- package/lib/commonjs/ui/components/OxyAuthChooser.js +137 -40
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyConsentScreen.js +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +9 -29
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +1 -1
- package/lib/commonjs/ui/components/RequireOxyAuth.js +1 -1
- package/lib/commonjs/ui/components/SurfaceHeaderAction.js +63 -0
- package/lib/commonjs/ui/components/SurfaceHeaderAction.js.map +1 -0
- package/lib/commonjs/ui/components/SurfaceScreen.js +193 -0
- package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -0
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +46 -29
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +47 -23
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js +22 -12
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +1 -1
- package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js +83 -0
- package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +49 -4
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +34 -39
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js +46 -0
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +1 -1
- package/lib/commonjs/ui/navigation/accountDialogManager.js +14 -2
- package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/bottomSheetManager.js +38 -56
- package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +7 -57
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaceBackBridge.js +68 -0
- package/lib/commonjs/ui/navigation/surfaceBackBridge.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaceNavStack.js +98 -0
- package/lib/commonjs/ui/navigation/surfaceNavStack.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaceRegistry.js +152 -0
- package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaces.js +256 -0
- package/lib/commonjs/ui/navigation/surfaces.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +214 -283
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +88 -118
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +22 -36
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +219 -226
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AvatarCropScreen.js +10 -14
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +24 -39
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +136 -158
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +29 -36
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileScreen.js +101 -109
- package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +10 -15
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +8 -16
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +219 -206
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +62 -69
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +63 -79
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +69 -98
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +8 -14
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +77 -94
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +99 -134
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/NotificationsScreen.js +69 -76
- package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -8
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PreferencesScreen.js +67 -74
- package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +55 -91
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +291 -304
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +100 -114
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +38 -45
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +44 -57
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +24 -31
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +14 -24
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +9 -7
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js +66 -75
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +111 -139
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +13 -20
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +14 -27
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +68 -85
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +28 -36
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/types/surfaceScreen.js +6 -0
- package/lib/commonjs/ui/types/surfaceScreen.js.map +1 -0
- package/lib/module/index.js +12 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialogScreen.js +145 -0
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -0
- package/lib/module/ui/components/OxyAuthChooser.js +137 -40
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyConsentScreen.js +1 -1
- package/lib/module/ui/components/OxyProvider.js +10 -30
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js +1 -1
- package/lib/module/ui/components/RequireOxyAuth.js +1 -1
- package/lib/module/ui/components/SurfaceHeaderAction.js +58 -0
- package/lib/module/ui/components/SurfaceHeaderAction.js.map +1 -0
- package/lib/module/ui/components/SurfaceScreen.js +188 -0
- package/lib/module/ui/components/SurfaceScreen.js.map +1 -0
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +46 -29
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js +46 -23
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/module/ui/components/oxyAuthChooserStyles.js +22 -12
- package/lib/module/ui/components/oxyAuthChooserStyles.js.map +1 -1
- package/lib/module/ui/components/surfaces/ActionSheetSurface.js +78 -0
- package/lib/module/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +49 -4
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +34 -39
- package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/module/ui/hooks/useSurfaceHeader.js +42 -0
- package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -0
- package/lib/module/ui/hooks/useSwitchableAccounts.js +1 -1
- package/lib/module/ui/navigation/accountDialogManager.js +14 -2
- package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/module/ui/navigation/bottomSheetManager.js +37 -53
- package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +6 -56
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/navigation/surfaceBackBridge.js +63 -0
- package/lib/module/ui/navigation/surfaceBackBridge.js.map +1 -0
- package/lib/module/ui/navigation/surfaceNavStack.js +95 -0
- package/lib/module/ui/navigation/surfaceNavStack.js.map +1 -0
- package/lib/module/ui/navigation/surfaceRegistry.js +146 -0
- package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -0
- package/lib/module/ui/navigation/surfaces.js +244 -0
- package/lib/module/ui/navigation/surfaces.js.map +1 -0
- package/lib/module/ui/screens/AccountMembersScreen.js +218 -286
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +92 -121
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +25 -38
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +220 -227
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js +10 -14
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +26 -40
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js +139 -160
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +32 -38
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileScreen.js +102 -110
- package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +11 -15
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +10 -17
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +222 -208
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +64 -70
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +65 -81
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +71 -99
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +10 -15
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +78 -94
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +102 -137
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/NotificationsScreen.js +71 -77
- package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +4 -9
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PreferencesScreen.js +69 -75
- package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +58 -93
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +293 -305
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +102 -116
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +40 -46
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +46 -58
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +26 -32
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +14 -24
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +8 -7
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustAboutScreen.js +67 -75
- package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +112 -139
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustFAQScreen.js +15 -21
- package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +14 -26
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +69 -85
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRulesScreen.js +30 -37
- package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/module/ui/types/surfaceScreen.js +4 -0
- package/lib/module/ui/types/surfaceScreen.js.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts +39 -0
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +3 -3
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts +3 -2
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/RequireOxyAuth.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts +16 -0
- package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts +26 -0
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +17 -2
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts +19 -9
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
- package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +7 -11
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +31 -0
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +14 -2
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +24 -16
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +2 -60
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts +16 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts +51 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +135 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts +79 -0
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts +0 -4
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +8 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/surfaceScreen.d.ts +38 -0
- package/lib/typescript/commonjs/ui/types/surfaceScreen.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts +39 -0
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +3 -3
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts +3 -2
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts +2 -2
- package/lib/typescript/module/ui/components/RequireOxyAuth.d.ts +1 -1
- package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts +16 -0
- package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts +26 -0
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +17 -2
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts +19 -9
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
- package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +7 -11
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +31 -0
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +14 -2
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +24 -16
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +2 -60
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts +16 -0
- package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts +51 -0
- package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +135 -0
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaces.d.ts +79 -0
- package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +0 -4
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +8 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/surfaceScreen.d.ts +38 -0
- package/lib/typescript/module/ui/types/surfaceScreen.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/index.ts +12 -5
- package/src/ui/components/OxyAccountDialogScreen.tsx +148 -0
- package/src/ui/components/OxyAuthChooser.tsx +153 -33
- package/src/ui/components/OxyConsentScreen.tsx +1 -1
- package/src/ui/components/OxyProvider.tsx +12 -34
- package/src/ui/components/ProfileButton.tsx +2 -2
- package/src/ui/components/RequireOxyAuth.tsx +1 -1
- package/src/ui/components/SurfaceHeaderAction.tsx +60 -0
- package/src/ui/components/SurfaceScreen.tsx +226 -0
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +50 -36
- package/src/ui/components/modals/DeleteAccountModal.tsx +47 -26
- package/src/ui/components/oxyAuthChooserStyles.ts +22 -12
- package/src/ui/components/surfaces/ActionSheetSurface.tsx +98 -0
- package/src/ui/context/OxyContext.tsx +43 -3
- package/src/ui/hooks/useAvatarPicker.ts +53 -66
- package/src/ui/hooks/useSurfaceHeader.ts +56 -0
- package/src/ui/hooks/useSwitchableAccounts.ts +1 -1
- package/src/ui/navigation/__tests__/getSurfaceConfig.test.ts +39 -0
- package/src/ui/navigation/__tests__/surfaceNavStack.test.ts +68 -0
- package/src/ui/navigation/accountDialogManager.ts +14 -2
- package/src/ui/navigation/bottomSheetManager.ts +46 -73
- package/src/ui/navigation/routes.ts +7 -106
- package/src/ui/navigation/surfaceBackBridge.ts +69 -0
- package/src/ui/navigation/surfaceNavStack.ts +110 -0
- package/src/ui/navigation/surfaceRegistry.ts +240 -0
- package/src/ui/navigation/surfaces.ts +272 -0
- package/src/ui/screens/AccountMembersScreen.tsx +39 -100
- package/src/ui/screens/AccountSettingsScreen.tsx +32 -54
- package/src/ui/screens/AccountVerificationScreen.tsx +23 -51
- package/src/ui/screens/AppInfoScreen.tsx +6 -13
- package/src/ui/screens/AvatarCropScreen.tsx +8 -17
- package/src/ui/screens/ConnectedAppsScreen.tsx +39 -60
- package/src/ui/screens/CreateAccountScreen.tsx +13 -39
- package/src/ui/screens/EditProfileFieldScreen.tsx +30 -48
- package/src/ui/screens/EditProfileScreen.tsx +7 -16
- package/src/ui/screens/FAQScreen.tsx +9 -13
- package/src/ui/screens/FeedbackScreen.tsx +8 -22
- package/src/ui/screens/FileManagementScreen.tsx +191 -188
- package/src/ui/screens/HelpSupportScreen.tsx +7 -13
- package/src/ui/screens/HistoryViewScreen.tsx +26 -31
- package/src/ui/screens/LanguageSelectorScreen.tsx +12 -46
- package/src/ui/screens/LearnMoreUsernamesScreen.tsx +8 -16
- package/src/ui/screens/LegalDocumentsScreen.tsx +7 -22
- package/src/ui/screens/ManageAccountScreen.tsx +96 -165
- package/src/ui/screens/NotificationsScreen.tsx +7 -13
- package/src/ui/screens/PaymentGatewayScreen.tsx +3 -10
- package/src/ui/screens/PreferencesScreen.tsx +7 -13
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +52 -90
- package/src/ui/screens/PrivacySettingsScreen.tsx +9 -21
- package/src/ui/screens/ProfileScreen.tsx +9 -11
- package/src/ui/screens/SavesCollectionsScreen.tsx +7 -13
- package/src/ui/screens/SearchSettingsScreen.tsx +9 -21
- package/src/ui/screens/UserLinksScreen.tsx +7 -14
- package/src/ui/screens/UserListScreen.tsx +2 -5
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +1 -1
- package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +9 -7
- package/src/ui/screens/trust/TrustAboutScreen.tsx +10 -17
- package/src/ui/screens/trust/TrustCenterScreen.tsx +9 -28
- package/src/ui/screens/trust/TrustFAQScreen.tsx +15 -18
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +3 -5
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +11 -26
- package/src/ui/screens/trust/TrustRulesScreen.tsx +10 -13
- package/src/ui/types/navigation.ts +8 -0
- package/src/ui/types/surfaceScreen.ts +38 -0
- package/lib/commonjs/ui/components/BottomSheet.js +0 -49
- package/lib/commonjs/ui/components/BottomSheet.js.map +0 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +0 -298
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +0 -1
- package/lib/commonjs/ui/components/Header.js +0 -305
- package/lib/commonjs/ui/components/Header.js.map +0 -1
- package/lib/commonjs/ui/components/OxyAccountDialog.js +0 -259
- package/lib/commonjs/ui/components/OxyAccountDialog.js.map +0 -1
- package/lib/module/ui/components/BottomSheet.js +0 -45
- package/lib/module/ui/components/BottomSheet.js.map +0 -1
- package/lib/module/ui/components/BottomSheetRouter.js +0 -292
- package/lib/module/ui/components/BottomSheetRouter.js.map +0 -1
- package/lib/module/ui/components/Header.js +0 -299
- package/lib/module/ui/components/Header.js.map +0 -1
- package/lib/module/ui/components/OxyAccountDialog.js +0 -254
- package/lib/module/ui/components/OxyAccountDialog.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts +0 -29
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts +0 -9
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/Header.d.ts +0 -33
- package/lib/typescript/commonjs/ui/components/Header.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts +0 -37
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/BottomSheet.d.ts +0 -29
- package/lib/typescript/module/ui/components/BottomSheet.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts +0 -9
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Header.d.ts +0 -33
- package/lib/typescript/module/ui/components/Header.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts +0 -37
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +0 -1
- package/src/ui/components/BottomSheet.tsx +0 -48
- package/src/ui/components/BottomSheetRouter.tsx +0 -310
- package/src/ui/components/Header.tsx +0 -224
- package/src/ui/components/OxyAccountDialog.tsx +0 -243
- package/src/ui/navigation/__tests__/getSheetConfig.test.ts +0 -36
|
@@ -2,18 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
import { View, Text } from 'react-native';
|
|
4
4
|
import { Ionicons } from '@expo/vector-icons';
|
|
5
|
-
import {
|
|
5
|
+
import { Button } from '@oxyhq/bloom/button';
|
|
6
6
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
|
+
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
7
8
|
import { useI18n } from "../../hooks/useI18n.js";
|
|
8
9
|
import { formatFileSize, getFileIcon } from "../../utils/fileManagement.js";
|
|
9
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
/**
|
|
12
|
+
* File-detail panel — a rich presented surface (NOT a yes/no confirm): a file's
|
|
13
|
+
* icon + metadata plus download / delete / cancel actions. Each action first
|
|
14
|
+
* dismisses this surface, then runs its handler, so a follow-up delete confirm
|
|
15
|
+
* stacks cleanly above whatever remains. Presented via {@link presentFileDetails}.
|
|
16
|
+
*/
|
|
10
17
|
export const FileDetailsModal = ({
|
|
11
|
-
|
|
18
|
+
surface,
|
|
12
19
|
file,
|
|
13
20
|
onDownload,
|
|
14
21
|
onDelete,
|
|
15
|
-
isOwner
|
|
16
|
-
onClose
|
|
22
|
+
isOwner
|
|
17
23
|
}) => {
|
|
18
24
|
const {
|
|
19
25
|
t
|
|
@@ -21,30 +27,8 @@ export const FileDetailsModal = ({
|
|
|
21
27
|
const {
|
|
22
28
|
colors
|
|
23
29
|
} = useTheme();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
label: t('fileManagement.details.download'),
|
|
27
|
-
onPress: () => onDownload(file.id, file.filename)
|
|
28
|
-
}, {
|
|
29
|
-
label: t('common.actions.delete'),
|
|
30
|
-
color: 'destructive',
|
|
31
|
-
onPress: () => onDelete(file.id, file.filename)
|
|
32
|
-
}, {
|
|
33
|
-
label: t('common.cancel'),
|
|
34
|
-
color: 'cancel'
|
|
35
|
-
}] : [{
|
|
36
|
-
label: t('fileManagement.details.download'),
|
|
37
|
-
onPress: () => onDownload(file.id, file.filename)
|
|
38
|
-
}, {
|
|
39
|
-
label: t('common.cancel'),
|
|
40
|
-
color: 'cancel'
|
|
41
|
-
}];
|
|
42
|
-
return /*#__PURE__*/_jsx(Dialog, {
|
|
43
|
-
control: control,
|
|
44
|
-
onClose: onClose,
|
|
45
|
-
label: t('fileManagement.details.title'),
|
|
46
|
-
actions: actions,
|
|
47
|
-
children: /*#__PURE__*/_jsxs(View, {
|
|
30
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
31
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
48
32
|
className: "bg-secondary border-border p-[18px] rounded-[14px] border items-center",
|
|
49
33
|
children: [/*#__PURE__*/_jsx(View, {
|
|
50
34
|
className: "mb-space-16",
|
|
@@ -96,7 +80,40 @@ export const FileDetailsModal = ({
|
|
|
96
80
|
})]
|
|
97
81
|
})]
|
|
98
82
|
})]
|
|
99
|
-
})
|
|
83
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
84
|
+
style: {
|
|
85
|
+
gap: 8
|
|
86
|
+
},
|
|
87
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
88
|
+
variant: "primary",
|
|
89
|
+
onPress: () => {
|
|
90
|
+
surface.dismiss();
|
|
91
|
+
onDownload(file.id, file.filename);
|
|
92
|
+
},
|
|
93
|
+
children: t('fileManagement.details.download')
|
|
94
|
+
}), isOwner ? /*#__PURE__*/_jsx(Button, {
|
|
95
|
+
variant: "destructive",
|
|
96
|
+
onPress: () => {
|
|
97
|
+
surface.dismiss();
|
|
98
|
+
onDelete(file.id, file.filename);
|
|
99
|
+
},
|
|
100
|
+
children: t('common.actions.delete')
|
|
101
|
+
}) : null, /*#__PURE__*/_jsx(Button, {
|
|
102
|
+
variant: "secondary",
|
|
103
|
+
onPress: () => surface.dismiss(),
|
|
104
|
+
children: t('common.cancel')
|
|
105
|
+
})]
|
|
106
|
+
})]
|
|
100
107
|
});
|
|
101
108
|
};
|
|
109
|
+
|
|
110
|
+
/** Options accepted by {@link presentFileDetails} (everything but `surface`). */
|
|
111
|
+
|
|
112
|
+
/** Present the file-detail panel on the shared surface stack. */
|
|
113
|
+
export function presentFileDetails(options) {
|
|
114
|
+
void surfaces.present(surface => /*#__PURE__*/_jsx(FileDetailsModal, {
|
|
115
|
+
surface: surface,
|
|
116
|
+
...options
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
102
119
|
//# sourceMappingURL=FileDetailsModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","Text","Ionicons","
|
|
1
|
+
{"version":3,"names":["View","Text","Ionicons","Button","useTheme","surfaces","useI18n","formatFileSize","getFileIcon","jsx","_jsx","jsxs","_jsxs","FileDetailsModal","surface","file","onDownload","onDelete","isOwner","t","colors","children","className","name","contentType","size","color","primary","filename","length","Date","uploadDate","toLocaleString","metadata","description","style","gap","variant","onPress","dismiss","id","presentFileDetails","options","present"],"sourceRoot":"../../../../../src","sources":["ui/components/fileManagement/FileDetailsModal.tsx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Callback } from 'react';
|
|
4
4
|
import { View, Text, TextInput } from 'react-native';
|
|
5
5
|
import { Ionicons } from '@expo/vector-icons';
|
|
6
|
-
import {
|
|
6
|
+
import { Button } from '@oxyhq/bloom/button';
|
|
7
7
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
8
|
+
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
8
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
/**
|
|
11
|
+
* Delete-account confirmation — a rich presented surface (NOT a yes/no confirm):
|
|
12
|
+
* the user must retype their username, then the destructive action runs
|
|
13
|
+
* `onDelete`. On success the surface is dismissed with `true` (the presenter
|
|
14
|
+
* then signs out + closes); cancel dismisses with `false`. Presented via
|
|
15
|
+
* {@link presentDeleteAccount}.
|
|
16
|
+
*/
|
|
9
17
|
const DeleteAccountModal = ({
|
|
10
|
-
|
|
18
|
+
surface,
|
|
11
19
|
username,
|
|
12
20
|
onDelete,
|
|
13
21
|
t
|
|
@@ -23,32 +31,18 @@ const DeleteAccountModal = ({
|
|
|
23
31
|
setIsDeleting(true);
|
|
24
32
|
try {
|
|
25
33
|
await onDelete(confirmUsername);
|
|
26
|
-
|
|
34
|
+
surface.dismiss(true);
|
|
27
35
|
} catch (err) {
|
|
28
36
|
setError((err instanceof Error ? err.message : null) || t('deleteAccount.error') || 'Failed to delete account');
|
|
29
37
|
} finally {
|
|
30
38
|
setIsDeleting(false);
|
|
31
39
|
}
|
|
32
|
-
}, [isValid, confirmUsername, onDelete, t]);
|
|
33
|
-
const
|
|
40
|
+
}, [isValid, confirmUsername, onDelete, surface, t]);
|
|
41
|
+
const handleCancel = useCallback(() => {
|
|
34
42
|
if (isDeleting) return;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return /*#__PURE__*/_jsxs(Dialog, {
|
|
39
|
-
control: control,
|
|
40
|
-
onClose: handleCleanup,
|
|
41
|
-
label: "Delete Account",
|
|
42
|
-
actions: [{
|
|
43
|
-
label: t('deleteAccount.confirm') || 'Delete Forever',
|
|
44
|
-
color: 'destructive',
|
|
45
|
-
onPress: handleDelete,
|
|
46
|
-
disabled: !isValid || isDeleting,
|
|
47
|
-
shouldCloseOnPress: false
|
|
48
|
-
}, {
|
|
49
|
-
label: t('common.cancel') || 'Cancel',
|
|
50
|
-
color: 'cancel'
|
|
51
|
-
}],
|
|
43
|
+
surface.dismiss(false);
|
|
44
|
+
}, [isDeleting, surface]);
|
|
45
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
52
46
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
53
47
|
className: "flex-row items-center mb-4 gap-3",
|
|
54
48
|
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
@@ -87,7 +81,7 @@ const DeleteAccountModal = ({
|
|
|
87
81
|
}), /*#__PURE__*/_jsx(TextInput, {
|
|
88
82
|
className: "text-text bg-bg text-base py-3 px-4 border rounded-lg",
|
|
89
83
|
style: {
|
|
90
|
-
borderColor:
|
|
84
|
+
borderColor: isValid ? theme.colors.success : theme.colors.border
|
|
91
85
|
},
|
|
92
86
|
value: confirmUsername,
|
|
93
87
|
onChangeText: setConfirmUsername,
|
|
@@ -97,8 +91,37 @@ const DeleteAccountModal = ({
|
|
|
97
91
|
autoCorrect: false,
|
|
98
92
|
editable: !isDeleting
|
|
99
93
|
})]
|
|
94
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
95
|
+
style: {
|
|
96
|
+
gap: 8
|
|
97
|
+
},
|
|
98
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
99
|
+
variant: "destructive",
|
|
100
|
+
onPress: handleDelete,
|
|
101
|
+
disabled: !isValid || isDeleting,
|
|
102
|
+
loading: isDeleting,
|
|
103
|
+
children: t('deleteAccount.confirm') || 'Delete Forever'
|
|
104
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
105
|
+
variant: "secondary",
|
|
106
|
+
onPress: handleCancel,
|
|
107
|
+
disabled: isDeleting,
|
|
108
|
+
children: t('common.cancel') || 'Cancel'
|
|
109
|
+
})]
|
|
100
110
|
})]
|
|
101
111
|
});
|
|
102
112
|
};
|
|
113
|
+
|
|
114
|
+
/** Options accepted by {@link presentDeleteAccount} (everything but `surface`). */
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Present the delete-account confirmation on the shared surface stack. Resolves
|
|
118
|
+
* `true` once the account is deleted, `false` if cancelled/dismissed.
|
|
119
|
+
*/
|
|
120
|
+
export function presentDeleteAccount(options) {
|
|
121
|
+
return surfaces.present(surface => /*#__PURE__*/_jsx(DeleteAccountModal, {
|
|
122
|
+
surface: surface,
|
|
123
|
+
...options
|
|
124
|
+
})).then(result => result === true);
|
|
125
|
+
}
|
|
103
126
|
export default DeleteAccountModal;
|
|
104
127
|
//# sourceMappingURL=DeleteAccountModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useState","useCallback","View","Text","TextInput","Ionicons","
|
|
1
|
+
{"version":3,"names":["useState","useCallback","View","Text","TextInput","Ionicons","Button","useTheme","surfaces","jsx","_jsx","jsxs","_jsxs","DeleteAccountModal","surface","username","onDelete","t","theme","confirmUsername","setConfirmUsername","isDeleting","setIsDeleting","error","setError","isValid","handleDelete","dismiss","err","Error","message","handleCancel","children","className","name","size","color","colors","style","backgroundColor","borderColor","success","border","value","onChangeText","placeholder","placeholderTextColor","textSecondary","autoCapitalize","autoCorrect","editable","gap","variant","onPress","disabled","loading","presentDeleteAccount","options","present","then","result"],"sourceRoot":"../../../../../src","sources":["ui/components/modals/DeleteAccountModal.tsx"],"mappings":";;AACA,SAASA,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AAC7C,SAASC,IAAI,EAAEC,IAAI,EAAEC,SAAS,QAAQ,cAAc;AACpD,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,QAAQ,QAA8B,uBAA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KA,MAAM,KAAK,IAAI,CAAC;AAC1C;AAEA,eAAe/C,kBAAkB","ignoreList":[]}
|
|
@@ -6,7 +6,7 @@ import { StyleSheet } from 'react-native';
|
|
|
6
6
|
const QR_PLATE_BG = '#FFFFFF';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Shared styles for `OxyAuthChooser`'s views. Extracted from `
|
|
9
|
+
* Shared styles for `OxyAuthChooser`'s views. Extracted from `OxyAccountDialogScreen`
|
|
10
10
|
* so both the Dialog-wrapped host and any bare host (e.g. a future
|
|
11
11
|
* auth.oxy.so hub page) render identically without duplicating a StyleSheet.
|
|
12
12
|
*/
|
|
@@ -44,16 +44,30 @@ export const authChooserStyles = StyleSheet.create({
|
|
|
44
44
|
fontSize: 12.5,
|
|
45
45
|
marginTop: 1
|
|
46
46
|
},
|
|
47
|
-
|
|
47
|
+
/** Prominent current-account header (Google-style collapsed row). */
|
|
48
|
+
currentAccountRow: {
|
|
48
49
|
flexDirection: 'row',
|
|
49
50
|
alignItems: 'center',
|
|
50
51
|
gap: 12,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
paddingVertical: 8,
|
|
53
|
+
paddingHorizontal: 4
|
|
54
|
+
},
|
|
55
|
+
currentAccountMeta: {
|
|
56
|
+
flex: 1,
|
|
57
|
+
minWidth: 0
|
|
58
|
+
},
|
|
59
|
+
currentAccountName: {
|
|
60
|
+
fontSize: 16,
|
|
61
|
+
fontWeight: '700'
|
|
62
|
+
},
|
|
63
|
+
currentAccountEmail: {
|
|
64
|
+
fontSize: 13,
|
|
65
|
+
marginTop: 2
|
|
66
|
+
},
|
|
67
|
+
manageButton: {
|
|
68
|
+
width: '100%',
|
|
69
|
+
borderRadius: 14,
|
|
70
|
+
marginTop: 4
|
|
57
71
|
},
|
|
58
72
|
addBadge: {
|
|
59
73
|
width: 40,
|
|
@@ -63,10 +77,6 @@ export const authChooserStyles = StyleSheet.create({
|
|
|
63
77
|
alignItems: 'center',
|
|
64
78
|
justifyContent: 'center'
|
|
65
79
|
},
|
|
66
|
-
footerLinks: {
|
|
67
|
-
alignItems: 'center',
|
|
68
|
-
marginTop: 16
|
|
69
|
-
},
|
|
70
80
|
footerLink: {
|
|
71
81
|
alignSelf: 'center',
|
|
72
82
|
paddingVertical: 10,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","QR_PLATE_BG","authChooserStyles","create","rows","width","gap","accountRow","flexDirection","alignItems","borderWidth","hairlineWidth","borderRadius","paddingVertical","paddingHorizontal","rowDisabled","opacity","avatarRing","padding","rowMeta","flex","minWidth","rowName","fontSize","fontWeight","rowHandle","marginTop","
|
|
1
|
+
{"version":3,"names":["StyleSheet","QR_PLATE_BG","authChooserStyles","create","rows","width","gap","accountRow","flexDirection","alignItems","borderWidth","hairlineWidth","borderRadius","paddingVertical","paddingHorizontal","rowDisabled","opacity","avatarRing","padding","rowMeta","flex","minWidth","rowName","fontSize","fontWeight","rowHandle","marginTop","currentAccountRow","currentAccountMeta","currentAccountName","currentAccountEmail","manageButton","addBadge","height","justifyContent","footerLink","alignSelf","linkText","signInBlock","primaryButton","secondaryButton","usernameInput","dividerRow","marginVertical","dividerLine","dividerText","marginHorizontal","centeredBlock","mutedText","textAlign","qrHeadline","qrPlate","backgroundColor"],"sourceRoot":"../../../../src","sources":["ui/components/oxyAuthChooserStyles.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;;AAEzC;AACA,MAAMC,WAAW,GAAG,SAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGF,UAAU,CAACG,MAAM,CAAC;EACjDC,IAAI,EAAE;IACJC,KAAK,EAAE,MAAM;IACbC,GAAG,EAAE;EACP,CAAC;EACDC,UAAU,EAAE;IACVC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBH,GAAG,EAAE,EAAE;IACPI,WAAW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e,EAAEnD;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Text, View } from 'react-native';
|
|
4
|
+
import { Button } from '@oxyhq/bloom/button';
|
|
5
|
+
import { useTheme } from '@oxyhq/bloom/theme';
|
|
6
|
+
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A single choice in an {@link ActionSheetSurface} — a labelled button that
|
|
10
|
+
* resolves the surface with `value` when pressed.
|
|
11
|
+
*/
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
const TITLE_STYLE = {
|
|
14
|
+
fontSize: 22,
|
|
15
|
+
fontWeight: '600',
|
|
16
|
+
lineHeight: 30
|
|
17
|
+
};
|
|
18
|
+
const MESSAGE_STYLE = {
|
|
19
|
+
fontSize: 16,
|
|
20
|
+
lineHeight: 22
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A multi-choice action sheet rendered as a shared-stack surface — the
|
|
25
|
+
* many-option counterpart to Bloom's two-way `surfaces.confirm`. Each option
|
|
26
|
+
* button resolves the surface's `present()` promise with that option's `value`;
|
|
27
|
+
* cancel / backdrop / Escape resolve `undefined`. Presented via
|
|
28
|
+
* {@link presentActionSheet}.
|
|
29
|
+
*/
|
|
30
|
+
export function ActionSheetSurface({
|
|
31
|
+
surface,
|
|
32
|
+
title,
|
|
33
|
+
message,
|
|
34
|
+
options,
|
|
35
|
+
cancelLabel
|
|
36
|
+
}) {
|
|
37
|
+
const theme = useTheme();
|
|
38
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
39
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
40
|
+
style: [TITLE_STYLE, {
|
|
41
|
+
color: theme.colors.text,
|
|
42
|
+
paddingBottom: message ? 4 : 16
|
|
43
|
+
}],
|
|
44
|
+
children: title
|
|
45
|
+
}), message ? /*#__PURE__*/_jsx(Text, {
|
|
46
|
+
style: [MESSAGE_STYLE, {
|
|
47
|
+
color: theme.colors.textSecondary,
|
|
48
|
+
paddingBottom: 16
|
|
49
|
+
}],
|
|
50
|
+
children: message
|
|
51
|
+
}) : null, /*#__PURE__*/_jsxs(View, {
|
|
52
|
+
style: {
|
|
53
|
+
gap: 8
|
|
54
|
+
},
|
|
55
|
+
children: [options.map(option => /*#__PURE__*/_jsx(Button, {
|
|
56
|
+
variant: option.destructive ? 'destructive' : 'primary',
|
|
57
|
+
onPress: () => surface.dismiss(option.value),
|
|
58
|
+
children: option.label
|
|
59
|
+
}, option.value)), /*#__PURE__*/_jsx(Button, {
|
|
60
|
+
variant: "secondary",
|
|
61
|
+
onPress: () => surface.dismiss(undefined),
|
|
62
|
+
children: cancelLabel
|
|
63
|
+
})]
|
|
64
|
+
})]
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Present an {@link ActionSheetSurface} on the shared stack and resolve with the
|
|
70
|
+
* chosen option `value`, or `undefined` if cancelled/dismissed.
|
|
71
|
+
*/
|
|
72
|
+
export function presentActionSheet(options) {
|
|
73
|
+
return surfaces.present(surface => /*#__PURE__*/_jsx(ActionSheetSurface, {
|
|
74
|
+
surface: surface,
|
|
75
|
+
...options
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=ActionSheetSurface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Text","View","Button","useTheme","surfaces","jsx","_jsx","jsxs","_jsxs","TITLE_STYLE","fontSize","fontWeight","lineHeight","MESSAGE_STYLE","ActionSheetSurface","surface","title","message","options","cancelLabel","theme","children","style","color","colors","text","paddingBottom","textSecondary","gap","map","option","variant","destructive","onPress","dismiss","value","label","undefined","presentActionSheet","present"],"sourceRoot":"../../../../../src","sources":["ui/components/surfaces/ActionSheetSurface.tsx"],"mappings":";;A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,MAAM;QAEH6B,OAAO,EAAED,MAAM,CAACE,WAAW,GAAG,aAAa,GAAG,SAAU;QACxDC,OAAO,EAAEA,CAAA,KAAMlB,OAAO,CAACmB,OAAO,CAACJ,MAAM,CAACK,KAAK,CAAE;QAAAd,QAAA,EAE5CS,MAAM,CAACM;MAAK,GAJRN,MAAM,CAACK,KAKR,CACX,CAAC,eACF7B,IAAA,CAACJ,MAAM;QAAC6B,OAAO,EAAC,WAAW;QAACE,OAAO,EAAEA,CAAA,KAAMlB,OAAO,CAACmB,OAAO,CAACG,SAAS,CAAE;QAAAhB,QAAA,EACjEF;MAAW,CACR,CAAC;IAAA,CACP,CAAC;EAAA,CACL,CAAC;AAEf;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASmB,kBAAkBA,CAC9BpB,OAAoD,EAC9B;EACtB,OAAOd,QAAQ,CAACmC,OAAO,CAAiBxB,OAAO,iBAC3CT,IAAA,CAACQ,kBAAkB;IAACC,OAAO,EAAEA,OAAQ;IAAA,GAAKG;EAAO,CAAG,CACvD,CAAC;AACN","ignoreList":[]}
|
|
@@ -19,6 +19,7 @@ import { useAuthOperations, clearPersistedAuthSafe } from "./hooks/useAuthOperat
|
|
|
19
19
|
import { useDeviceManagement } from "../hooks/useDeviceManagement.js";
|
|
20
20
|
import { getStorageKeys, createPlatformStorage } from "../utils/storageHelpers.js";
|
|
21
21
|
import { showBottomSheet as globalShowBottomSheet } from "../navigation/bottomSheetManager.js";
|
|
22
|
+
import { presentDetached } from "../navigation/surfaces.js";
|
|
22
23
|
import { useQueryClient, onlineManager } from '@tanstack/react-query';
|
|
23
24
|
import { clearQueryCache } from "../hooks/queryClient.js";
|
|
24
25
|
import { useAvatarPicker } from "../hooks/useAvatarPicker.js";
|
|
@@ -582,6 +583,14 @@ export const OxyProvider = ({
|
|
|
582
583
|
handleWebSessionRef.current = handleWebSession;
|
|
583
584
|
const commitSwitchedSessionRef = useRef(commitSwitchedSession);
|
|
584
585
|
commitSwitchedSessionRef.current = commitSwitchedSession;
|
|
586
|
+
|
|
587
|
+
// The live AccountDialog surface (a stacked Bloom surface), while open — the
|
|
588
|
+
// SINGLE source of truth for "is the account dialog open". Held so
|
|
589
|
+
// `openAccountDialog` can no-op when already open and `closeAccountDialog` /
|
|
590
|
+
// `onSignedIn` can dismiss it. Its present→settle lifecycle is what drives the
|
|
591
|
+
// reactive `accountDialogOpen` mirror below: presenting flips it true, the
|
|
592
|
+
// surface settling (`result.finally`) flips it false — no other write site.
|
|
593
|
+
const accountDialogSurfaceRef = useRef(null);
|
|
585
594
|
const accountDialogControllerRef = useRef(null);
|
|
586
595
|
if (!accountDialogControllerRef.current) {
|
|
587
596
|
accountDialogControllerRef.current = createAccountDialogController({
|
|
@@ -594,7 +603,13 @@ export const OxyProvider = ({
|
|
|
594
603
|
socketFactory: io,
|
|
595
604
|
commitSession: session => handleWebSessionRef.current(session),
|
|
596
605
|
commitSwitchedSession: session => commitSwitchedSessionRef.current(session),
|
|
597
|
-
onSignedIn: () =>
|
|
606
|
+
onSignedIn: () => {
|
|
607
|
+
// Dismiss the surface; its settle (`result.finally` below) is what flips
|
|
608
|
+
// `accountDialogOpen` false. The surface's present→settle lifecycle is the
|
|
609
|
+
// SINGLE source of truth for "is the account dialog open" — never a manual
|
|
610
|
+
// flip here.
|
|
611
|
+
accountDialogSurfaceRef.current?.dismiss();
|
|
612
|
+
},
|
|
598
613
|
openUrl: url => {
|
|
599
614
|
if (isWebBrowser()) {
|
|
600
615
|
redirectToAuthorize(url);
|
|
@@ -618,11 +633,42 @@ export const OxyProvider = ({
|
|
|
618
633
|
const accountDialogController = accountDialogControllerRef.current;
|
|
619
634
|
const openAccountDialog = useCallback(view => {
|
|
620
635
|
accountDialogControllerRef.current?.setView(view ?? 'accounts');
|
|
636
|
+
// Present the AccountDialog surface on the shared Bloom stack the FIRST time
|
|
637
|
+
// (subsequent opens just re-point the controller's view above). `presentDetached`
|
|
638
|
+
// keeps it OUT of the `showBottomSheet` route-surface lineage, so closing the
|
|
639
|
+
// bottom-sheet session never touches the account dialog and vice-versa. When a
|
|
640
|
+
// route surface (e.g. ManageAccount) is already open, this stacks the dialog
|
|
641
|
+
// ABOVE it; dismissing the dialog unwinds back to that surface.
|
|
642
|
+
if (!accountDialogSurfaceRef.current) {
|
|
643
|
+
const instance = presentDetached('AccountDialog', {
|
|
644
|
+
initialView: view ?? 'accounts'
|
|
645
|
+
}, {
|
|
646
|
+
placement: {
|
|
647
|
+
base: 'bottom',
|
|
648
|
+
md: 'center'
|
|
649
|
+
},
|
|
650
|
+
dismissOnBackdrop: false,
|
|
651
|
+
maxWidth: 420
|
|
652
|
+
});
|
|
653
|
+
accountDialogSurfaceRef.current = instance;
|
|
654
|
+
// The surface settling is the ONE place `accountDialogOpen` flips false —
|
|
655
|
+
// covering every dismiss path (close button, `onSignedIn`, programmatic
|
|
656
|
+
// `closeAccountDialog`, host unmount). So the stack owns the open state.
|
|
657
|
+
instance.result.finally(() => {
|
|
658
|
+
if (accountDialogSurfaceRef.current === instance) {
|
|
659
|
+
accountDialogSurfaceRef.current = null;
|
|
660
|
+
setAccountDialogOpen(false);
|
|
661
|
+
}
|
|
662
|
+
});
|
|
663
|
+
}
|
|
621
664
|
setAccountDialogOpen(true);
|
|
622
665
|
}, []);
|
|
623
666
|
const closeAccountDialog = useCallback(() => {
|
|
624
667
|
accountDialogControllerRef.current?.cancelSignIn();
|
|
625
|
-
|
|
668
|
+
// Dismiss the surface; its settle (`result.finally` above) flips
|
|
669
|
+
// `accountDialogOpen` false. Do NOT flip it here — the surface lifecycle is
|
|
670
|
+
// the single source of truth, so a manual write would be a second authority.
|
|
671
|
+
accountDialogSurfaceRef.current?.dismiss();
|
|
626
672
|
}, []);
|
|
627
673
|
|
|
628
674
|
// Start driving the dialog on mount; tear it down on unmount.
|
|
@@ -851,8 +897,7 @@ export const OxyProvider = ({
|
|
|
851
897
|
oxyServices,
|
|
852
898
|
currentLanguage,
|
|
853
899
|
activeSessionId,
|
|
854
|
-
queryClient
|
|
855
|
-
showBottomSheet: showBottomSheetForContext
|
|
900
|
+
queryClient
|
|
856
901
|
});
|
|
857
902
|
const {
|
|
858
903
|
accounts,
|