@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
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
import React, { useState, useEffect, useCallback, useMemo, useRef } from 'react';
|
|
4
4
|
import { View, Text, TouchableOpacity, StyleSheet, ScrollView, ActivityIndicator, RefreshControl, TextInput, Image, AccessibilityInfo, useWindowDimensions } from 'react-native';
|
|
5
5
|
import { Image as ExpoImage } from 'expo-image';
|
|
6
|
-
import {
|
|
6
|
+
import { toast } from '@oxyhq/bloom';
|
|
7
|
+
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
7
8
|
import * as Skeleton from '@oxyhq/bloom/skeleton';
|
|
8
9
|
import { Ionicons, MaterialCommunityIcons } from '@expo/vector-icons';
|
|
10
|
+
import { Pressable } from 'react-native';
|
|
9
11
|
import { useFileStore, useFiles, useUploading as useUploadingStore, useUploadAggregateProgress, useDeleting as useDeletingStore } from "../stores/fileStore.js";
|
|
10
|
-
import
|
|
12
|
+
import { useSurfaceHeader } from "../hooks/useSurfaceHeader.js";
|
|
13
|
+
import { SurfaceHeaderAction } from "../components/SurfaceHeaderAction.js";
|
|
11
14
|
import JustifiedPhotoGrid from "../components/photogrid/JustifiedPhotoGrid.js";
|
|
12
15
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
13
16
|
import { useOxy } from "../context/OxyContext.js";
|
|
@@ -16,8 +19,9 @@ import { useUploadFile } from "../hooks/mutations/useAccountMutations.js";
|
|
|
16
19
|
import { formatFileSize, getFileIcon } from "../utils/fileManagement.js";
|
|
17
20
|
import { useResolvedFileUrls, fileThumbSource } from "../hooks/useResolvedFileUrls.js";
|
|
18
21
|
import { FileViewer } from "../components/fileManagement/FileViewer.js";
|
|
19
|
-
import {
|
|
22
|
+
import { presentFileDetails } from "../components/fileManagement/FileDetailsModal.js";
|
|
20
23
|
import { UploadPreview } from "../components/fileManagement/UploadPreview.js";
|
|
24
|
+
import { presentActionSheet } from "../components/surfaces/ActionSheetSurface.js";
|
|
21
25
|
import { getErrorMessage } from "./fileManagement/shared.js";
|
|
22
26
|
import { useFileUploadState } from "./fileManagement/hooks/useFileUploadState.js";
|
|
23
27
|
import PhotoPickerView from "./fileManagement/PhotoPickerSection.js";
|
|
@@ -28,7 +32,21 @@ import { AnimatedButton } from "../components/fileManagement/AnimatedButton.js";
|
|
|
28
32
|
// Genuinely-inline-only styles: `viewModeButton` is spread into an Animated.View
|
|
29
33
|
// style array (interpolated backgroundColor), and the photo tiles are
|
|
30
34
|
// `expo-image` (no className remap). Everything else uses NativeWind classNames.
|
|
35
|
+
// Nav-header slot layout for this screen's action row + review-mode back button.
|
|
31
36
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
37
|
+
const fmHeaderStyles = StyleSheet.create({
|
|
38
|
+
actionsRow: {
|
|
39
|
+
flexDirection: 'row',
|
|
40
|
+
gap: 8
|
|
41
|
+
},
|
|
42
|
+
backButton: {
|
|
43
|
+
width: 36,
|
|
44
|
+
height: 36,
|
|
45
|
+
borderRadius: 18,
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
justifyContent: 'center'
|
|
48
|
+
}
|
|
49
|
+
});
|
|
32
50
|
const screenStyles = StyleSheet.create({
|
|
33
51
|
viewModeButton: {
|
|
34
52
|
paddingHorizontal: 10,
|
|
@@ -55,6 +73,7 @@ const FileManagementScreen = ({
|
|
|
55
73
|
theme,
|
|
56
74
|
goBack,
|
|
57
75
|
navigate,
|
|
76
|
+
dismiss,
|
|
58
77
|
userId,
|
|
59
78
|
containerWidth,
|
|
60
79
|
selectMode = false,
|
|
@@ -81,11 +100,6 @@ const FileManagementScreen = ({
|
|
|
81
100
|
t
|
|
82
101
|
} = useI18n();
|
|
83
102
|
const uploadFileMutation = useUploadFile();
|
|
84
|
-
// Prompt controls
|
|
85
|
-
const fileDeleteDialog = useDialogControl();
|
|
86
|
-
const bulkDeleteDialog = useDialogControl();
|
|
87
|
-
const visibilityChangeDialog = useDialogControl();
|
|
88
|
-
const [pendingDeleteFile, setPendingDeleteFile] = useState(null);
|
|
89
103
|
const files = useFiles();
|
|
90
104
|
const {
|
|
91
105
|
width: windowWidth
|
|
@@ -105,8 +119,6 @@ const FileManagementScreen = ({
|
|
|
105
119
|
hasMore: true,
|
|
106
120
|
loadingMore: false
|
|
107
121
|
});
|
|
108
|
-
const [selectedFile, setSelectedFile] = useState(null);
|
|
109
|
-
const fileDetailsControl = useDialogControl();
|
|
110
122
|
// In selectMode we never open the detailed viewer
|
|
111
123
|
const [openedFile, setOpenedFile] = useState(null);
|
|
112
124
|
const [fileContent, setFileContent] = useState(null);
|
|
@@ -230,11 +242,19 @@ const FileManagementScreen = ({
|
|
|
230
242
|
}
|
|
231
243
|
}
|
|
232
244
|
if (!multiSelect) {
|
|
233
|
-
onSelect
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
245
|
+
if (onSelect) {
|
|
246
|
+
// Legacy callback caller (inbox, WelcomeNewUser): keep the
|
|
247
|
+
// callback + afterSelect behaviour unchanged.
|
|
248
|
+
onSelect(file);
|
|
249
|
+
if (afterSelect === 'back') {
|
|
250
|
+
goBack?.();
|
|
251
|
+
} else if (afterSelect === 'close') {
|
|
252
|
+
onClose?.();
|
|
253
|
+
}
|
|
254
|
+
} else {
|
|
255
|
+
// Promise-based picker (avatar picker): resolve the surface's
|
|
256
|
+
// present() promise with the picked file.
|
|
257
|
+
dismiss?.(file);
|
|
238
258
|
}
|
|
239
259
|
return;
|
|
240
260
|
}
|
|
@@ -254,7 +274,7 @@ const FileManagementScreen = ({
|
|
|
254
274
|
}
|
|
255
275
|
return next;
|
|
256
276
|
});
|
|
257
|
-
}, [selectMode, multiSelect, onSelect, onClose, goBack, disabledMimeTypes, maxSelection, afterSelect, defaultVisibility, oxyServices, linkContext]);
|
|
277
|
+
}, [selectMode, multiSelect, onSelect, onClose, goBack, dismiss, disabledMimeTypes, maxSelection, afterSelect, defaultVisibility, oxyServices, linkContext]);
|
|
258
278
|
const confirmMultiSelection = useCallback(async () => {
|
|
259
279
|
if (!selectMode || !multiSelect) return;
|
|
260
280
|
const map = {};
|
|
@@ -287,9 +307,15 @@ const FileManagementScreen = ({
|
|
|
287
307
|
|
|
288
308
|
// Wait for all updates (but don't block on failures)
|
|
289
309
|
await Promise.allSettled(updatePromises);
|
|
290
|
-
onConfirmSelection
|
|
291
|
-
|
|
292
|
-
|
|
310
|
+
if (onConfirmSelection) {
|
|
311
|
+
// Legacy callback caller (inbox): keep the callback + close.
|
|
312
|
+
onConfirmSelection(chosen);
|
|
313
|
+
onClose?.();
|
|
314
|
+
} else {
|
|
315
|
+
// Promise-based picker: resolve the surface with the chosen files.
|
|
316
|
+
dismiss?.(chosen);
|
|
317
|
+
}
|
|
318
|
+
}, [selectMode, multiSelect, selectedIds, files, onConfirmSelection, onClose, dismiss, defaultVisibility, oxyServices, linkContext]);
|
|
293
319
|
|
|
294
320
|
// Private-safe thumbnail URLs for the currently-shown files, resolved in
|
|
295
321
|
// ONE batch per page (not N per-tile) and cached by React Query. Uploads
|
|
@@ -498,18 +524,17 @@ const FileManagementScreen = ({
|
|
|
498
524
|
}
|
|
499
525
|
return rows;
|
|
500
526
|
}, []);
|
|
501
|
-
const confirmFileDelete = useCallback((fileId, filename) => {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
527
|
+
const confirmFileDelete = useCallback(async (fileId, filename) => {
|
|
528
|
+
const confirmed = await surfaces.confirm({
|
|
529
|
+
title: t('fileManagement.deleteFile') || 'Delete File',
|
|
530
|
+
message: t('fileManagement.confirms.deleteFile', {
|
|
531
|
+
filename
|
|
532
|
+
}),
|
|
533
|
+
confirmLabel: t('fileManagement.confirm') || 'Delete',
|
|
534
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
535
|
+
destructive: true
|
|
505
536
|
});
|
|
506
|
-
|
|
507
|
-
}, [fileDeleteDialog]);
|
|
508
|
-
const handleFileDelete = useCallback(async () => {
|
|
509
|
-
if (!pendingDeleteFile) return;
|
|
510
|
-
const {
|
|
511
|
-
id: fileId
|
|
512
|
-
} = pendingDeleteFile;
|
|
537
|
+
if (!confirmed) return;
|
|
513
538
|
try {
|
|
514
539
|
storeSetDeleting(fileId);
|
|
515
540
|
await oxyServices.deleteFile(fileId);
|
|
@@ -533,15 +558,20 @@ const FileManagementScreen = ({
|
|
|
533
558
|
}
|
|
534
559
|
} finally {
|
|
535
560
|
storeSetDeleting(null);
|
|
536
|
-
setPendingDeleteFile(null);
|
|
537
561
|
}
|
|
538
|
-
}, [
|
|
539
|
-
const confirmBulkDelete = useCallback(() => {
|
|
540
|
-
if (selectedIds.size === 0) return;
|
|
541
|
-
bulkDeleteDialog.open();
|
|
542
|
-
}, [selectedIds.size, bulkDeleteDialog]);
|
|
543
|
-
const handleBulkDelete = useCallback(async () => {
|
|
562
|
+
}, [storeSetDeleting, oxyServices, loadFiles, t]);
|
|
563
|
+
const confirmBulkDelete = useCallback(async () => {
|
|
544
564
|
if (selectedIds.size === 0) return;
|
|
565
|
+
const confirmed = await surfaces.confirm({
|
|
566
|
+
title: t('fileManagement.deleteFiles') || 'Delete Files',
|
|
567
|
+
message: t('fileManagement.confirms.deleteFiles', {
|
|
568
|
+
count: selectedIds.size
|
|
569
|
+
}),
|
|
570
|
+
confirmLabel: t('fileManagement.confirm') || 'Delete',
|
|
571
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
572
|
+
destructive: true
|
|
573
|
+
});
|
|
574
|
+
if (!confirmed) return;
|
|
545
575
|
try {
|
|
546
576
|
const deletePromises = Array.from(selectedIds).map(async fileId => {
|
|
547
577
|
try {
|
|
@@ -577,7 +607,7 @@ const FileManagementScreen = ({
|
|
|
577
607
|
} catch (error) {
|
|
578
608
|
toast.error(getErrorMessage(error) || t('fileManagement.toasts.bulkDeleteError'));
|
|
579
609
|
}
|
|
580
|
-
}, [selectedIds,
|
|
610
|
+
}, [selectedIds, oxyServices, loadFiles, t]);
|
|
581
611
|
const handleBulkVisibilityChange = useCallback(async visibility => {
|
|
582
612
|
if (selectedIds.size === 0) return;
|
|
583
613
|
try {
|
|
@@ -623,7 +653,28 @@ const FileManagementScreen = ({
|
|
|
623
653
|
} catch (error) {
|
|
624
654
|
toast.error(getErrorMessage(error) || t('fileManagement.toasts.visibilityError'));
|
|
625
655
|
}
|
|
626
|
-
}, [selectedIds, oxyServices, files, loadFiles]);
|
|
656
|
+
}, [selectedIds, oxyServices, files, loadFiles, t]);
|
|
657
|
+
const handleVisibilityChange = useCallback(async () => {
|
|
658
|
+
if (selectedIds.size === 0) return;
|
|
659
|
+
const visibility = await presentActionSheet({
|
|
660
|
+
title: t('fileManagement.changeVisibility') || 'Change Visibility',
|
|
661
|
+
message: t('fileManagement.changeVisibilityConfirm', {
|
|
662
|
+
count: selectedIds.size
|
|
663
|
+
}),
|
|
664
|
+
options: [{
|
|
665
|
+
label: t('fileManagement.private') || 'Private',
|
|
666
|
+
value: 'private'
|
|
667
|
+
}, {
|
|
668
|
+
label: t('fileManagement.public') || 'Public',
|
|
669
|
+
value: 'public'
|
|
670
|
+
}, {
|
|
671
|
+
label: t('fileManagement.unlisted') || 'Unlisted',
|
|
672
|
+
value: 'unlisted'
|
|
673
|
+
}],
|
|
674
|
+
cancelLabel: t('common.cancel') || 'Cancel'
|
|
675
|
+
});
|
|
676
|
+
if (visibility) await handleBulkVisibilityChange(visibility);
|
|
677
|
+
}, [selectedIds.size, handleBulkVisibilityChange, t]);
|
|
627
678
|
|
|
628
679
|
// Unified download function - works on all platforms
|
|
629
680
|
const handleFileDownload = async (fileId, filename) => {
|
|
@@ -718,8 +769,12 @@ const FileManagementScreen = ({
|
|
|
718
769
|
// Don't reset view mode when closing a file
|
|
719
770
|
};
|
|
720
771
|
const showFileDetailsModal = file => {
|
|
721
|
-
|
|
722
|
-
|
|
772
|
+
presentFileDetails({
|
|
773
|
+
file,
|
|
774
|
+
onDownload: handleFileDownload,
|
|
775
|
+
onDelete: confirmFileDelete,
|
|
776
|
+
isOwner: user?.id === targetUserId
|
|
777
|
+
});
|
|
723
778
|
};
|
|
724
779
|
const renderJustifiedPhotoItem = useCallback((photo, width, height, isLast) => {
|
|
725
780
|
const downloadUrl = thumbSourceFor(photo);
|
|
@@ -1167,6 +1222,84 @@ const FileManagementScreen = ({
|
|
|
1167
1222
|
// picker's placement-aware container width / columns / tile size and the
|
|
1168
1223
|
// Dialog-vs-bottom-sheet sizing. Skipping the browse chrome here is what keeps
|
|
1169
1224
|
// the picker from flashing the wrong (file-manager) skeleton inside the Dialog.
|
|
1225
|
+
// The Dialog owns the nav header; this screen contributes its state-dependent
|
|
1226
|
+
// title/subtitle + action slots. The image-only picker mode is headerless
|
|
1227
|
+
// (PhotoPickerView owns its own bar), so this config is simply ignored there.
|
|
1228
|
+
const fmHeaderRight = useMemo(() => {
|
|
1229
|
+
const actions = selectMode && multiSelect ? [{
|
|
1230
|
+
key: 'clear',
|
|
1231
|
+
label: t('fileManagement.clear'),
|
|
1232
|
+
onPress: () => setSelectedIds(new Set()),
|
|
1233
|
+
disabled: selectedIds.size === 0
|
|
1234
|
+
}, {
|
|
1235
|
+
key: 'confirm',
|
|
1236
|
+
label: t('fileManagement.confirm'),
|
|
1237
|
+
onPress: confirmMultiSelection,
|
|
1238
|
+
disabled: selectedIds.size === 0
|
|
1239
|
+
}] : !selectMode && selectedIds.size > 0 ? [{
|
|
1240
|
+
key: 'clear',
|
|
1241
|
+
label: t('fileManagement.clear'),
|
|
1242
|
+
onPress: () => setSelectedIds(new Set()),
|
|
1243
|
+
disabled: false
|
|
1244
|
+
}, {
|
|
1245
|
+
key: 'delete',
|
|
1246
|
+
label: t('fileManagement.delete', {
|
|
1247
|
+
count: selectedIds.size
|
|
1248
|
+
}),
|
|
1249
|
+
onPress: confirmBulkDelete,
|
|
1250
|
+
disabled: false
|
|
1251
|
+
}, {
|
|
1252
|
+
key: 'visibility',
|
|
1253
|
+
label: t('fileManagement.visibility'),
|
|
1254
|
+
onPress: handleVisibilityChange,
|
|
1255
|
+
disabled: false
|
|
1256
|
+
}] : [];
|
|
1257
|
+
if (actions.length === 0) return undefined;
|
|
1258
|
+
return /*#__PURE__*/_jsx(View, {
|
|
1259
|
+
style: fmHeaderStyles.actionsRow,
|
|
1260
|
+
children: actions.map(a => /*#__PURE__*/_jsx(SurfaceHeaderAction, {
|
|
1261
|
+
label: a.label,
|
|
1262
|
+
onPress: a.onPress,
|
|
1263
|
+
disabled: a.disabled
|
|
1264
|
+
}, a.key))
|
|
1265
|
+
});
|
|
1266
|
+
}, [selectMode, multiSelect, selectedIds, t, confirmMultiSelection, confirmBulkDelete, handleVisibilityChange]);
|
|
1267
|
+
const fmHeaderBack = useMemo(() => /*#__PURE__*/_jsx(Pressable, {
|
|
1268
|
+
onPress: handleCancelUpload,
|
|
1269
|
+
accessibilityRole: "button",
|
|
1270
|
+
accessibilityLabel: t('common.back') || 'Back',
|
|
1271
|
+
hitSlop: 8,
|
|
1272
|
+
style: fmHeaderStyles.backButton,
|
|
1273
|
+
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1274
|
+
name: "chevron-back",
|
|
1275
|
+
size: 20,
|
|
1276
|
+
color: colors.text
|
|
1277
|
+
})
|
|
1278
|
+
}), [handleCancelUpload, colors.text, t]);
|
|
1279
|
+
useSurfaceHeader(showUploadPreview ? {
|
|
1280
|
+
title: t('fileManagement.reviewFiles'),
|
|
1281
|
+
subtitle: t('fileManagement.readyToUpload', {
|
|
1282
|
+
count: pendingFiles.length
|
|
1283
|
+
}),
|
|
1284
|
+
left: fmHeaderBack,
|
|
1285
|
+
largeTitle: false
|
|
1286
|
+
} : {
|
|
1287
|
+
title: selectMode ? multiSelect ? maxSelection ? t('fileManagement.selectedWithMax', {
|
|
1288
|
+
count: selectedIds.size,
|
|
1289
|
+
max: maxSelection
|
|
1290
|
+
}) : t('fileManagement.selected', {
|
|
1291
|
+
count: selectedIds.size
|
|
1292
|
+
}) : t('fileManagement.selectFile') : viewMode === 'photos' ? t('fileManagement.photos') : t('fileManagement.title'),
|
|
1293
|
+
subtitle: selectMode ? multiSelect ? t('fileManagement.available', {
|
|
1294
|
+
count: filteredFiles.length
|
|
1295
|
+
}) : t('fileManagement.tapToSelect') : filteredFiles.length === 1 ? t('fileManagement.itemCount', {
|
|
1296
|
+
count: filteredFiles.length
|
|
1297
|
+
}) : t('fileManagement.itemCount_plural', {
|
|
1298
|
+
count: filteredFiles.length
|
|
1299
|
+
}),
|
|
1300
|
+
right: fmHeaderRight,
|
|
1301
|
+
largeTitle: false
|
|
1302
|
+
});
|
|
1170
1303
|
if (loading && !isImageOnlyPicker) {
|
|
1171
1304
|
const GRID_PADDING = 10;
|
|
1172
1305
|
const TILE_GAP = 4;
|
|
@@ -1260,141 +1393,75 @@ const FileManagementScreen = ({
|
|
|
1260
1393
|
const photosOnly = filteredFiles.filter(file => file.contentType.startsWith('image/'));
|
|
1261
1394
|
const isOwner = user?.id === targetUserId;
|
|
1262
1395
|
const allowUpload = isOwner && allowUploadInSelectMode;
|
|
1263
|
-
return /*#__PURE__*/
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1396
|
+
return /*#__PURE__*/_jsx(PhotoPickerView, {
|
|
1397
|
+
photos: photosOnly,
|
|
1398
|
+
selectedIds: selectedIds,
|
|
1399
|
+
multiSelect: multiSelect,
|
|
1400
|
+
maxSelection: maxSelection,
|
|
1401
|
+
allowUpload: allowUpload,
|
|
1402
|
+
refreshing: refreshing,
|
|
1403
|
+
uploading: uploading,
|
|
1404
|
+
isPickingDocument: isPickingDocument,
|
|
1405
|
+
uploadProgress: uploadProgress,
|
|
1406
|
+
hasMore: paging.hasMore,
|
|
1407
|
+
loadingMore: paging.loadingMore,
|
|
1408
|
+
loading: loading,
|
|
1409
|
+
reduceMotion: reduceMotion,
|
|
1410
|
+
getThumbUrl: thumbSourceFor,
|
|
1411
|
+
primaryColor: colors.primary,
|
|
1412
|
+
isOwner: isOwner,
|
|
1413
|
+
onTogglePhoto: toggleSelect
|
|
1414
|
+
// Long-press preview surfaces the file-detail panel on the stack.
|
|
1415
|
+
,
|
|
1416
|
+
onPreviewPhoto: file => showFileDetailsModal(file),
|
|
1417
|
+
onUpload: handleFileUpload,
|
|
1418
|
+
onRefresh: () => loadFiles('refresh'),
|
|
1419
|
+
onLoadMore: () => loadFiles('more'),
|
|
1420
|
+
onCancel: () => {
|
|
1421
|
+
if (onSelect || onConfirmSelection) {
|
|
1422
|
+
// Legacy callback caller: preserve close/back behaviour.
|
|
1287
1423
|
if (onClose) onClose();else goBack?.();
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
onDelete: confirmFileDelete,
|
|
1296
|
-
isOwner: isOwner
|
|
1297
|
-
})]
|
|
1424
|
+
} else {
|
|
1425
|
+
// Promise picker (avatar): dismiss just this surface.
|
|
1426
|
+
dismiss?.();
|
|
1427
|
+
}
|
|
1428
|
+
},
|
|
1429
|
+
onConfirm: confirmMultiSelection,
|
|
1430
|
+
t: t
|
|
1298
1431
|
});
|
|
1299
1432
|
}
|
|
1300
1433
|
|
|
1301
1434
|
// If a file is opened, show the file viewer
|
|
1302
1435
|
if (!selectMode && openedFile) {
|
|
1303
|
-
return /*#__PURE__*/
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
isOwner: user?.id === targetUserId
|
|
1314
|
-
}), /*#__PURE__*/_jsx(FileDetailsModal, {
|
|
1315
|
-
control: fileDetailsControl,
|
|
1316
|
-
file: selectedFile,
|
|
1317
|
-
onDownload: handleFileDownload,
|
|
1318
|
-
onDelete: confirmFileDelete,
|
|
1319
|
-
isOwner: user?.id === targetUserId
|
|
1320
|
-
})]
|
|
1436
|
+
return /*#__PURE__*/_jsx(FileViewer, {
|
|
1437
|
+
file: openedFile,
|
|
1438
|
+
fileContent: fileContent,
|
|
1439
|
+
loadingFileContent: loadingFileContent,
|
|
1440
|
+
showFileDetailsInViewer: showFileDetailsInViewer,
|
|
1441
|
+
onToggleDetails: () => setShowFileDetailsInViewer(!showFileDetailsInViewer),
|
|
1442
|
+
onClose: handleCloseFile,
|
|
1443
|
+
onDownload: handleFileDownload,
|
|
1444
|
+
onDelete: confirmFileDelete,
|
|
1445
|
+
isOwner: user?.id === targetUserId
|
|
1321
1446
|
});
|
|
1322
1447
|
}
|
|
1323
1448
|
|
|
1324
1449
|
// If upload preview is showing, render it inline instead of the file list
|
|
1325
1450
|
if (showUploadPreview) {
|
|
1326
|
-
return /*#__PURE__*/
|
|
1451
|
+
return /*#__PURE__*/_jsx(View, {
|
|
1327
1452
|
className: "flex-1",
|
|
1328
|
-
children:
|
|
1329
|
-
title: t('fileManagement.reviewFiles'),
|
|
1330
|
-
subtitle: t('fileManagement.readyToUpload', {
|
|
1331
|
-
count: pendingFiles.length
|
|
1332
|
-
}),
|
|
1333
|
-
onBack: handleCancelUpload,
|
|
1334
|
-
showBackButton: true,
|
|
1335
|
-
variant: "minimal",
|
|
1336
|
-
elevation: "none",
|
|
1337
|
-
titleAlignment: "left"
|
|
1338
|
-
}), /*#__PURE__*/_jsx(UploadPreview, {
|
|
1453
|
+
children: /*#__PURE__*/_jsx(UploadPreview, {
|
|
1339
1454
|
pendingFiles: pendingFiles,
|
|
1340
1455
|
onConfirm: handleConfirmUpload,
|
|
1341
1456
|
onCancel: handleCancelUpload,
|
|
1342
1457
|
onRemoveFile: removePendingFile,
|
|
1343
1458
|
inline: true
|
|
1344
|
-
})
|
|
1459
|
+
})
|
|
1345
1460
|
});
|
|
1346
1461
|
}
|
|
1347
1462
|
return /*#__PURE__*/_jsxs(View, {
|
|
1348
1463
|
className: "flex-1",
|
|
1349
|
-
children: [/*#__PURE__*/
|
|
1350
|
-
title: selectMode ? multiSelect ? maxSelection ? t('fileManagement.selectedWithMax', {
|
|
1351
|
-
count: selectedIds.size,
|
|
1352
|
-
max: maxSelection
|
|
1353
|
-
}) : t('fileManagement.selected', {
|
|
1354
|
-
count: selectedIds.size
|
|
1355
|
-
}) : t('fileManagement.selectFile') : viewMode === 'photos' ? t('fileManagement.photos') : t('fileManagement.title'),
|
|
1356
|
-
subtitle: selectMode ? multiSelect ? t('fileManagement.available', {
|
|
1357
|
-
count: filteredFiles.length
|
|
1358
|
-
}) : t('fileManagement.tapToSelect') : filteredFiles.length === 1 ? t('fileManagement.itemCount', {
|
|
1359
|
-
count: filteredFiles.length
|
|
1360
|
-
}) : t('fileManagement.itemCount_plural', {
|
|
1361
|
-
count: filteredFiles.length
|
|
1362
|
-
}),
|
|
1363
|
-
actions: selectMode && multiSelect ? [{
|
|
1364
|
-
key: 'clear',
|
|
1365
|
-
text: t('fileManagement.clear'),
|
|
1366
|
-
onPress: () => setSelectedIds(new Set()),
|
|
1367
|
-
disabled: selectedIds.size === 0
|
|
1368
|
-
}, {
|
|
1369
|
-
key: 'confirm',
|
|
1370
|
-
text: t('fileManagement.confirm'),
|
|
1371
|
-
onPress: confirmMultiSelection,
|
|
1372
|
-
disabled: selectedIds.size === 0
|
|
1373
|
-
}] : !selectMode && selectedIds.size > 0 ? [{
|
|
1374
|
-
key: 'clear',
|
|
1375
|
-
text: t('fileManagement.clear'),
|
|
1376
|
-
onPress: () => setSelectedIds(new Set())
|
|
1377
|
-
}, {
|
|
1378
|
-
key: 'delete',
|
|
1379
|
-
text: t('fileManagement.delete', {
|
|
1380
|
-
count: selectedIds.size
|
|
1381
|
-
}),
|
|
1382
|
-
onPress: confirmBulkDelete,
|
|
1383
|
-
icon: 'delete'
|
|
1384
|
-
}, {
|
|
1385
|
-
key: 'visibility',
|
|
1386
|
-
text: t('fileManagement.visibility'),
|
|
1387
|
-
onPress: () => {
|
|
1388
|
-
visibilityChangeDialog.open();
|
|
1389
|
-
},
|
|
1390
|
-
icon: 'eye'
|
|
1391
|
-
}] : undefined,
|
|
1392
|
-
onBack: onClose || goBack,
|
|
1393
|
-
showBackButton: true,
|
|
1394
|
-
variant: "minimal",
|
|
1395
|
-
elevation: "none",
|
|
1396
|
-
titleAlignment: "left"
|
|
1397
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1464
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
1398
1465
|
className: "flex-row items-center justify-between px-[12px] py-[12px] gap-[12px]",
|
|
1399
1466
|
children: [/*#__PURE__*/_jsx(ScrollView, {
|
|
1400
1467
|
horizontal: true,
|
|
@@ -1620,64 +1687,11 @@ const FileManagementScreen = ({
|
|
|
1620
1687
|
onLoadMore: () => loadFiles('more'),
|
|
1621
1688
|
onClearSearch: () => setSearchQuery(''),
|
|
1622
1689
|
renderEmptyState: renderEmptyState
|
|
1623
|
-
}), !selectMode && /*#__PURE__*/_jsx(FileDetailsModal, {
|
|
1624
|
-
control: fileDetailsControl,
|
|
1625
|
-
file: selectedFile,
|
|
1626
|
-
onDownload: handleFileDownload,
|
|
1627
|
-
onDelete: confirmFileDelete,
|
|
1628
|
-
isOwner: user?.id === targetUserId
|
|
1629
1690
|
}), !selectMode && uploading && /*#__PURE__*/_jsx(UploadBar, {
|
|
1630
1691
|
uploadProgress: uploadProgress,
|
|
1631
1692
|
isDark: bloomTheme.isDark,
|
|
1632
1693
|
colors: colors,
|
|
1633
1694
|
t: t
|
|
1634
|
-
}), /*#__PURE__*/_jsx(Dialog, {
|
|
1635
|
-
control: fileDeleteDialog,
|
|
1636
|
-
title: t('fileManagement.deleteFile') || 'Delete File',
|
|
1637
|
-
description: pendingDeleteFile ? t('fileManagement.confirms.deleteFile', {
|
|
1638
|
-
filename: pendingDeleteFile.name
|
|
1639
|
-
}) : '',
|
|
1640
|
-
actions: [{
|
|
1641
|
-
label: t('fileManagement.confirm') || 'Delete',
|
|
1642
|
-
color: 'destructive',
|
|
1643
|
-
onPress: handleFileDelete
|
|
1644
|
-
}, {
|
|
1645
|
-
label: t('common.cancel') || 'Cancel',
|
|
1646
|
-
color: 'cancel'
|
|
1647
|
-
}]
|
|
1648
|
-
}), /*#__PURE__*/_jsx(Dialog, {
|
|
1649
|
-
control: bulkDeleteDialog,
|
|
1650
|
-
title: t('fileManagement.deleteFiles') || 'Delete Files',
|
|
1651
|
-
description: t('fileManagement.confirms.deleteFiles', {
|
|
1652
|
-
count: selectedIds.size
|
|
1653
|
-
}),
|
|
1654
|
-
actions: [{
|
|
1655
|
-
label: t('fileManagement.confirm') || 'Delete',
|
|
1656
|
-
color: 'destructive',
|
|
1657
|
-
onPress: handleBulkDelete
|
|
1658
|
-
}, {
|
|
1659
|
-
label: t('common.cancel') || 'Cancel',
|
|
1660
|
-
color: 'cancel'
|
|
1661
|
-
}]
|
|
1662
|
-
}), /*#__PURE__*/_jsx(Dialog, {
|
|
1663
|
-
control: visibilityChangeDialog,
|
|
1664
|
-
title: t('fileManagement.changeVisibility') || 'Change Visibility',
|
|
1665
|
-
description: t('fileManagement.changeVisibilityConfirm', {
|
|
1666
|
-
count: selectedIds.size
|
|
1667
|
-
}),
|
|
1668
|
-
actions: [{
|
|
1669
|
-
label: t('fileManagement.private') || 'Private',
|
|
1670
|
-
onPress: () => handleBulkVisibilityChange('private')
|
|
1671
|
-
}, {
|
|
1672
|
-
label: t('fileManagement.public') || 'Public',
|
|
1673
|
-
onPress: () => handleBulkVisibilityChange('public')
|
|
1674
|
-
}, {
|
|
1675
|
-
label: t('fileManagement.unlisted') || 'Unlisted',
|
|
1676
|
-
onPress: () => handleBulkVisibilityChange('unlisted')
|
|
1677
|
-
}, {
|
|
1678
|
-
label: t('common.cancel') || 'Cancel',
|
|
1679
|
-
color: 'cancel'
|
|
1680
|
-
}]
|
|
1681
1695
|
})]
|
|
1682
1696
|
});
|
|
1683
1697
|
};
|