@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
|
@@ -14,12 +14,15 @@ import {
|
|
|
14
14
|
} from 'react-native';
|
|
15
15
|
import { Image as ExpoImage } from 'expo-image';
|
|
16
16
|
import type { FileManagementScreenProps } from '../types/fileManagement';
|
|
17
|
-
import {
|
|
17
|
+
import { toast } from '@oxyhq/bloom';
|
|
18
|
+
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
18
19
|
import * as Skeleton from '@oxyhq/bloom/skeleton';
|
|
19
20
|
import { Ionicons, MaterialCommunityIcons } from '@expo/vector-icons';
|
|
21
|
+
import { Pressable } from 'react-native';
|
|
20
22
|
import type { FileMetadata } from '@oxyhq/core';
|
|
21
23
|
import { useFileStore, useFiles, useUploading as useUploadingStore, useUploadAggregateProgress, useDeleting as useDeletingStore } from '../stores/fileStore';
|
|
22
|
-
import
|
|
24
|
+
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
25
|
+
import { SurfaceHeaderAction } from '../components/SurfaceHeaderAction';
|
|
23
26
|
import JustifiedPhotoGrid from '../components/photogrid/JustifiedPhotoGrid';
|
|
24
27
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
25
28
|
import { useOxy } from '../context/OxyContext';
|
|
@@ -31,8 +34,9 @@ import {
|
|
|
31
34
|
} from '../utils/fileManagement';
|
|
32
35
|
import { useResolvedFileUrls, fileThumbSource } from '../hooks/useResolvedFileUrls';
|
|
33
36
|
import { FileViewer } from '../components/fileManagement/FileViewer';
|
|
34
|
-
import {
|
|
37
|
+
import { presentFileDetails } from '../components/fileManagement/FileDetailsModal';
|
|
35
38
|
import { UploadPreview } from '../components/fileManagement/UploadPreview';
|
|
39
|
+
import { presentActionSheet } from '../components/surfaces/ActionSheetSurface';
|
|
36
40
|
import { getErrorMessage } from './fileManagement/shared';
|
|
37
41
|
import { useFileUploadState } from './fileManagement/hooks/useFileUploadState';
|
|
38
42
|
import PhotoPickerView from './fileManagement/PhotoPickerSection';
|
|
@@ -43,6 +47,21 @@ import { AnimatedButton } from '../components/fileManagement/AnimatedButton';
|
|
|
43
47
|
// Genuinely-inline-only styles: `viewModeButton` is spread into an Animated.View
|
|
44
48
|
// style array (interpolated backgroundColor), and the photo tiles are
|
|
45
49
|
// `expo-image` (no className remap). Everything else uses NativeWind classNames.
|
|
50
|
+
// Nav-header slot layout for this screen's action row + review-mode back button.
|
|
51
|
+
const fmHeaderStyles = StyleSheet.create({
|
|
52
|
+
actionsRow: {
|
|
53
|
+
flexDirection: 'row',
|
|
54
|
+
gap: 8,
|
|
55
|
+
},
|
|
56
|
+
backButton: {
|
|
57
|
+
width: 36,
|
|
58
|
+
height: 36,
|
|
59
|
+
borderRadius: 18,
|
|
60
|
+
alignItems: 'center',
|
|
61
|
+
justifyContent: 'center',
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
|
|
46
65
|
const screenStyles = StyleSheet.create({
|
|
47
66
|
viewModeButton: {
|
|
48
67
|
paddingHorizontal: 10,
|
|
@@ -62,6 +81,7 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
62
81
|
theme,
|
|
63
82
|
goBack,
|
|
64
83
|
navigate,
|
|
84
|
+
dismiss,
|
|
65
85
|
userId,
|
|
66
86
|
containerWidth,
|
|
67
87
|
selectMode = false,
|
|
@@ -83,11 +103,6 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
83
103
|
const { user, oxyServices } = useOxy();
|
|
84
104
|
const { t } = useI18n();
|
|
85
105
|
const uploadFileMutation = useUploadFile();
|
|
86
|
-
// Prompt controls
|
|
87
|
-
const fileDeleteDialog = useDialogControl();
|
|
88
|
-
const bulkDeleteDialog = useDialogControl();
|
|
89
|
-
const visibilityChangeDialog = useDialogControl();
|
|
90
|
-
const [pendingDeleteFile, setPendingDeleteFile] = useState<{ id: string; name: string } | null>(null);
|
|
91
106
|
const files = useFiles();
|
|
92
107
|
const { width: windowWidth } = useWindowDimensions();
|
|
93
108
|
// Prefer an explicit sheet width from the router; fall back to the window
|
|
@@ -102,8 +117,6 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
102
117
|
const [loading, setLoading] = useState(true);
|
|
103
118
|
const [refreshing, setRefreshing] = useState(false);
|
|
104
119
|
const [paging, setPaging] = useState({ offset: 0, limit: 40, total: 0, hasMore: true, loadingMore: false });
|
|
105
|
-
const [selectedFile, setSelectedFile] = useState<FileMetadata | null>(null);
|
|
106
|
-
const fileDetailsControl = useDialogControl();
|
|
107
120
|
// In selectMode we never open the detailed viewer
|
|
108
121
|
const [openedFile, setOpenedFile] = useState<FileMetadata | null>(null);
|
|
109
122
|
const [fileContent, setFileContent] = useState<string | null>(null);
|
|
@@ -260,11 +273,19 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
260
273
|
}
|
|
261
274
|
|
|
262
275
|
if (!multiSelect) {
|
|
263
|
-
onSelect
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
276
|
+
if (onSelect) {
|
|
277
|
+
// Legacy callback caller (inbox, WelcomeNewUser): keep the
|
|
278
|
+
// callback + afterSelect behaviour unchanged.
|
|
279
|
+
onSelect(file);
|
|
280
|
+
if (afterSelect === 'back') {
|
|
281
|
+
goBack?.();
|
|
282
|
+
} else if (afterSelect === 'close') {
|
|
283
|
+
onClose?.();
|
|
284
|
+
}
|
|
285
|
+
} else {
|
|
286
|
+
// Promise-based picker (avatar picker): resolve the surface's
|
|
287
|
+
// present() promise with the picked file.
|
|
288
|
+
dismiss?.(file);
|
|
268
289
|
}
|
|
269
290
|
return;
|
|
270
291
|
}
|
|
@@ -282,7 +303,7 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
282
303
|
}
|
|
283
304
|
return next;
|
|
284
305
|
});
|
|
285
|
-
}, [selectMode, multiSelect, onSelect, onClose, goBack, disabledMimeTypes, maxSelection, afterSelect, defaultVisibility, oxyServices, linkContext]);
|
|
306
|
+
}, [selectMode, multiSelect, onSelect, onClose, goBack, dismiss, disabledMimeTypes, maxSelection, afterSelect, defaultVisibility, oxyServices, linkContext]);
|
|
286
307
|
|
|
287
308
|
const confirmMultiSelection = useCallback(async () => {
|
|
288
309
|
if (!selectMode || !multiSelect) return;
|
|
@@ -322,9 +343,15 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
322
343
|
// Wait for all updates (but don't block on failures)
|
|
323
344
|
await Promise.allSettled(updatePromises);
|
|
324
345
|
|
|
325
|
-
onConfirmSelection
|
|
326
|
-
|
|
327
|
-
|
|
346
|
+
if (onConfirmSelection) {
|
|
347
|
+
// Legacy callback caller (inbox): keep the callback + close.
|
|
348
|
+
onConfirmSelection(chosen);
|
|
349
|
+
onClose?.();
|
|
350
|
+
} else {
|
|
351
|
+
// Promise-based picker: resolve the surface with the chosen files.
|
|
352
|
+
dismiss?.(chosen);
|
|
353
|
+
}
|
|
354
|
+
}, [selectMode, multiSelect, selectedIds, files, onConfirmSelection, onClose, dismiss, defaultVisibility, oxyServices, linkContext]);
|
|
328
355
|
|
|
329
356
|
// Private-safe thumbnail URLs for the currently-shown files, resolved in
|
|
330
357
|
// ONE batch per page (not N per-tile) and cached by React Query. Uploads
|
|
@@ -525,14 +552,15 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
525
552
|
return rows;
|
|
526
553
|
}, []);
|
|
527
554
|
|
|
528
|
-
const confirmFileDelete = useCallback((fileId: string, filename: string) => {
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
555
|
+
const confirmFileDelete = useCallback(async (fileId: string, filename: string) => {
|
|
556
|
+
const confirmed = await surfaces.confirm({
|
|
557
|
+
title: t('fileManagement.deleteFile') || 'Delete File',
|
|
558
|
+
message: t('fileManagement.confirms.deleteFile', { filename }),
|
|
559
|
+
confirmLabel: t('fileManagement.confirm') || 'Delete',
|
|
560
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
561
|
+
destructive: true,
|
|
562
|
+
});
|
|
563
|
+
if (!confirmed) return;
|
|
536
564
|
|
|
537
565
|
try {
|
|
538
566
|
storeSetDeleting(fileId);
|
|
@@ -559,17 +587,20 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
559
587
|
}
|
|
560
588
|
} finally {
|
|
561
589
|
storeSetDeleting(null);
|
|
562
|
-
setPendingDeleteFile(null);
|
|
563
590
|
}
|
|
564
|
-
}, [
|
|
591
|
+
}, [storeSetDeleting, oxyServices, loadFiles, t]);
|
|
565
592
|
|
|
566
|
-
const confirmBulkDelete = useCallback(() => {
|
|
593
|
+
const confirmBulkDelete = useCallback(async () => {
|
|
567
594
|
if (selectedIds.size === 0) return;
|
|
568
|
-
bulkDeleteDialog.open();
|
|
569
|
-
}, [selectedIds.size, bulkDeleteDialog]);
|
|
570
595
|
|
|
571
|
-
|
|
572
|
-
|
|
596
|
+
const confirmed = await surfaces.confirm({
|
|
597
|
+
title: t('fileManagement.deleteFiles') || 'Delete Files',
|
|
598
|
+
message: t('fileManagement.confirms.deleteFiles', { count: selectedIds.size }),
|
|
599
|
+
confirmLabel: t('fileManagement.confirm') || 'Delete',
|
|
600
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
601
|
+
destructive: true,
|
|
602
|
+
});
|
|
603
|
+
if (!confirmed) return;
|
|
573
604
|
|
|
574
605
|
try {
|
|
575
606
|
const deletePromises = Array.from(selectedIds).map(async (fileId) => {
|
|
@@ -598,7 +629,7 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
598
629
|
} catch (error: unknown) {
|
|
599
630
|
toast.error(getErrorMessage(error) || t('fileManagement.toasts.bulkDeleteError'));
|
|
600
631
|
}
|
|
601
|
-
}, [selectedIds,
|
|
632
|
+
}, [selectedIds, oxyServices, loadFiles, t]);
|
|
602
633
|
|
|
603
634
|
const handleBulkVisibilityChange = useCallback(async (visibility: 'private' | 'public' | 'unlisted') => {
|
|
604
635
|
if (selectedIds.size === 0) return;
|
|
@@ -634,7 +665,22 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
634
665
|
} catch (error: unknown) {
|
|
635
666
|
toast.error(getErrorMessage(error) || t('fileManagement.toasts.visibilityError'));
|
|
636
667
|
}
|
|
637
|
-
}, [selectedIds, oxyServices, files, loadFiles]);
|
|
668
|
+
}, [selectedIds, oxyServices, files, loadFiles, t]);
|
|
669
|
+
|
|
670
|
+
const handleVisibilityChange = useCallback(async () => {
|
|
671
|
+
if (selectedIds.size === 0) return;
|
|
672
|
+
const visibility = await presentActionSheet<'private' | 'public' | 'unlisted'>({
|
|
673
|
+
title: t('fileManagement.changeVisibility') || 'Change Visibility',
|
|
674
|
+
message: t('fileManagement.changeVisibilityConfirm', { count: selectedIds.size }),
|
|
675
|
+
options: [
|
|
676
|
+
{ label: t('fileManagement.private') || 'Private', value: 'private' },
|
|
677
|
+
{ label: t('fileManagement.public') || 'Public', value: 'public' },
|
|
678
|
+
{ label: t('fileManagement.unlisted') || 'Unlisted', value: 'unlisted' },
|
|
679
|
+
],
|
|
680
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
681
|
+
});
|
|
682
|
+
if (visibility) await handleBulkVisibilityChange(visibility);
|
|
683
|
+
}, [selectedIds.size, handleBulkVisibilityChange, t]);
|
|
638
684
|
|
|
639
685
|
// Unified download function - works on all platforms
|
|
640
686
|
const handleFileDownload = async (fileId: string, filename: string) => {
|
|
@@ -746,8 +792,12 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
746
792
|
};
|
|
747
793
|
|
|
748
794
|
const showFileDetailsModal = (file: FileMetadata) => {
|
|
749
|
-
|
|
750
|
-
|
|
795
|
+
presentFileDetails({
|
|
796
|
+
file,
|
|
797
|
+
onDownload: handleFileDownload,
|
|
798
|
+
onDelete: confirmFileDelete,
|
|
799
|
+
isOwner: user?.id === targetUserId,
|
|
800
|
+
});
|
|
751
801
|
};
|
|
752
802
|
|
|
753
803
|
const renderJustifiedPhotoItem = useCallback((photo: FileMetadata, width: number, height: number, isLast: boolean) => {
|
|
@@ -1129,6 +1179,64 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
1129
1179
|
// picker's placement-aware container width / columns / tile size and the
|
|
1130
1180
|
// Dialog-vs-bottom-sheet sizing. Skipping the browse chrome here is what keeps
|
|
1131
1181
|
// the picker from flashing the wrong (file-manager) skeleton inside the Dialog.
|
|
1182
|
+
// The Dialog owns the nav header; this screen contributes its state-dependent
|
|
1183
|
+
// title/subtitle + action slots. The image-only picker mode is headerless
|
|
1184
|
+
// (PhotoPickerView owns its own bar), so this config is simply ignored there.
|
|
1185
|
+
const fmHeaderRight = useMemo<React.ReactNode>(() => {
|
|
1186
|
+
const actions = selectMode && multiSelect
|
|
1187
|
+
? [
|
|
1188
|
+
{ key: 'clear', label: t('fileManagement.clear'), onPress: () => setSelectedIds(new Set()), disabled: selectedIds.size === 0 },
|
|
1189
|
+
{ key: 'confirm', label: t('fileManagement.confirm'), onPress: confirmMultiSelection, disabled: selectedIds.size === 0 },
|
|
1190
|
+
]
|
|
1191
|
+
: !selectMode && selectedIds.size > 0
|
|
1192
|
+
? [
|
|
1193
|
+
{ key: 'clear', label: t('fileManagement.clear'), onPress: () => setSelectedIds(new Set()), disabled: false },
|
|
1194
|
+
{ key: 'delete', label: t('fileManagement.delete', { count: selectedIds.size }), onPress: confirmBulkDelete, disabled: false },
|
|
1195
|
+
{ key: 'visibility', label: t('fileManagement.visibility'), onPress: handleVisibilityChange, disabled: false },
|
|
1196
|
+
]
|
|
1197
|
+
: [];
|
|
1198
|
+
if (actions.length === 0) return undefined;
|
|
1199
|
+
return (
|
|
1200
|
+
<View style={fmHeaderStyles.actionsRow}>
|
|
1201
|
+
{actions.map((a) => (
|
|
1202
|
+
<SurfaceHeaderAction key={a.key} label={a.label} onPress={a.onPress} disabled={a.disabled} />
|
|
1203
|
+
))}
|
|
1204
|
+
</View>
|
|
1205
|
+
);
|
|
1206
|
+
}, [selectMode, multiSelect, selectedIds, t, confirmMultiSelection, confirmBulkDelete, handleVisibilityChange]);
|
|
1207
|
+
|
|
1208
|
+
const fmHeaderBack = useMemo<React.ReactNode>(() => (
|
|
1209
|
+
<Pressable
|
|
1210
|
+
onPress={handleCancelUpload}
|
|
1211
|
+
accessibilityRole="button"
|
|
1212
|
+
accessibilityLabel={t('common.back') || 'Back'}
|
|
1213
|
+
hitSlop={8}
|
|
1214
|
+
style={fmHeaderStyles.backButton}
|
|
1215
|
+
>
|
|
1216
|
+
<Ionicons name="chevron-back" size={20} color={colors.text} />
|
|
1217
|
+
</Pressable>
|
|
1218
|
+
), [handleCancelUpload, colors.text, t]);
|
|
1219
|
+
|
|
1220
|
+
useSurfaceHeader(
|
|
1221
|
+
showUploadPreview
|
|
1222
|
+
? {
|
|
1223
|
+
title: t('fileManagement.reviewFiles'),
|
|
1224
|
+
subtitle: t('fileManagement.readyToUpload', { count: pendingFiles.length }),
|
|
1225
|
+
left: fmHeaderBack,
|
|
1226
|
+
largeTitle: false,
|
|
1227
|
+
}
|
|
1228
|
+
: {
|
|
1229
|
+
title: selectMode
|
|
1230
|
+
? (multiSelect ? (maxSelection ? t('fileManagement.selectedWithMax', { count: selectedIds.size, max: maxSelection }) : t('fileManagement.selected', { count: selectedIds.size })) : t('fileManagement.selectFile'))
|
|
1231
|
+
: (viewMode === 'photos' ? t('fileManagement.photos') : t('fileManagement.title')),
|
|
1232
|
+
subtitle: selectMode
|
|
1233
|
+
? (multiSelect ? t('fileManagement.available', { count: filteredFiles.length }) : t('fileManagement.tapToSelect'))
|
|
1234
|
+
: (filteredFiles.length === 1 ? t('fileManagement.itemCount', { count: filteredFiles.length }) : t('fileManagement.itemCount_plural', { count: filteredFiles.length })),
|
|
1235
|
+
right: fmHeaderRight,
|
|
1236
|
+
largeTitle: false,
|
|
1237
|
+
},
|
|
1238
|
+
);
|
|
1239
|
+
|
|
1132
1240
|
if (loading && !isImageOnlyPicker) {
|
|
1133
1241
|
const GRID_PADDING = 10;
|
|
1134
1242
|
const TILE_GAP = 4;
|
|
@@ -1190,71 +1298,59 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
1190
1298
|
const allowUpload = isOwner && allowUploadInSelectMode;
|
|
1191
1299
|
|
|
1192
1300
|
return (
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1301
|
+
<PhotoPickerView
|
|
1302
|
+
photos={photosOnly}
|
|
1303
|
+
selectedIds={selectedIds}
|
|
1304
|
+
multiSelect={multiSelect}
|
|
1305
|
+
maxSelection={maxSelection}
|
|
1306
|
+
allowUpload={allowUpload}
|
|
1307
|
+
refreshing={refreshing}
|
|
1308
|
+
uploading={uploading}
|
|
1309
|
+
isPickingDocument={isPickingDocument}
|
|
1310
|
+
uploadProgress={uploadProgress}
|
|
1311
|
+
hasMore={paging.hasMore}
|
|
1312
|
+
loadingMore={paging.loadingMore}
|
|
1313
|
+
loading={loading}
|
|
1314
|
+
reduceMotion={reduceMotion}
|
|
1315
|
+
getThumbUrl={thumbSourceFor}
|
|
1316
|
+
primaryColor={colors.primary}
|
|
1317
|
+
isOwner={isOwner}
|
|
1318
|
+
onTogglePhoto={toggleSelect}
|
|
1319
|
+
// Long-press preview surfaces the file-detail panel on the stack.
|
|
1320
|
+
onPreviewPhoto={(file) => showFileDetailsModal(file)}
|
|
1321
|
+
onUpload={handleFileUpload}
|
|
1322
|
+
onRefresh={() => loadFiles('refresh')}
|
|
1323
|
+
onLoadMore={() => loadFiles('more')}
|
|
1324
|
+
onCancel={() => {
|
|
1325
|
+
if (onSelect || onConfirmSelection) {
|
|
1326
|
+
// Legacy callback caller: preserve close/back behaviour.
|
|
1217
1327
|
if (onClose) onClose();
|
|
1218
1328
|
else goBack?.();
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
onDownload={handleFileDownload}
|
|
1228
|
-
onDelete={confirmFileDelete}
|
|
1229
|
-
isOwner={isOwner}
|
|
1230
|
-
/>
|
|
1231
|
-
</>
|
|
1329
|
+
} else {
|
|
1330
|
+
// Promise picker (avatar): dismiss just this surface.
|
|
1331
|
+
dismiss?.();
|
|
1332
|
+
}
|
|
1333
|
+
}}
|
|
1334
|
+
onConfirm={confirmMultiSelection}
|
|
1335
|
+
t={t}
|
|
1336
|
+
/>
|
|
1232
1337
|
);
|
|
1233
1338
|
}
|
|
1234
1339
|
|
|
1235
1340
|
// If a file is opened, show the file viewer
|
|
1236
1341
|
if (!selectMode && openedFile) {
|
|
1237
1342
|
return (
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
/>
|
|
1250
|
-
<FileDetailsModal
|
|
1251
|
-
control={fileDetailsControl}
|
|
1252
|
-
file={selectedFile}
|
|
1253
|
-
onDownload={handleFileDownload}
|
|
1254
|
-
onDelete={confirmFileDelete}
|
|
1255
|
-
isOwner={user?.id === targetUserId}
|
|
1256
|
-
/>
|
|
1257
|
-
</>
|
|
1343
|
+
<FileViewer
|
|
1344
|
+
file={openedFile}
|
|
1345
|
+
fileContent={fileContent}
|
|
1346
|
+
loadingFileContent={loadingFileContent}
|
|
1347
|
+
showFileDetailsInViewer={showFileDetailsInViewer}
|
|
1348
|
+
onToggleDetails={() => setShowFileDetailsInViewer(!showFileDetailsInViewer)}
|
|
1349
|
+
onClose={handleCloseFile}
|
|
1350
|
+
onDownload={handleFileDownload}
|
|
1351
|
+
onDelete={confirmFileDelete}
|
|
1352
|
+
isOwner={user?.id === targetUserId}
|
|
1353
|
+
/>
|
|
1258
1354
|
);
|
|
1259
1355
|
}
|
|
1260
1356
|
|
|
@@ -1262,15 +1358,6 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
1262
1358
|
if (showUploadPreview) {
|
|
1263
1359
|
return (
|
|
1264
1360
|
<View className="flex-1">
|
|
1265
|
-
<Header
|
|
1266
|
-
title={t('fileManagement.reviewFiles')}
|
|
1267
|
-
subtitle={t('fileManagement.readyToUpload', { count: pendingFiles.length })}
|
|
1268
|
-
onBack={handleCancelUpload}
|
|
1269
|
-
showBackButton
|
|
1270
|
-
variant="minimal"
|
|
1271
|
-
elevation="none"
|
|
1272
|
-
titleAlignment="left"
|
|
1273
|
-
/>
|
|
1274
1361
|
<UploadPreview
|
|
1275
1362
|
pendingFiles={pendingFiles}
|
|
1276
1363
|
onConfirm={handleConfirmUpload}
|
|
@@ -1284,51 +1371,6 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
1284
1371
|
|
|
1285
1372
|
return (
|
|
1286
1373
|
<View className="flex-1">
|
|
1287
|
-
<Header
|
|
1288
|
-
title={selectMode ? (multiSelect ? (maxSelection ? t('fileManagement.selectedWithMax', { count: selectedIds.size, max: maxSelection }) : t('fileManagement.selected', { count: selectedIds.size })) : t('fileManagement.selectFile')) : (viewMode === 'photos' ? t('fileManagement.photos') : t('fileManagement.title'))}
|
|
1289
|
-
subtitle={selectMode ? (multiSelect ? t('fileManagement.available', { count: filteredFiles.length }) : t('fileManagement.tapToSelect')) : (filteredFiles.length === 1 ? t('fileManagement.itemCount', { count: filteredFiles.length }) : t('fileManagement.itemCount_plural', { count: filteredFiles.length }))}
|
|
1290
|
-
actions={selectMode && multiSelect ? [
|
|
1291
|
-
{
|
|
1292
|
-
key: 'clear',
|
|
1293
|
-
text: t('fileManagement.clear'),
|
|
1294
|
-
onPress: () => setSelectedIds(new Set()),
|
|
1295
|
-
disabled: selectedIds.size === 0,
|
|
1296
|
-
},
|
|
1297
|
-
{
|
|
1298
|
-
key: 'confirm',
|
|
1299
|
-
text: t('fileManagement.confirm'),
|
|
1300
|
-
onPress: confirmMultiSelection,
|
|
1301
|
-
disabled: selectedIds.size === 0,
|
|
1302
|
-
}
|
|
1303
|
-
] : !selectMode && selectedIds.size > 0 ? [
|
|
1304
|
-
{
|
|
1305
|
-
key: 'clear',
|
|
1306
|
-
text: t('fileManagement.clear'),
|
|
1307
|
-
onPress: () => setSelectedIds(new Set()),
|
|
1308
|
-
},
|
|
1309
|
-
{
|
|
1310
|
-
key: 'delete',
|
|
1311
|
-
text: t('fileManagement.delete', { count: selectedIds.size }),
|
|
1312
|
-
onPress: confirmBulkDelete,
|
|
1313
|
-
icon: 'delete',
|
|
1314
|
-
},
|
|
1315
|
-
{
|
|
1316
|
-
key: 'visibility',
|
|
1317
|
-
text: t('fileManagement.visibility'),
|
|
1318
|
-
onPress: () => {
|
|
1319
|
-
visibilityChangeDialog.open();
|
|
1320
|
-
},
|
|
1321
|
-
icon: 'eye',
|
|
1322
|
-
}
|
|
1323
|
-
] : undefined}
|
|
1324
|
-
onBack={onClose || goBack}
|
|
1325
|
-
|
|
1326
|
-
showBackButton
|
|
1327
|
-
variant="minimal"
|
|
1328
|
-
elevation="none"
|
|
1329
|
-
titleAlignment="left"
|
|
1330
|
-
/>
|
|
1331
|
-
|
|
1332
1374
|
<View className="flex-row items-center justify-between px-[12px] py-[12px] gap-[12px]">
|
|
1333
1375
|
<ScrollView
|
|
1334
1376
|
horizontal
|
|
@@ -1542,16 +1584,6 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
1542
1584
|
/>
|
|
1543
1585
|
)}
|
|
1544
1586
|
|
|
1545
|
-
{!selectMode && (
|
|
1546
|
-
<FileDetailsModal
|
|
1547
|
-
control={fileDetailsControl}
|
|
1548
|
-
file={selectedFile}
|
|
1549
|
-
onDownload={handleFileDownload}
|
|
1550
|
-
onDelete={confirmFileDelete}
|
|
1551
|
-
isOwner={user?.id === targetUserId}
|
|
1552
|
-
/>
|
|
1553
|
-
)}
|
|
1554
|
-
|
|
1555
1587
|
{/* Uploading banner overlay with progress */}
|
|
1556
1588
|
{!selectMode && uploading && (
|
|
1557
1589
|
<UploadBar
|
|
@@ -1564,35 +1596,6 @@ const FileManagementScreen: React.FC<FileManagementScreenProps> = ({
|
|
|
1564
1596
|
|
|
1565
1597
|
{/* Selection bar removed; actions are now in header */}
|
|
1566
1598
|
{/* Global loadingMore bar removed; now inline in scroll areas */}
|
|
1567
|
-
<Dialog
|
|
1568
|
-
control={fileDeleteDialog}
|
|
1569
|
-
title={t('fileManagement.deleteFile') || 'Delete File'}
|
|
1570
|
-
description={pendingDeleteFile ? t('fileManagement.confirms.deleteFile', { filename: pendingDeleteFile.name }) : ''}
|
|
1571
|
-
actions={[
|
|
1572
|
-
{ label: t('fileManagement.confirm') || 'Delete', color: 'destructive', onPress: handleFileDelete },
|
|
1573
|
-
{ label: t('common.cancel') || 'Cancel', color: 'cancel' },
|
|
1574
|
-
]}
|
|
1575
|
-
/>
|
|
1576
|
-
<Dialog
|
|
1577
|
-
control={bulkDeleteDialog}
|
|
1578
|
-
title={t('fileManagement.deleteFiles') || 'Delete Files'}
|
|
1579
|
-
description={t('fileManagement.confirms.deleteFiles', { count: selectedIds.size })}
|
|
1580
|
-
actions={[
|
|
1581
|
-
{ label: t('fileManagement.confirm') || 'Delete', color: 'destructive', onPress: handleBulkDelete },
|
|
1582
|
-
{ label: t('common.cancel') || 'Cancel', color: 'cancel' },
|
|
1583
|
-
]}
|
|
1584
|
-
/>
|
|
1585
|
-
<Dialog
|
|
1586
|
-
control={visibilityChangeDialog}
|
|
1587
|
-
title={t('fileManagement.changeVisibility') || 'Change Visibility'}
|
|
1588
|
-
description={t('fileManagement.changeVisibilityConfirm', { count: selectedIds.size })}
|
|
1589
|
-
actions={[
|
|
1590
|
-
{ label: t('fileManagement.private') || 'Private', onPress: () => handleBulkVisibilityChange('private') },
|
|
1591
|
-
{ label: t('fileManagement.public') || 'Public', onPress: () => handleBulkVisibilityChange('public') },
|
|
1592
|
-
{ label: t('fileManagement.unlisted') || 'Unlisted', onPress: () => handleBulkVisibilityChange('unlisted') },
|
|
1593
|
-
{ label: t('common.cancel') || 'Cancel', color: 'cancel' },
|
|
1594
|
-
]}
|
|
1595
|
-
/>
|
|
1596
1599
|
</View>
|
|
1597
1600
|
);
|
|
1598
1601
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import { View,
|
|
2
|
+
import { View, Linking } from 'react-native';
|
|
3
3
|
import type { BaseScreenProps } from '../types/navigation';
|
|
4
4
|
import { toast } from '@oxyhq/bloom';
|
|
5
5
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
6
6
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
|
-
import Header from '../components/Header';
|
|
8
7
|
import { SettingsIcon } from '../components/SettingsIcon';
|
|
9
8
|
import { useI18n } from '../hooks/useI18n';
|
|
9
|
+
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
10
10
|
|
|
11
11
|
const HelpSupportScreen: React.FC<BaseScreenProps> = ({
|
|
12
12
|
onClose,
|
|
@@ -14,6 +14,8 @@ const HelpSupportScreen: React.FC<BaseScreenProps> = ({
|
|
|
14
14
|
navigate,
|
|
15
15
|
}) => {
|
|
16
16
|
const { t } = useI18n();
|
|
17
|
+
|
|
18
|
+
useSurfaceHeader({ title: t('help.title') || 'Help & Support' });
|
|
17
19
|
const bloomTheme = useTheme();
|
|
18
20
|
|
|
19
21
|
const handleContactSupport = useMemo(() => () => {
|
|
@@ -55,16 +57,9 @@ const HelpSupportScreen: React.FC<BaseScreenProps> = ({
|
|
|
55
57
|
}, [t]);
|
|
56
58
|
|
|
57
59
|
return (
|
|
58
|
-
|
|
59
|
-
<Header
|
|
60
|
-
title={t('help.title') || 'Help & Support'}
|
|
61
|
-
onBack={goBack || onClose}
|
|
62
|
-
variant="minimal"
|
|
63
|
-
elevation="subtle"
|
|
64
|
-
/>
|
|
60
|
+
<>
|
|
65
61
|
|
|
66
|
-
<
|
|
67
|
-
<View className="px-screen-margin pb-space-24">
|
|
62
|
+
<View className="px-screen-margin pb-space-24">
|
|
68
63
|
{/* Help Options */}
|
|
69
64
|
<SettingsListGroup title={t('help.options') || 'Get Help'}>
|
|
70
65
|
<SettingsListItem
|
|
@@ -109,8 +104,7 @@ const HelpSupportScreen: React.FC<BaseScreenProps> = ({
|
|
|
109
104
|
/>
|
|
110
105
|
</SettingsListGroup>
|
|
111
106
|
</View>
|
|
112
|
-
|
|
113
|
-
</View>
|
|
107
|
+
</>
|
|
114
108
|
);
|
|
115
109
|
};
|
|
116
110
|
|