@oxyhq/services 5.14.0 → 5.15.1
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/README.md +130 -54
- package/lib/commonjs/assets/assets/lottie/welcomeheader_background_op1.json +1 -0
- package/lib/commonjs/assets/lottie/welcomeheader_background_op1.json +1 -0
- package/lib/commonjs/core/HttpService.js +94 -4
- package/lib/commonjs/core/HttpService.js.map +1 -1
- package/lib/commonjs/core/OxyServices.base.js +3 -1
- package/lib/commonjs/core/OxyServices.base.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.assets.js +213 -22
- package/lib/commonjs/core/mixins/OxyServices.assets.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.auth.js +70 -99
- package/lib/commonjs/core/mixins/OxyServices.auth.js.map +1 -1
- package/lib/commonjs/crypto/index.js +33 -0
- package/lib/commonjs/crypto/index.js.map +1 -0
- package/lib/commonjs/crypto/keyManager.js +208 -0
- package/lib/commonjs/crypto/keyManager.js.map +1 -0
- package/lib/commonjs/crypto/recoveryPhrase.js +137 -0
- package/lib/commonjs/crypto/recoveryPhrase.js.map +1 -0
- package/lib/commonjs/crypto/signatureService.js +251 -0
- package/lib/commonjs/crypto/signatureService.js.map +1 -0
- package/lib/commonjs/i18n/locales/en-US.json +4 -0
- package/lib/commonjs/index.js +22 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/ActivityIndicator.js +203 -0
- package/lib/commonjs/ui/components/ActivityIndicator.js.map +1 -0
- package/lib/commonjs/ui/components/AutoHeightScrollView.js +46 -0
- package/lib/commonjs/ui/components/AutoHeightScrollView.js.map +1 -0
- package/lib/commonjs/ui/components/BottomSheet.js +407 -0
- package/lib/commonjs/ui/components/BottomSheet.js.map +1 -0
- package/lib/commonjs/ui/components/BottomSheetRouter.js +366 -0
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -0
- package/lib/commonjs/ui/components/CrossFadeIcon.js +106 -0
- package/lib/commonjs/ui/components/CrossFadeIcon.js.map +1 -0
- package/lib/commonjs/ui/components/EmptyState.js +41 -0
- package/lib/commonjs/ui/components/EmptyState.js.map +1 -0
- package/lib/commonjs/ui/components/GroupedItem.js +87 -82
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedSection.js +25 -25
- package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js +111 -47
- package/lib/commonjs/ui/components/Header.js.map +1 -1
- package/lib/commonjs/ui/components/HelperText.js +103 -0
- package/lib/commonjs/ui/components/HelperText.js.map +1 -0
- package/lib/commonjs/ui/components/Icon.js +109 -0
- package/lib/commonjs/ui/components/Icon.js.map +1 -0
- package/lib/commonjs/ui/components/IconButton/IconButton.js +159 -0
- package/lib/commonjs/ui/components/IconButton/IconButton.js.map +1 -0
- package/lib/commonjs/ui/components/IconButton/utils.js +155 -0
- package/lib/commonjs/ui/components/IconButton/utils.js.map +1 -0
- package/lib/commonjs/ui/components/LoadingState.js +47 -0
- package/lib/commonjs/ui/components/LoadingState.js.map +1 -0
- package/lib/commonjs/ui/components/OxyPayButton.js +1 -14
- package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +41 -391
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +9 -13
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js +7 -4
- package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
- package/lib/commonjs/ui/components/QuickActions.js +7 -4
- package/lib/commonjs/ui/components/QuickActions.js.map +1 -1
- package/lib/commonjs/ui/components/Section.js +4 -1
- package/lib/commonjs/ui/components/Section.js.map +1 -1
- package/lib/commonjs/ui/components/SectionTitle.js +6 -3
- package/lib/commonjs/ui/components/SectionTitle.js.map +1 -1
- package/lib/commonjs/ui/components/SettingRow.js +77 -0
- package/lib/commonjs/ui/components/SettingRow.js.map +1 -0
- package/lib/commonjs/ui/components/StepBasedScreen.js +188 -172
- package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/commonjs/ui/components/Surface.js +258 -0
- package/lib/commonjs/ui/components/Surface.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Addons/Outline.js +46 -0
- package/lib/commonjs/ui/components/TextField/Addons/Outline.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Addons/Underline.js +53 -0
- package/lib/commonjs/ui/components/TextField/Addons/Underline.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAdornment.js +155 -0
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAdornment.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAffix.js +144 -0
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAffix.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldIcon.js +137 -0
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldIcon.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Adornment/enums.js +22 -0
- package/lib/commonjs/ui/components/TextField/Adornment/enums.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Adornment/types.js +6 -0
- package/lib/commonjs/ui/components/TextField/Adornment/types.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Adornment/utils.js +62 -0
- package/lib/commonjs/ui/components/TextField/Adornment/utils.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Label/InputLabel.js +176 -0
- package/lib/commonjs/ui/components/TextField/Label/InputLabel.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Label/LabelBackground.js +84 -0
- package/lib/commonjs/ui/components/TextField/Label/LabelBackground.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/TextFieldFlat.js +377 -0
- package/lib/commonjs/ui/components/TextField/TextFieldFlat.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/TextFieldOutlined.js +361 -0
- package/lib/commonjs/ui/components/TextField/TextFieldOutlined.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/constants.js +50 -0
- package/lib/commonjs/ui/components/TextField/constants.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/helpers.js +490 -0
- package/lib/commonjs/ui/components/TextField/helpers.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/types.js +6 -0
- package/lib/commonjs/ui/components/TextField/types.js.map +1 -0
- package/lib/commonjs/ui/components/TextField.js +339 -0
- package/lib/commonjs/ui/components/TextField.js.map +1 -0
- package/lib/commonjs/ui/components/TouchableRipple/Pressable.js +12 -0
- package/lib/commonjs/ui/components/TouchableRipple/Pressable.js.map +1 -0
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.js +258 -0
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.js.map +1 -0
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.native.js +107 -0
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.native.js.map +1 -0
- package/lib/commonjs/ui/components/TouchableRipple/utils.js +56 -0
- package/lib/commonjs/ui/components/TouchableRipple/utils.js.map +1 -0
- package/lib/commonjs/ui/components/Typography/AnimatedText.js +62 -0
- package/lib/commonjs/ui/components/Typography/AnimatedText.js.map +1 -0
- package/lib/commonjs/ui/components/Typography/types.js +26 -0
- package/lib/commonjs/ui/components/Typography/types.js.map +1 -0
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +171 -0
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -0
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +409 -0
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -0
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +181 -0
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -0
- package/lib/commonjs/ui/components/fileManagement/styles.js +868 -0
- package/lib/commonjs/ui/components/fileManagement/styles.js.map +1 -0
- package/lib/commonjs/ui/components/index.js +29 -1
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/profile/EditBioModal.js +181 -0
- package/lib/commonjs/ui/components/profile/EditBioModal.js.map +1 -0
- package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js +207 -0
- package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js.map +1 -0
- package/lib/commonjs/ui/components/profile/EditEmailModal.js +184 -0
- package/lib/commonjs/ui/components/profile/EditEmailModal.js.map +1 -0
- package/lib/commonjs/ui/components/profile/EditLinksModal.js +315 -0
- package/lib/commonjs/ui/components/profile/EditLinksModal.js.map +1 -0
- package/lib/commonjs/ui/components/profile/EditLocationModal.js +273 -0
- package/lib/commonjs/ui/components/profile/EditLocationModal.js.map +1 -0
- package/lib/commonjs/ui/components/profile/EditUsernameModal.js +180 -0
- package/lib/commonjs/ui/components/profile/EditUsernameModal.js.map +1 -0
- package/lib/commonjs/ui/components/profile/TwoFactorSetupModal.js +467 -0
- package/lib/commonjs/ui/components/profile/TwoFactorSetupModal.js.map +1 -0
- package/lib/commonjs/ui/components/styles/overlay.js +85 -0
- package/lib/commonjs/ui/components/styles/overlay.js.map +1 -0
- package/lib/commonjs/ui/components/styles/shadow.js +132 -0
- package/lib/commonjs/ui/components/styles/shadow.js.map +1 -0
- package/lib/commonjs/ui/components/theming.js +116 -0
- package/lib/commonjs/ui/components/theming.js.map +1 -0
- package/lib/commonjs/ui/components/types.js +2 -0
- package/lib/commonjs/ui/components/types.js.map +1 -0
- package/lib/commonjs/ui/components/utils/forwardRef.js +18 -0
- package/lib/commonjs/ui/components/utils/forwardRef.js.map +1 -0
- package/lib/commonjs/ui/components/utils/hasTouchHandler.js +13 -0
- package/lib/commonjs/ui/components/utils/hasTouchHandler.js.map +1 -0
- package/lib/commonjs/ui/components/utils/roundLayoutSize.js +9 -0
- package/lib/commonjs/ui/components/utils/roundLayoutSize.js.map +1 -0
- package/lib/commonjs/ui/components/utils/splitStyles.js +50 -0
- package/lib/commonjs/ui/components/utils/splitStyles.js.map +1 -0
- package/lib/commonjs/ui/constants/iconColors.js +84 -0
- package/lib/commonjs/ui/constants/iconColors.js.map +1 -0
- package/lib/commonjs/ui/constants/spacing.js +50 -0
- package/lib/commonjs/ui/constants/spacing.js.map +1 -0
- package/lib/commonjs/ui/constants/theme.js +123 -0
- package/lib/commonjs/ui/constants/theme.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +198 -853
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/ThemeContext.js +36 -0
- package/lib/commonjs/ui/context/ThemeContext.js.map +1 -0
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +349 -0
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -0
- package/lib/commonjs/ui/context/hooks/useDeviceManagement.js +73 -0
- package/lib/commonjs/ui/context/hooks/useDeviceManagement.js.map +1 -0
- package/lib/commonjs/ui/context/hooks/useLanguageManagement.js +112 -0
- package/lib/commonjs/ui/context/hooks/useLanguageManagement.js.map +1 -0
- package/lib/commonjs/ui/context/hooks/useSessionManagement.js +261 -0
- package/lib/commonjs/ui/context/hooks/useSessionManagement.js.map +1 -0
- package/lib/commonjs/ui/context/hooks/useStorage.js +79 -0
- package/lib/commonjs/ui/context/hooks/useStorage.js.map +1 -0
- package/lib/commonjs/ui/context/utils/errorHandlers.js +90 -0
- package/lib/commonjs/ui/context/utils/errorHandlers.js.map +1 -0
- package/lib/commonjs/ui/context/utils/sessionHelpers.js +103 -0
- package/lib/commonjs/ui/context/utils/sessionHelpers.js.map +1 -0
- package/lib/commonjs/ui/context/utils/storageHelpers.js +119 -0
- package/lib/commonjs/ui/context/utils/storageHelpers.js.map +1 -0
- package/lib/commonjs/ui/hooks/index.js +14 -0
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/use-color-scheme.js +29 -0
- package/lib/commonjs/ui/hooks/use-color-scheme.js.map +1 -0
- package/lib/commonjs/ui/hooks/use-haptic-press.js +21 -0
- package/lib/commonjs/ui/hooks/use-haptic-press.js.map +1 -0
- package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
- package/lib/commonjs/ui/hooks/useDeviceManagement.js +73 -0
- package/lib/commonjs/ui/hooks/useDeviceManagement.js.map +1 -0
- package/lib/commonjs/ui/hooks/useLanguageManagement.js +112 -0
- package/lib/commonjs/ui/hooks/useLanguageManagement.js.map +1 -0
- package/lib/commonjs/ui/hooks/useProfileEditing.js +123 -0
- package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSessionManagement.js +261 -0
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -0
- package/lib/commonjs/ui/hooks/useStorage.js +79 -0
- package/lib/commonjs/ui/hooks/useStorage.js.map +1 -0
- package/lib/commonjs/ui/hooks/useThemeColors.js +31 -0
- package/lib/commonjs/ui/hooks/useThemeColors.js.map +1 -0
- package/lib/commonjs/ui/hooks/useThemeStyles.js +69 -0
- package/lib/commonjs/ui/hooks/useThemeStyles.js.map +1 -0
- package/lib/commonjs/ui/index.js +1 -4
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/bottomSheetManager.js +180 -0
- package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -0
- package/lib/commonjs/ui/navigation/routes.js +80 -154
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +67 -67
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +217 -98
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +514 -429
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +44 -59
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +12 -19
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +36 -43
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +14 -14
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +674 -1968
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +26 -23
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +19 -59
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +79 -170
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +13 -40
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +436 -0
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +18 -24
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +21 -9
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +180 -252
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +7 -5
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +32 -70
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +26 -99
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +24 -16
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +8 -10
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +64 -67
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +11 -8
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +124 -122
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +99 -112
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +12 -9
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +552 -79
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +12 -8
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/styles/authStyles.js +5 -11
- package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
- package/lib/commonjs/ui/styles/spacing.js +60 -2
- package/lib/commonjs/ui/styles/spacing.js.map +1 -1
- package/lib/commonjs/ui/styles/theme.js +1 -1
- package/lib/commonjs/ui/types/fileManagement.js +6 -0
- package/lib/commonjs/ui/types/fileManagement.js.map +1 -0
- package/lib/commonjs/ui/types/navigation.js +6 -0
- package/lib/commonjs/ui/types/navigation.js.map +1 -0
- package/lib/commonjs/ui/utils/colorUtils.js +52 -0
- package/lib/commonjs/ui/utils/colorUtils.js.map +1 -0
- package/lib/commonjs/ui/utils/errorHandlers.js +90 -0
- package/lib/commonjs/ui/utils/errorHandlers.js.map +1 -0
- package/lib/commonjs/ui/utils/fileManagement.js +181 -0
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -0
- package/lib/commonjs/ui/utils/sessionHelpers.js +103 -0
- package/lib/commonjs/ui/utils/sessionHelpers.js.map +1 -0
- package/lib/commonjs/ui/utils/storageHelpers.js +119 -0
- package/lib/commonjs/ui/utils/storageHelpers.js.map +1 -0
- package/lib/commonjs/ui/utils/themeUtils.js +47 -0
- package/lib/commonjs/ui/utils/themeUtils.js.map +1 -0
- package/lib/commonjs/ui/utils/user-utils.js +53 -0
- package/lib/commonjs/ui/utils/user-utils.js.map +1 -0
- package/lib/commonjs/utils/errorUtils.js +14 -4
- package/lib/commonjs/utils/errorUtils.js.map +1 -1
- package/lib/module/assets/assets/lottie/welcomeheader_background_op1.json +1 -0
- package/lib/module/assets/lottie/welcomeheader_background_op1.json +1 -0
- package/lib/module/core/HttpService.js +94 -4
- package/lib/module/core/HttpService.js.map +1 -1
- package/lib/module/core/OxyServices.base.js +3 -1
- package/lib/module/core/OxyServices.base.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.assets.js +212 -20
- package/lib/module/core/mixins/OxyServices.assets.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.auth.js +70 -99
- package/lib/module/core/mixins/OxyServices.auth.js.map +1 -1
- package/lib/module/crypto/index.js +16 -0
- package/lib/module/crypto/index.js.map +1 -0
- package/lib/module/crypto/keyManager.js +204 -0
- package/lib/module/crypto/keyManager.js.map +1 -0
- package/lib/module/crypto/recoveryPhrase.js +131 -0
- package/lib/module/crypto/recoveryPhrase.js.map +1 -0
- package/lib/module/crypto/signatureService.js +248 -0
- package/lib/module/crypto/signatureService.js.map +1 -0
- package/lib/module/i18n/locales/en-US.json +4 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/ActivityIndicator.js +198 -0
- package/lib/module/ui/components/ActivityIndicator.js.map +1 -0
- package/lib/module/ui/components/AutoHeightScrollView.js +41 -0
- package/lib/module/ui/components/AutoHeightScrollView.js.map +1 -0
- package/lib/module/ui/components/BottomSheet.js +402 -0
- package/lib/module/ui/components/BottomSheet.js.map +1 -0
- package/lib/module/ui/components/BottomSheetRouter.js +356 -0
- package/lib/module/ui/components/BottomSheetRouter.js.map +1 -0
- package/lib/module/ui/components/CrossFadeIcon.js +101 -0
- package/lib/module/ui/components/CrossFadeIcon.js.map +1 -0
- package/lib/module/ui/components/EmptyState.js +36 -0
- package/lib/module/ui/components/EmptyState.js.map +1 -0
- package/lib/module/ui/components/GroupedItem.js +88 -82
- package/lib/module/ui/components/GroupedItem.js.map +1 -1
- package/lib/module/ui/components/GroupedSection.js +23 -23
- package/lib/module/ui/components/GroupedSection.js.map +1 -1
- package/lib/module/ui/components/Header.js +109 -46
- package/lib/module/ui/components/Header.js.map +1 -1
- package/lib/module/ui/components/HelperText.js +99 -0
- package/lib/module/ui/components/HelperText.js.map +1 -0
- package/lib/module/ui/components/Icon.js +102 -0
- package/lib/module/ui/components/Icon.js.map +1 -0
- package/lib/module/ui/components/IconButton/IconButton.js +153 -0
- package/lib/module/ui/components/IconButton/IconButton.js.map +1 -0
- package/lib/module/ui/components/IconButton/utils.js +149 -0
- package/lib/module/ui/components/IconButton/utils.js.map +1 -0
- package/lib/module/ui/components/LoadingState.js +42 -0
- package/lib/module/ui/components/LoadingState.js.map +1 -0
- package/lib/module/ui/components/OxyPayButton.js +1 -14
- package/lib/module/ui/components/OxyPayButton.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +45 -396
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +9 -13
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +7 -4
- package/lib/module/ui/components/ProfileCard.js.map +1 -1
- package/lib/module/ui/components/QuickActions.js +7 -4
- package/lib/module/ui/components/QuickActions.js.map +1 -1
- package/lib/module/ui/components/Section.js +4 -1
- package/lib/module/ui/components/Section.js.map +1 -1
- package/lib/module/ui/components/SectionTitle.js +6 -3
- package/lib/module/ui/components/SectionTitle.js.map +1 -1
- package/lib/module/ui/components/SettingRow.js +72 -0
- package/lib/module/ui/components/SettingRow.js.map +1 -0
- package/lib/module/ui/components/StepBasedScreen.js +190 -174
- package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/module/ui/components/Surface.js +252 -0
- package/lib/module/ui/components/Surface.js.map +1 -0
- package/lib/module/ui/components/TextField/Addons/Outline.js +40 -0
- package/lib/module/ui/components/TextField/Addons/Outline.js.map +1 -0
- package/lib/module/ui/components/TextField/Addons/Underline.js +47 -0
- package/lib/module/ui/components/TextField/Addons/Underline.js.map +1 -0
- package/lib/module/ui/components/TextField/Adornment/TextFieldAdornment.js +148 -0
- package/lib/module/ui/components/TextField/Adornment/TextFieldAdornment.js.map +1 -0
- package/lib/module/ui/components/TextField/Adornment/TextFieldAffix.js +141 -0
- package/lib/module/ui/components/TextField/Adornment/TextFieldAffix.js.map +1 -0
- package/lib/module/ui/components/TextField/Adornment/TextFieldIcon.js +135 -0
- package/lib/module/ui/components/TextField/Adornment/TextFieldIcon.js.map +1 -0
- package/lib/module/ui/components/TextField/Adornment/enums.js +18 -0
- package/lib/module/ui/components/TextField/Adornment/enums.js.map +1 -0
- package/lib/module/ui/components/TextField/Adornment/types.js +4 -0
- package/lib/module/ui/components/TextField/Adornment/types.js.map +1 -0
- package/lib/module/ui/components/TextField/Adornment/utils.js +57 -0
- package/lib/module/ui/components/TextField/Adornment/utils.js.map +1 -0
- package/lib/module/ui/components/TextField/Label/InputLabel.js +171 -0
- package/lib/module/ui/components/TextField/Label/InputLabel.js.map +1 -0
- package/lib/module/ui/components/TextField/Label/LabelBackground.js +78 -0
- package/lib/module/ui/components/TextField/Label/LabelBackground.js.map +1 -0
- package/lib/module/ui/components/TextField/TextFieldFlat.js +372 -0
- package/lib/module/ui/components/TextField/TextFieldFlat.js.map +1 -0
- package/lib/module/ui/components/TextField/TextFieldOutlined.js +355 -0
- package/lib/module/ui/components/TextField/TextFieldOutlined.js.map +1 -0
- package/lib/module/ui/components/TextField/constants.js +46 -0
- package/lib/module/ui/components/TextField/constants.js.map +1 -0
- package/lib/module/ui/components/TextField/helpers.js +472 -0
- package/lib/module/ui/components/TextField/helpers.js.map +1 -0
- package/lib/module/ui/components/TextField/types.js +4 -0
- package/lib/module/ui/components/TextField/types.js.map +1 -0
- package/lib/module/ui/components/TextField.js +333 -0
- package/lib/module/ui/components/TextField.js.map +1 -0
- package/lib/module/ui/components/TouchableRipple/Pressable.js +9 -0
- package/lib/module/ui/components/TouchableRipple/Pressable.js.map +1 -0
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.js +253 -0
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.js.map +1 -0
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.native.js +101 -0
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.native.js.map +1 -0
- package/lib/module/ui/components/TouchableRipple/utils.js +50 -0
- package/lib/module/ui/components/TouchableRipple/utils.js.map +1 -0
- package/lib/module/ui/components/Typography/AnimatedText.js +56 -0
- package/lib/module/ui/components/Typography/AnimatedText.js.map +1 -0
- package/lib/module/ui/components/Typography/types.js +22 -0
- package/lib/module/ui/components/Typography/types.js.map +1 -0
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +165 -0
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -0
- package/lib/module/ui/components/fileManagement/FileViewer.js +402 -0
- package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -0
- package/lib/module/ui/components/fileManagement/UploadPreview.js +175 -0
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -0
- package/lib/module/ui/components/fileManagement/styles.js +864 -0
- package/lib/module/ui/components/fileManagement/styles.js.map +1 -0
- package/lib/module/ui/components/index.js +4 -1
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/profile/EditBioModal.js +175 -0
- package/lib/module/ui/components/profile/EditBioModal.js.map +1 -0
- package/lib/module/ui/components/profile/EditDisplayNameModal.js +201 -0
- package/lib/module/ui/components/profile/EditDisplayNameModal.js.map +1 -0
- package/lib/module/ui/components/profile/EditEmailModal.js +178 -0
- package/lib/module/ui/components/profile/EditEmailModal.js.map +1 -0
- package/lib/module/ui/components/profile/EditLinksModal.js +309 -0
- package/lib/module/ui/components/profile/EditLinksModal.js.map +1 -0
- package/lib/module/ui/components/profile/EditLocationModal.js +267 -0
- package/lib/module/ui/components/profile/EditLocationModal.js.map +1 -0
- package/lib/module/ui/components/profile/EditUsernameModal.js +174 -0
- package/lib/module/ui/components/profile/EditUsernameModal.js.map +1 -0
- package/lib/module/ui/components/profile/TwoFactorSetupModal.js +460 -0
- package/lib/module/ui/components/profile/TwoFactorSetupModal.js.map +1 -0
- package/lib/module/ui/components/styles/overlay.js +80 -0
- package/lib/module/ui/components/styles/overlay.js.map +1 -0
- package/lib/module/ui/components/styles/shadow.js +128 -0
- package/lib/module/ui/components/styles/shadow.js.map +1 -0
- package/lib/module/ui/components/theming.js +111 -0
- package/lib/module/ui/components/theming.js.map +1 -0
- package/lib/module/ui/components/types.js +2 -0
- package/lib/module/ui/components/types.js.map +1 -0
- package/lib/module/ui/components/utils/forwardRef.js +13 -0
- package/lib/module/ui/components/utils/forwardRef.js.map +1 -0
- package/lib/module/ui/components/utils/hasTouchHandler.js +9 -0
- package/lib/module/ui/components/utils/hasTouchHandler.js.map +1 -0
- package/lib/module/ui/components/utils/roundLayoutSize.js +4 -0
- package/lib/module/ui/components/utils/roundLayoutSize.js.map +1 -0
- package/lib/module/ui/components/utils/splitStyles.js +46 -0
- package/lib/module/ui/components/utils/splitStyles.js.map +1 -0
- package/lib/module/ui/constants/iconColors.js +78 -0
- package/lib/module/ui/constants/iconColors.js.map +1 -0
- package/lib/module/ui/constants/spacing.js +45 -0
- package/lib/module/ui/constants/spacing.js.map +1 -0
- package/lib/module/ui/constants/theme.js +119 -0
- package/lib/module/ui/constants/theme.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +199 -855
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/ThemeContext.js +29 -0
- package/lib/module/ui/context/ThemeContext.js.map +1 -0
- package/lib/module/ui/context/hooks/useAuthOperations.js +344 -0
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -0
- package/lib/module/ui/context/hooks/useDeviceManagement.js +68 -0
- package/lib/module/ui/context/hooks/useDeviceManagement.js.map +1 -0
- package/lib/module/ui/context/hooks/useLanguageManagement.js +107 -0
- package/lib/module/ui/context/hooks/useLanguageManagement.js.map +1 -0
- package/lib/module/ui/context/hooks/useSessionManagement.js +256 -0
- package/lib/module/ui/context/hooks/useSessionManagement.js.map +1 -0
- package/lib/module/ui/context/hooks/useStorage.js +74 -0
- package/lib/module/ui/context/hooks/useStorage.js.map +1 -0
- package/lib/module/ui/context/utils/errorHandlers.js +83 -0
- package/lib/module/ui/context/utils/errorHandlers.js.map +1 -0
- package/lib/module/ui/context/utils/sessionHelpers.js +96 -0
- package/lib/module/ui/context/utils/sessionHelpers.js.map +1 -0
- package/lib/module/ui/context/utils/storageHelpers.js +111 -0
- package/lib/module/ui/context/utils/storageHelpers.js.map +1 -0
- package/lib/module/ui/hooks/index.js +2 -0
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/use-color-scheme.js +26 -0
- package/lib/module/ui/hooks/use-color-scheme.js.map +1 -0
- package/lib/module/ui/hooks/use-haptic-press.js +17 -0
- package/lib/module/ui/hooks/use-haptic-press.js.map +1 -0
- package/lib/module/ui/hooks/useAssets.js.map +1 -1
- package/lib/module/ui/hooks/useDeviceManagement.js +68 -0
- package/lib/module/ui/hooks/useDeviceManagement.js.map +1 -0
- package/lib/module/ui/hooks/useLanguageManagement.js +107 -0
- package/lib/module/ui/hooks/useLanguageManagement.js.map +1 -0
- package/lib/module/ui/hooks/useProfileEditing.js +118 -0
- package/lib/module/ui/hooks/useProfileEditing.js.map +1 -0
- package/lib/module/ui/hooks/useSessionManagement.js +256 -0
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -0
- package/lib/module/ui/hooks/useStorage.js +74 -0
- package/lib/module/ui/hooks/useStorage.js.map +1 -0
- package/lib/module/ui/hooks/useThemeColors.js +27 -0
- package/lib/module/ui/hooks/useThemeColors.js.map +1 -0
- package/lib/module/ui/hooks/useThemeStyles.js +64 -0
- package/lib/module/ui/hooks/useThemeStyles.js.map +1 -0
- package/lib/module/ui/index.js +2 -4
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/bottomSheetManager.js +168 -0
- package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -0
- package/lib/module/ui/navigation/routes.js +77 -152
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +67 -67
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +218 -100
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +515 -430
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +45 -60
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +12 -19
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +36 -43
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +14 -14
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +670 -1965
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +26 -23
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +22 -62
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +80 -171
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +16 -43
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +432 -0
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -0
- package/lib/module/ui/screens/PaymentGatewayScreen.js +18 -24
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +21 -9
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +167 -239
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +7 -5
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +35 -73
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +29 -102
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +24 -16
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +8 -10
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +65 -68
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +11 -8
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +124 -121
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +101 -114
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +12 -9
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +554 -81
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +12 -8
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/module/ui/styles/authStyles.js +5 -11
- package/lib/module/ui/styles/authStyles.js.map +1 -1
- package/lib/module/ui/styles/spacing.js +12 -2
- package/lib/module/ui/styles/spacing.js.map +1 -1
- package/lib/module/ui/styles/theme.js +1 -1
- package/lib/module/ui/types/fileManagement.js +4 -0
- package/lib/module/ui/types/fileManagement.js.map +1 -0
- package/lib/module/ui/types/navigation.js +4 -0
- package/lib/module/ui/types/navigation.js.map +1 -0
- package/lib/module/ui/utils/colorUtils.js +46 -0
- package/lib/module/ui/utils/colorUtils.js.map +1 -0
- package/lib/module/ui/utils/errorHandlers.js +83 -0
- package/lib/module/ui/utils/errorHandlers.js.map +1 -0
- package/lib/module/ui/utils/fileManagement.js +172 -0
- package/lib/module/ui/utils/fileManagement.js.map +1 -0
- package/lib/module/ui/utils/sessionHelpers.js +96 -0
- package/lib/module/ui/utils/sessionHelpers.js.map +1 -0
- package/lib/module/ui/utils/storageHelpers.js +111 -0
- package/lib/module/ui/utils/storageHelpers.js.map +1 -0
- package/lib/module/ui/utils/themeUtils.js +41 -0
- package/lib/module/ui/utils/themeUtils.js.map +1 -0
- package/lib/module/ui/utils/user-utils.js +46 -0
- package/lib/module/ui/utils/user-utils.js.map +1 -0
- package/lib/module/utils/errorUtils.js +14 -4
- package/lib/module/utils/errorUtils.js.map +1 -1
- package/lib/typescript/core/HttpService.d.ts +48 -0
- package/lib/typescript/core/HttpService.d.ts.map +1 -1
- package/lib/typescript/core/OxyServices.base.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.analytics.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.assets.d.ts +23 -1
- package/lib/typescript/core/mixins/OxyServices.assets.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts +70 -42
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.developer.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.devices.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.karma.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.language.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.location.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.payment.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.privacy.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.totp.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.user.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.utility.d.ts.map +1 -1
- package/lib/typescript/core/mixins/index.d.ts +26 -34
- package/lib/typescript/core/mixins/index.d.ts.map +1 -1
- package/lib/typescript/crypto/index.d.ts +11 -0
- package/lib/typescript/crypto/index.d.ts.map +1 -0
- package/lib/typescript/crypto/keyManager.d.ts +73 -0
- package/lib/typescript/crypto/keyManager.d.ts.map +1 -0
- package/lib/typescript/crypto/recoveryPhrase.d.ts +57 -0
- package/lib/typescript/crypto/recoveryPhrase.d.ts.map +1 -0
- package/lib/typescript/crypto/signatureService.d.ts +81 -0
- package/lib/typescript/crypto/signatureService.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +1 -0
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/types/bip39.d.ts +29 -0
- package/lib/typescript/types/color.d.ts +19 -0
- package/lib/typescript/types/elliptic.d.ts +61 -0
- package/lib/typescript/types/expo-crypto.d.ts +29 -0
- package/lib/typescript/types/expo-random.d.ts +9 -0
- package/lib/typescript/types/expo-secure-store.d.ts +21 -0
- package/lib/typescript/types/expo-vector-icons.d.ts +9 -0
- package/lib/typescript/ui/components/ActivityIndicator.d.ts +45 -0
- package/lib/typescript/ui/components/ActivityIndicator.d.ts.map +1 -0
- package/lib/typescript/ui/components/AutoHeightScrollView.d.ts +23 -0
- package/lib/typescript/ui/components/AutoHeightScrollView.d.ts.map +1 -0
- package/lib/typescript/ui/components/BottomSheet.d.ts +29 -0
- package/lib/typescript/ui/components/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/ui/components/BottomSheetRouter.d.ts +14 -0
- package/lib/typescript/ui/components/BottomSheetRouter.d.ts.map +1 -0
- package/lib/typescript/ui/components/CrossFadeIcon.d.ts +27 -0
- package/lib/typescript/ui/components/CrossFadeIcon.d.ts.map +1 -0
- package/lib/typescript/ui/components/EmptyState.d.ts +8 -0
- package/lib/typescript/ui/components/EmptyState.d.ts.map +1 -0
- package/lib/typescript/ui/components/GroupedItem.d.ts +5 -9
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedSection.d.ts +6 -7
- package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -1
- package/lib/typescript/ui/components/Header.d.ts +6 -1
- package/lib/typescript/ui/components/Header.d.ts.map +1 -1
- package/lib/typescript/ui/components/HelperText.d.ts +47 -0
- package/lib/typescript/ui/components/HelperText.d.ts.map +1 -0
- package/lib/typescript/ui/components/Icon.d.ts +60 -0
- package/lib/typescript/ui/components/Icon.d.ts.map +1 -0
- package/lib/typescript/ui/components/IconButton/IconButton.d.ts +99 -0
- package/lib/typescript/ui/components/IconButton/IconButton.d.ts.map +1 -0
- package/lib/typescript/ui/components/IconButton/utils.d.ts +19 -0
- package/lib/typescript/ui/components/IconButton/utils.d.ts.map +1 -0
- package/lib/typescript/ui/components/LoadingState.d.ts +9 -0
- package/lib/typescript/ui/components/LoadingState.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyProvider.d.ts +4 -5
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxySignInButton.d.ts +3 -8
- package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -1
- package/lib/typescript/ui/components/QuickActions.d.ts.map +1 -1
- package/lib/typescript/ui/components/Section.d.ts +1 -1
- package/lib/typescript/ui/components/Section.d.ts.map +1 -1
- package/lib/typescript/ui/components/SectionTitle.d.ts +1 -1
- package/lib/typescript/ui/components/SectionTitle.d.ts.map +1 -1
- package/lib/typescript/ui/components/SettingRow.d.ts +14 -0
- package/lib/typescript/ui/components/SettingRow.d.ts.map +1 -0
- package/lib/typescript/ui/components/StepBasedScreen.d.ts +3 -2
- package/lib/typescript/ui/components/StepBasedScreen.d.ts.map +1 -1
- package/lib/typescript/ui/components/Surface.d.ts +76 -0
- package/lib/typescript/ui/components/Surface.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Addons/Outline.d.ts +16 -0
- package/lib/typescript/ui/components/TextField/Addons/Outline.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Addons/Underline.d.ts +19 -0
- package/lib/typescript/ui/components/TextField/Addons/Underline.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Adornment/TextFieldAdornment.d.ts +45 -0
- package/lib/typescript/ui/components/TextField/Adornment/TextFieldAdornment.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Adornment/TextFieldAffix.d.ts +73 -0
- package/lib/typescript/ui/components/TextField/Adornment/TextFieldAffix.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Adornment/TextFieldIcon.d.ts +78 -0
- package/lib/typescript/ui/components/TextField/Adornment/TextFieldIcon.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Adornment/enums.d.ts +13 -0
- package/lib/typescript/ui/components/TextField/Adornment/enums.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Adornment/types.d.ts +12 -0
- package/lib/typescript/ui/components/TextField/Adornment/types.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Adornment/utils.d.ts +12 -0
- package/lib/typescript/ui/components/TextField/Adornment/utils.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Label/InputLabel.d.ts +5 -0
- package/lib/typescript/ui/components/TextField/Label/InputLabel.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Label/LabelBackground.d.ts +4 -0
- package/lib/typescript/ui/components/TextField/Label/LabelBackground.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/TextFieldFlat.d.ts +4 -0
- package/lib/typescript/ui/components/TextField/TextFieldFlat.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/TextFieldOutlined.d.ts +4 -0
- package/lib/typescript/ui/components/TextField/TextFieldOutlined.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/constants.d.ts +32 -0
- package/lib/typescript/ui/components/TextField/constants.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/helpers.d.ts +97 -0
- package/lib/typescript/ui/components/TextField/helpers.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/types.d.ts +156 -0
- package/lib/typescript/ui/components/TextField/types.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField.d.ts +192 -0
- package/lib/typescript/ui/components/TextField.d.ts.map +1 -0
- package/lib/typescript/ui/components/TouchableRipple/Pressable.d.ts +13 -0
- package/lib/typescript/ui/components/TouchableRipple/Pressable.d.ts.map +1 -0
- package/lib/typescript/ui/components/TouchableRipple/TouchableRipple.d.ts +62 -0
- package/lib/typescript/ui/components/TouchableRipple/TouchableRipple.d.ts.map +1 -0
- package/lib/typescript/ui/components/TouchableRipple/TouchableRipple.native.d.ts +25 -0
- package/lib/typescript/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -0
- package/lib/typescript/ui/components/TouchableRipple/utils.d.ts +11 -0
- package/lib/typescript/ui/components/TouchableRipple/utils.d.ts.map +1 -0
- package/lib/typescript/ui/components/Typography/AnimatedText.d.ts +35 -0
- package/lib/typescript/ui/components/Typography/AnimatedText.d.ts.map +1 -0
- package/lib/typescript/ui/components/Typography/types.d.ts +19 -0
- package/lib/typescript/ui/components/Typography/types.d.ts.map +1 -0
- package/lib/typescript/ui/components/fileManagement/FileDetailsModal.d.ts +15 -0
- package/lib/typescript/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/fileManagement/FileViewer.d.ts +18 -0
- package/lib/typescript/ui/components/fileManagement/FileViewer.d.ts.map +1 -0
- package/lib/typescript/ui/components/fileManagement/UploadPreview.d.ts +21 -0
- package/lib/typescript/ui/components/fileManagement/UploadPreview.d.ts.map +1 -0
- package/lib/typescript/ui/components/fileManagement/styles.d.ts +860 -0
- package/lib/typescript/ui/components/fileManagement/styles.d.ts.map +1 -0
- package/lib/typescript/ui/components/index.d.ts +4 -1
- package/lib/typescript/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/profile/EditBioModal.d.ts +11 -0
- package/lib/typescript/ui/components/profile/EditBioModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/profile/EditDisplayNameModal.d.ts +12 -0
- package/lib/typescript/ui/components/profile/EditDisplayNameModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/profile/EditEmailModal.d.ts +11 -0
- package/lib/typescript/ui/components/profile/EditEmailModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/profile/EditLinksModal.d.ts +18 -0
- package/lib/typescript/ui/components/profile/EditLinksModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/profile/EditLocationModal.d.ts +20 -0
- package/lib/typescript/ui/components/profile/EditLocationModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/profile/EditUsernameModal.d.ts +11 -0
- package/lib/typescript/ui/components/profile/EditUsernameModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/profile/TwoFactorSetupModal.d.ts +11 -0
- package/lib/typescript/ui/components/profile/TwoFactorSetupModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/styles/overlay.d.ts +4 -0
- package/lib/typescript/ui/components/styles/overlay.d.ts.map +1 -0
- package/lib/typescript/ui/components/styles/shadow.d.ts +3 -0
- package/lib/typescript/ui/components/styles/shadow.d.ts.map +1 -0
- package/lib/typescript/ui/components/theming.d.ts +8 -0
- package/lib/typescript/ui/components/theming.d.ts.map +1 -0
- package/lib/typescript/ui/components/types.d.ts +80 -0
- package/lib/typescript/ui/components/types.d.ts.map +1 -0
- package/lib/typescript/ui/components/utils/forwardRef.d.ts +12 -0
- package/lib/typescript/ui/components/utils/forwardRef.d.ts.map +1 -0
- package/lib/typescript/ui/components/utils/hasTouchHandler.d.ts +6 -0
- package/lib/typescript/ui/components/utils/hasTouchHandler.d.ts.map +1 -0
- package/lib/typescript/ui/components/utils/roundLayoutSize.d.ts +2 -0
- package/lib/typescript/ui/components/utils/roundLayoutSize.d.ts.map +1 -0
- package/lib/typescript/ui/components/utils/splitStyles.d.ts +20 -0
- package/lib/typescript/ui/components/utils/splitStyles.d.ts.map +1 -0
- package/lib/typescript/ui/constants/iconColors.d.ts +130 -0
- package/lib/typescript/ui/constants/iconColors.d.ts.map +1 -0
- package/lib/typescript/ui/constants/spacing.d.ts +33 -0
- package/lib/typescript/ui/constants/spacing.d.ts.map +1 -0
- package/lib/typescript/ui/constants/theme.d.ts +97 -0
- package/lib/typescript/ui/constants/theme.d.ts.map +1 -0
- package/lib/typescript/ui/context/OxyContext.d.ts +23 -17
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/context/ThemeContext.d.ts +19 -0
- package/lib/typescript/ui/context/ThemeContext.d.ts.map +1 -0
- package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts +51 -0
- package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts.map +1 -0
- package/lib/typescript/ui/context/hooks/useDeviceManagement.d.ts +27 -0
- package/lib/typescript/ui/context/hooks/useDeviceManagement.d.ts.map +1 -0
- package/lib/typescript/ui/context/hooks/useLanguageManagement.d.ts +25 -0
- package/lib/typescript/ui/context/hooks/useLanguageManagement.d.ts.map +1 -0
- package/lib/typescript/ui/context/hooks/useSessionManagement.d.ts +39 -0
- package/lib/typescript/ui/context/hooks/useSessionManagement.d.ts.map +1 -0
- package/lib/typescript/ui/context/hooks/useStorage.d.ts +22 -0
- package/lib/typescript/ui/context/hooks/useStorage.d.ts.map +1 -0
- package/lib/typescript/ui/context/utils/errorHandlers.d.ts +30 -0
- package/lib/typescript/ui/context/utils/errorHandlers.d.ts.map +1 -0
- package/lib/typescript/ui/context/utils/sessionHelpers.d.ts +59 -0
- package/lib/typescript/ui/context/utils/sessionHelpers.d.ts.map +1 -0
- package/lib/typescript/ui/context/utils/storageHelpers.d.ts +31 -0
- package/lib/typescript/ui/context/utils/storageHelpers.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/index.d.ts +2 -0
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/use-color-scheme.d.ts +8 -0
- package/lib/typescript/ui/hooks/use-color-scheme.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/use-haptic-press.d.ts +8 -0
- package/lib/typescript/ui/hooks/use-haptic-press.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useDeviceManagement.d.ts +27 -0
- package/lib/typescript/ui/hooks/useDeviceManagement.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useLanguageManagement.d.ts +25 -0
- package/lib/typescript/ui/hooks/useLanguageManagement.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useProfileEditing.d.ts +36 -0
- package/lib/typescript/ui/hooks/useProfileEditing.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useSessionManagement.d.ts +39 -0
- package/lib/typescript/ui/hooks/useSessionManagement.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useStorage.d.ts +22 -0
- package/lib/typescript/ui/hooks/useStorage.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useThemeColors.d.ts +94 -0
- package/lib/typescript/ui/hooks/useThemeColors.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useThemeStyles.d.ts +45 -0
- package/lib/typescript/ui/hooks/useThemeStyles.d.ts.map +1 -0
- package/lib/typescript/ui/index.d.ts +2 -2
- package/lib/typescript/ui/index.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/bottomSheetManager.d.ts +74 -0
- package/lib/typescript/ui/navigation/bottomSheetManager.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/routes.d.ts +4 -7
- package/lib/typescript/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountVerificationScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts +1 -36
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/HelpSupportScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/HistoryViewScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/LegalDocumentsScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/OxyAuthScreen.d.ts +16 -0
- package/lib/typescript/ui/screens/OxyAuthScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/ProfileScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SavesCollectionsScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SearchSettingsScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/UserLinksScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts +1 -2
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/ui/styles/authStyles.d.ts +0 -10
- package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -1
- package/lib/typescript/ui/styles/spacing.d.ts +7 -1
- package/lib/typescript/ui/styles/spacing.d.ts.map +1 -1
- package/lib/typescript/ui/types/fileManagement.d.ts +41 -0
- package/lib/typescript/ui/types/fileManagement.d.ts.map +1 -0
- package/lib/typescript/ui/types/navigation.d.ts +36 -0
- package/lib/typescript/ui/types/navigation.d.ts.map +1 -0
- package/lib/typescript/ui/utils/colorUtils.d.ts +14 -0
- package/lib/typescript/ui/utils/colorUtils.d.ts.map +1 -0
- package/lib/typescript/ui/utils/errorHandlers.d.ts +30 -0
- package/lib/typescript/ui/utils/errorHandlers.d.ts.map +1 -0
- package/lib/typescript/ui/utils/fileManagement.d.ts +39 -0
- package/lib/typescript/ui/utils/fileManagement.d.ts.map +1 -0
- package/lib/typescript/ui/utils/sessionHelpers.d.ts +59 -0
- package/lib/typescript/ui/utils/sessionHelpers.d.ts.map +1 -0
- package/lib/typescript/ui/utils/storageHelpers.d.ts +31 -0
- package/lib/typescript/ui/utils/storageHelpers.d.ts.map +1 -0
- package/lib/typescript/ui/utils/themeUtils.d.ts +24 -0
- package/lib/typescript/ui/utils/themeUtils.d.ts.map +1 -0
- package/lib/typescript/ui/utils/user-utils.d.ts +29 -0
- package/lib/typescript/ui/utils/user-utils.d.ts.map +1 -0
- package/lib/typescript/utils/errorUtils.d.ts.map +1 -1
- package/package.json +26 -15
- package/src/assets/lottie/welcomeheader_background_op1.json +1 -0
- package/src/core/HttpService.ts +97 -4
- package/src/core/OxyServices.base.ts +3 -1
- package/src/core/mixins/OxyServices.assets.ts +225 -27
- package/src/core/mixins/OxyServices.auth.ts +144 -80
- package/src/crypto/index.ts +21 -0
- package/src/crypto/keyManager.ts +214 -0
- package/src/crypto/recoveryPhrase.ts +147 -0
- package/src/crypto/signatureService.ts +280 -0
- package/src/i18n/locales/en-US.json +4 -0
- package/src/index.ts +13 -0
- package/src/models/interfaces.ts +1 -0
- package/src/types/bip39.d.ts +29 -0
- package/src/types/color.d.ts +19 -0
- package/src/types/elliptic.d.ts +61 -0
- package/src/types/expo-crypto.d.ts +29 -0
- package/src/types/expo-random.d.ts +9 -0
- package/src/types/expo-secure-store.d.ts +21 -0
- package/src/types/expo-vector-icons.d.ts +9 -0
- package/src/ui/components/ActivityIndicator.tsx +254 -0
- package/src/ui/components/AutoHeightScrollView.tsx +50 -0
- package/src/ui/components/BottomSheet.tsx +443 -0
- package/src/ui/components/BottomSheetRouter.tsx +407 -0
- package/src/ui/components/CrossFadeIcon.tsx +140 -0
- package/src/ui/components/EmptyState.tsx +39 -0
- package/src/ui/components/GroupedItem.tsx +98 -96
- package/src/ui/components/GroupedSection.tsx +24 -29
- package/src/ui/components/Header.tsx +129 -49
- package/src/ui/components/HelperText.tsx +160 -0
- package/src/ui/components/Icon.tsx +181 -0
- package/src/ui/components/IconButton/IconButton.tsx +235 -0
- package/src/ui/components/IconButton/utils.ts +190 -0
- package/src/ui/components/LoadingState.tsx +46 -0
- package/src/ui/components/OxyPayButton.tsx +1 -12
- package/src/ui/components/OxyProvider.tsx +49 -409
- package/src/ui/components/OxySignInButton.tsx +11 -18
- package/src/ui/components/ProfileCard.tsx +7 -4
- package/src/ui/components/QuickActions.tsx +7 -4
- package/src/ui/components/Section.tsx +6 -2
- package/src/ui/components/SectionTitle.tsx +7 -4
- package/src/ui/components/SettingRow.tsx +76 -0
- package/src/ui/components/StepBasedScreen.tsx +205 -187
- package/src/ui/components/Surface.tsx +384 -0
- package/src/ui/components/TextField/Addons/Outline.tsx +64 -0
- package/src/ui/components/TextField/Addons/Underline.tsx +78 -0
- package/src/ui/components/TextField/Adornment/TextFieldAdornment.tsx +208 -0
- package/src/ui/components/TextField/Adornment/TextFieldAffix.tsx +212 -0
- package/src/ui/components/TextField/Adornment/TextFieldIcon.tsx +195 -0
- package/src/ui/components/TextField/Adornment/enums.tsx +12 -0
- package/src/ui/components/TextField/Adornment/types.tsx +11 -0
- package/src/ui/components/TextField/Adornment/utils.ts +66 -0
- package/src/ui/components/TextField/Label/InputLabel.tsx +219 -0
- package/src/ui/components/TextField/Label/LabelBackground.tsx +100 -0
- package/src/ui/components/TextField/TextFieldFlat.tsx +488 -0
- package/src/ui/components/TextField/TextFieldOutlined.tsx +464 -0
- package/src/ui/components/TextField/constants.tsx +48 -0
- package/src/ui/components/TextField/helpers.tsx +612 -0
- package/src/ui/components/TextField/types.tsx +156 -0
- package/src/ui/components/TextField.tsx +578 -0
- package/src/ui/components/TouchableRipple/Pressable.tsx +41 -0
- package/src/ui/components/TouchableRipple/TouchableRipple.native.tsx +146 -0
- package/src/ui/components/TouchableRipple/TouchableRipple.tsx +347 -0
- package/src/ui/components/TouchableRipple/utils.ts +66 -0
- package/src/ui/components/Typography/AnimatedText.tsx +107 -0
- package/src/ui/components/Typography/types.tsx +22 -0
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +137 -0
- package/src/ui/components/fileManagement/FileViewer.tsx +380 -0
- package/src/ui/components/fileManagement/UploadPreview.tsx +175 -0
- package/src/ui/components/fileManagement/styles.ts +860 -0
- package/src/ui/components/index.ts +4 -1
- package/src/ui/components/profile/EditBioModal.tsx +184 -0
- package/src/ui/components/profile/EditDisplayNameModal.tsx +205 -0
- package/src/ui/components/profile/EditEmailModal.tsx +188 -0
- package/src/ui/components/profile/EditLinksModal.tsx +316 -0
- package/src/ui/components/profile/EditLocationModal.tsx +278 -0
- package/src/ui/components/profile/EditUsernameModal.tsx +183 -0
- package/src/ui/components/profile/TwoFactorSetupModal.tsx +442 -0
- package/src/ui/components/styles/overlay.tsx +88 -0
- package/src/ui/components/styles/shadow.tsx +136 -0
- package/src/ui/components/theming.tsx +114 -0
- package/src/ui/components/types.tsx +90 -0
- package/src/ui/components/utils/forwardRef.tsx +23 -0
- package/src/ui/components/utils/hasTouchHandler.tsx +23 -0
- package/src/ui/components/utils/roundLayoutSize.ts +2 -0
- package/src/ui/components/utils/splitStyles.ts +60 -0
- package/src/ui/constants/iconColors.ts +88 -0
- package/src/ui/constants/spacing.ts +45 -0
- package/src/ui/constants/theme.ts +120 -0
- package/src/ui/context/OxyContext.tsx +276 -894
- package/src/ui/context/ThemeContext.tsx +41 -0
- package/src/ui/context/hooks/useAuthOperations.ts +400 -0
- package/src/ui/context/hooks/useDeviceManagement.ts +108 -0
- package/src/ui/context/hooks/useLanguageManagement.ts +152 -0
- package/src/ui/context/hooks/useSessionManagement.ts +378 -0
- package/src/ui/context/hooks/useStorage.ts +104 -0
- package/src/ui/context/utils/errorHandlers.ts +136 -0
- package/src/ui/context/utils/sessionHelpers.ts +146 -0
- package/src/ui/context/utils/storageHelpers.ts +134 -0
- package/src/ui/hooks/index.ts +3 -1
- package/src/ui/hooks/use-color-scheme.ts +24 -0
- package/src/ui/hooks/use-haptic-press.ts +15 -0
- package/src/ui/hooks/useAssets.ts +1 -1
- package/src/ui/hooks/useDeviceManagement.ts +108 -0
- package/src/ui/hooks/useLanguageManagement.ts +152 -0
- package/src/ui/hooks/useProfileEditing.ts +151 -0
- package/src/ui/hooks/useSessionManagement.ts +378 -0
- package/src/ui/hooks/useStorage.ts +104 -0
- package/src/ui/hooks/useThemeColors.ts +26 -0
- package/src/ui/hooks/useThemeStyles.ts +85 -0
- package/src/ui/index.ts +1 -4
- package/src/ui/navigation/bottomSheetManager.ts +191 -0
- package/src/ui/navigation/routes.ts +107 -189
- package/src/ui/screens/AccountCenterScreen.tsx +67 -63
- package/src/ui/screens/AccountOverviewScreen.tsx +237 -95
- package/src/ui/screens/AccountSettingsScreen.tsx +546 -474
- package/src/ui/screens/AccountSwitcherScreen.tsx +113 -116
- package/src/ui/screens/AccountVerificationScreen.tsx +18 -20
- package/src/ui/screens/AppInfoScreen.tsx +37 -38
- package/src/ui/screens/FeedbackScreen.tsx +15 -12
- package/src/ui/screens/FileManagementScreen.tsx +764 -2026
- package/src/ui/screens/HelpSupportScreen.tsx +30 -23
- package/src/ui/screens/HistoryViewScreen.tsx +25 -56
- package/src/ui/screens/LanguageSelectorScreen.tsx +84 -170
- package/src/ui/screens/LegalDocumentsScreen.tsx +18 -41
- package/src/ui/screens/OxyAuthScreen.tsx +403 -0
- package/src/ui/screens/PaymentGatewayScreen.tsx +20 -22
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +13 -10
- package/src/ui/screens/PrivacySettingsScreen.tsx +150 -198
- package/src/ui/screens/ProfileScreen.tsx +7 -6
- package/src/ui/screens/SavesCollectionsScreen.tsx +39 -62
- package/src/ui/screens/SearchSettingsScreen.tsx +36 -86
- package/src/ui/screens/SessionManagementScreen.tsx +25 -17
- package/src/ui/screens/UserLinksScreen.tsx +10 -11
- package/src/ui/screens/WelcomeNewUserScreen.tsx +41 -41
- package/src/ui/screens/karma/KarmaAboutScreen.tsx +13 -9
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +70 -70
- package/src/ui/screens/karma/KarmaFAQScreen.tsx +96 -96
- package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +15 -10
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +605 -60
- package/src/ui/screens/karma/KarmaRulesScreen.tsx +14 -9
- package/src/ui/stores/authStore.ts +1 -1
- package/src/ui/styles/authStyles.ts +5 -11
- package/src/ui/styles/spacing.ts +21 -2
- package/src/ui/styles/theme.ts +1 -1
- package/src/ui/types/fileManagement.ts +51 -0
- package/src/ui/types/navigation.ts +61 -0
- package/src/ui/utils/colorUtils.ts +46 -0
- package/src/ui/utils/errorHandlers.ts +136 -0
- package/src/ui/utils/fileManagement.ts +190 -0
- package/src/ui/utils/sessionHelpers.ts +146 -0
- package/src/ui/utils/storageHelpers.ts +134 -0
- package/src/ui/utils/themeUtils.ts +43 -0
- package/src/ui/utils/user-utils.ts +58 -0
- package/src/utils/errorUtils.ts +14 -4
- package/lib/commonjs/ui/components/internal/TextField.js +0 -665
- package/lib/commonjs/ui/components/internal/TextField.js.map +0 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js +0 -213
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +0 -1
- package/lib/commonjs/ui/navigation/types.js +0 -13
- package/lib/commonjs/ui/navigation/types.js.map +0 -1
- package/lib/commonjs/ui/screens/AccountManagementDemo.js +0 -298
- package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +0 -1
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js +0 -137
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +0 -270
- package/lib/commonjs/ui/screens/SignInScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +0 -229
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js +0 -135
- package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js.map +0 -1
- package/lib/commonjs/ui/screens/steps/RecoverResetPasswordStep.js +0 -165
- package/lib/commonjs/ui/screens/steps/RecoverResetPasswordStep.js.map +0 -1
- package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js +0 -159
- package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js.map +0 -1
- package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js +0 -144
- package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js.map +0 -1
- package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js +0 -358
- package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js.map +0 -1
- package/lib/commonjs/ui/screens/steps/SignInTotpStep.js +0 -188
- package/lib/commonjs/ui/screens/steps/SignInTotpStep.js.map +0 -1
- package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js +0 -509
- package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js.map +0 -1
- package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js +0 -200
- package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js.map +0 -1
- package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js +0 -185
- package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js.map +0 -1
- package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js +0 -138
- package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js.map +0 -1
- package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js +0 -150
- package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js.map +0 -1
- package/lib/module/package.json +0 -1
- package/lib/module/ui/components/internal/TextField.js +0 -660
- package/lib/module/ui/components/internal/TextField.js.map +0 -1
- package/lib/module/ui/navigation/OxyRouter.js +0 -209
- package/lib/module/ui/navigation/OxyRouter.js.map +0 -1
- package/lib/module/ui/navigation/types.js +0 -22
- package/lib/module/ui/navigation/types.js.map +0 -1
- package/lib/module/ui/screens/AccountManagementDemo.js +0 -295
- package/lib/module/ui/screens/AccountManagementDemo.js.map +0 -1
- package/lib/module/ui/screens/RecoverAccountScreen.js +0 -133
- package/lib/module/ui/screens/RecoverAccountScreen.js.map +0 -1
- package/lib/module/ui/screens/SignInScreen.js +0 -265
- package/lib/module/ui/screens/SignInScreen.js.map +0 -1
- package/lib/module/ui/screens/SignUpScreen.js +0 -224
- package/lib/module/ui/screens/SignUpScreen.js.map +0 -1
- package/lib/module/ui/screens/steps/RecoverRequestStep.js +0 -130
- package/lib/module/ui/screens/steps/RecoverRequestStep.js.map +0 -1
- package/lib/module/ui/screens/steps/RecoverResetPasswordStep.js +0 -160
- package/lib/module/ui/screens/steps/RecoverResetPasswordStep.js.map +0 -1
- package/lib/module/ui/screens/steps/RecoverSuccessStep.js +0 -154
- package/lib/module/ui/screens/steps/RecoverSuccessStep.js.map +0 -1
- package/lib/module/ui/screens/steps/RecoverVerifyStep.js +0 -139
- package/lib/module/ui/screens/steps/RecoverVerifyStep.js.map +0 -1
- package/lib/module/ui/screens/steps/SignInPasswordStep.js +0 -353
- package/lib/module/ui/screens/steps/SignInPasswordStep.js.map +0 -1
- package/lib/module/ui/screens/steps/SignInTotpStep.js +0 -183
- package/lib/module/ui/screens/steps/SignInTotpStep.js.map +0 -1
- package/lib/module/ui/screens/steps/SignInUsernameStep.js +0 -504
- package/lib/module/ui/screens/steps/SignInUsernameStep.js.map +0 -1
- package/lib/module/ui/screens/steps/SignUpIdentityStep.js +0 -195
- package/lib/module/ui/screens/steps/SignUpIdentityStep.js.map +0 -1
- package/lib/module/ui/screens/steps/SignUpSecurityStep.js +0 -180
- package/lib/module/ui/screens/steps/SignUpSecurityStep.js.map +0 -1
- package/lib/module/ui/screens/steps/SignUpSummaryStep.js +0 -133
- package/lib/module/ui/screens/steps/SignUpSummaryStep.js.map +0 -1
- package/lib/module/ui/screens/steps/SignUpWelcomeStep.js +0 -145
- package/lib/module/ui/screens/steps/SignUpWelcomeStep.js.map +0 -1
- package/lib/typescript/ui/components/internal/TextField.d.ts +0 -41
- package/lib/typescript/ui/components/internal/TextField.d.ts.map +0 -1
- package/lib/typescript/ui/navigation/OxyRouter.d.ts +0 -7
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +0 -1
- package/lib/typescript/ui/navigation/types.d.ts +0 -141
- package/lib/typescript/ui/navigation/types.d.ts.map +0 -1
- package/lib/typescript/ui/screens/AccountManagementDemo.d.ts +0 -8
- package/lib/typescript/ui/screens/AccountManagementDemo.d.ts.map +0 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/SignInScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/SignUpScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts +0 -24
- package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/steps/RecoverResetPasswordStep.d.ts +0 -24
- package/lib/typescript/ui/screens/steps/RecoverResetPasswordStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts +0 -19
- package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts +0 -26
- package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts +0 -30
- package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/steps/SignInTotpStep.d.ts +0 -19
- package/lib/typescript/ui/screens/steps/SignInTotpStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts +0 -28
- package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts +0 -26
- package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts +0 -27
- package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts +0 -17
- package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts +0 -14
- package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts.map +0 -1
- package/src/ui/components/internal/TextField.tsx +0 -808
- package/src/ui/navigation/OxyRouter.tsx +0 -216
- package/src/ui/navigation/types.ts +0 -164
- package/src/ui/screens/AccountManagementDemo.tsx +0 -297
- package/src/ui/screens/RecoverAccountScreen.tsx +0 -141
- package/src/ui/screens/SignInScreen.tsx +0 -297
- package/src/ui/screens/SignUpScreen.tsx +0 -239
- package/src/ui/screens/steps/RecoverRequestStep.tsx +0 -143
- package/src/ui/screens/steps/RecoverResetPasswordStep.tsx +0 -162
- package/src/ui/screens/steps/RecoverSuccessStep.tsx +0 -148
- package/src/ui/screens/steps/RecoverVerifyStep.tsx +0 -154
- package/src/ui/screens/steps/SignInPasswordStep.tsx +0 -343
- package/src/ui/screens/steps/SignInTotpStep.tsx +0 -163
- package/src/ui/screens/steps/SignInUsernameStep.tsx +0 -560
- package/src/ui/screens/steps/SignUpIdentityStep.tsx +0 -217
- package/src/ui/screens/steps/SignUpSecurityStep.tsx +0 -207
- package/src/ui/screens/steps/SignUpSummaryStep.tsx +0 -155
- package/src/ui/screens/steps/SignUpWelcomeStep.tsx +0 -127
|
@@ -1,25 +1,69 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React, { useState, useEffect, useCallback, useMemo, useRef } from 'react';
|
|
4
|
-
import { View, Text, TouchableOpacity, StyleSheet, ScrollView, ActivityIndicator,
|
|
5
|
-
// kept for Image.getSize only
|
|
6
|
-
Animated, Easing, Alert } from 'react-native';
|
|
4
|
+
import { View, Text, TouchableOpacity, StyleSheet, ScrollView, ActivityIndicator, RefreshControl, TextInput, Image, Animated, Easing, Alert } from 'react-native';
|
|
7
5
|
import { Image as ExpoImage } from 'expo-image';
|
|
8
|
-
import { useOxy } from '../context/OxyContext';
|
|
9
|
-
import { fontFamilies } from '../styles/fonts';
|
|
10
6
|
import { toast } from '../../lib/sonner';
|
|
11
7
|
import { Ionicons } from '@expo/vector-icons';
|
|
8
|
+
// @ts-ignore - MaterialCommunityIcons is available at runtime
|
|
9
|
+
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
12
10
|
import { useFileStore, useFiles, useUploading as useUploadingStore, useUploadAggregateProgress, useDeleting as useDeletingStore } from '../stores/fileStore';
|
|
13
11
|
import Header from '../components/Header';
|
|
14
12
|
import JustifiedPhotoGrid from '../components/photogrid/JustifiedPhotoGrid';
|
|
15
13
|
import { GroupedSection } from '../components';
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
import { useThemeStyles } from '../hooks/useThemeStyles';
|
|
15
|
+
import { useColorScheme } from '../hooks/use-color-scheme';
|
|
16
|
+
import { normalizeTheme } from '../utils/themeUtils';
|
|
17
|
+
import { useOxy } from '../context/OxyContext';
|
|
18
|
+
import { confirmAction, convertDocumentPickerAssetToFile, formatFileSize, getFileIcon, getSafeDownloadUrl, uploadFileRaw } from '../utils/fileManagement';
|
|
19
|
+
import { FileViewer } from '../components/fileManagement/FileViewer';
|
|
20
|
+
import { FileDetailsModal } from '../components/fileManagement/FileDetailsModal';
|
|
21
|
+
import { UploadPreview } from '../components/fileManagement/UploadPreview';
|
|
22
|
+
import { fileManagementStyles } from '../components/fileManagement/styles';
|
|
18
23
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
|
-
//
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
// Animated button component for smooth transitions
|
|
25
|
+
const AnimatedButton = ({
|
|
26
|
+
isSelected,
|
|
27
|
+
onPress,
|
|
28
|
+
icon,
|
|
29
|
+
primaryColor,
|
|
30
|
+
textColor,
|
|
31
|
+
style
|
|
32
|
+
}) => {
|
|
33
|
+
const animatedValue = useRef(new Animated.Value(isSelected ? 1 : 0)).current;
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
Animated.timing(animatedValue, {
|
|
36
|
+
toValue: isSelected ? 1 : 0,
|
|
37
|
+
duration: 200,
|
|
38
|
+
easing: Easing.out(Easing.ease),
|
|
39
|
+
useNativeDriver: false
|
|
40
|
+
}).start();
|
|
41
|
+
}, [isSelected, animatedValue]);
|
|
42
|
+
const backgroundColor = animatedValue.interpolate({
|
|
43
|
+
inputRange: [0, 1],
|
|
44
|
+
outputRange: ['transparent', primaryColor]
|
|
45
|
+
});
|
|
46
|
+
const iconColor = animatedValue.interpolate({
|
|
47
|
+
inputRange: [0, 1],
|
|
48
|
+
outputRange: [textColor, '#FFFFFF']
|
|
49
|
+
});
|
|
50
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
51
|
+
onPress: onPress,
|
|
52
|
+
activeOpacity: 0.7,
|
|
53
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
54
|
+
style: [style, {
|
|
55
|
+
backgroundColor
|
|
56
|
+
}],
|
|
57
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
58
|
+
children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
59
|
+
name: icon,
|
|
60
|
+
size: 16,
|
|
61
|
+
color: isSelected ? '#FFFFFF' : textColor
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
};
|
|
23
67
|
const FileManagementScreen = ({
|
|
24
68
|
onClose,
|
|
25
69
|
theme,
|
|
@@ -40,11 +84,14 @@ const FileManagementScreen = ({
|
|
|
40
84
|
defaultVisibility = 'private',
|
|
41
85
|
linkContext
|
|
42
86
|
}) => {
|
|
87
|
+
// Use useOxy() hook for OxyContext values
|
|
43
88
|
const {
|
|
44
89
|
user,
|
|
45
90
|
oxyServices
|
|
46
91
|
} = useOxy();
|
|
47
92
|
const files = useFiles();
|
|
93
|
+
// Ensure containerWidth is a number (TypeScript guard)
|
|
94
|
+
const safeContainerWidth = typeof containerWidth === 'number' ? containerWidth : 400;
|
|
48
95
|
const uploading = useUploadingStore();
|
|
49
96
|
const uploadProgress = useUploadAggregateProgress();
|
|
50
97
|
const deleting = useDeletingStore();
|
|
@@ -64,6 +111,7 @@ const FileManagementScreen = ({
|
|
|
64
111
|
const [fileContent, setFileContent] = useState(null);
|
|
65
112
|
const [loadingFileContent, setLoadingFileContent] = useState(false);
|
|
66
113
|
const [showFileDetailsInViewer, setShowFileDetailsInViewer] = useState(false);
|
|
114
|
+
const [isPickingDocument, setIsPickingDocument] = useState(false);
|
|
67
115
|
const [viewMode, setViewMode] = useState('all');
|
|
68
116
|
const [searchQuery, setSearchQuery] = useState('');
|
|
69
117
|
const [sortBy, setSortBy] = useState('date');
|
|
@@ -106,10 +154,8 @@ const FileManagementScreen = ({
|
|
|
106
154
|
});
|
|
107
155
|
return sorted;
|
|
108
156
|
}, [files, searchQuery, viewMode, sortBy, sortOrder]);
|
|
109
|
-
const [isDragging, setIsDragging] = useState(false);
|
|
110
157
|
const [photoDimensions, setPhotoDimensions] = useState({});
|
|
111
158
|
const [loadingDimensions, setLoadingDimensions] = useState(false);
|
|
112
|
-
const [hoveredPreview, setHoveredPreview] = useState(null);
|
|
113
159
|
const uploadStartRef = useRef(null);
|
|
114
160
|
const MIN_BANNER_MS = 600;
|
|
115
161
|
// Selection state
|
|
@@ -118,7 +164,7 @@ const FileManagementScreen = ({
|
|
|
118
164
|
const scrollViewRef = useRef(null);
|
|
119
165
|
const photoScrollViewRef = useRef(null);
|
|
120
166
|
const itemRefs = useRef(new Map()); // Track item positions
|
|
121
|
-
const containerRef = useRef(null);
|
|
167
|
+
const containerRef = useRef(null);
|
|
122
168
|
useEffect(() => {
|
|
123
169
|
if (initialSelectedIds && initialSelectedIds.length) {
|
|
124
170
|
setSelectedIds(new Set(initialSelectedIds));
|
|
@@ -226,52 +272,19 @@ const FileManagementScreen = ({
|
|
|
226
272
|
}, []);
|
|
227
273
|
|
|
228
274
|
// Helper to safely request a thumbnail variant only for image mime types.
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
const isImage = file.contentType.startsWith('image/');
|
|
232
|
-
const isVideo = file.contentType.startsWith('video/');
|
|
233
|
-
|
|
234
|
-
// Prefer explicit variant key if variants metadata present
|
|
235
|
-
if (file.variants && file.variants.length > 0) {
|
|
236
|
-
// For videos, try 'poster' regardless of requested variant
|
|
237
|
-
if (isVideo) {
|
|
238
|
-
const poster = file.variants.find(v => v.type === 'poster');
|
|
239
|
-
if (poster) return oxyServices.getFileDownloadUrl(file.id, 'poster');
|
|
240
|
-
}
|
|
241
|
-
if (isImage) {
|
|
242
|
-
const desired = file.variants.find(v => v.type === variant);
|
|
243
|
-
if (desired) return oxyServices.getFileDownloadUrl(file.id, variant);
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
if (isImage) {
|
|
247
|
-
return oxyServices.getFileDownloadUrl(file.id, variant);
|
|
248
|
-
}
|
|
249
|
-
if (isVideo) {
|
|
250
|
-
// Fallback to poster if backend supports implicit generation
|
|
251
|
-
try {
|
|
252
|
-
return oxyServices.getFileDownloadUrl(file.id, 'poster');
|
|
253
|
-
} catch {
|
|
254
|
-
return oxyServices.getFileDownloadUrl(file.id);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
// Other mime types: no variant
|
|
258
|
-
return oxyServices.getFileDownloadUrl(file.id);
|
|
275
|
+
const getSafeDownloadUrlCallback = useCallback((file, variant = 'thumb') => {
|
|
276
|
+
return getSafeDownloadUrl(file, variant, (fileId, variant) => oxyServices.getFileDownloadUrl(fileId, variant));
|
|
259
277
|
}, [oxyServices]);
|
|
260
278
|
|
|
261
|
-
//
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
primaryColor: '#007AFF',
|
|
271
|
-
dangerColor: '#FF3B30',
|
|
272
|
-
successColor: '#34C759'
|
|
273
|
-
};
|
|
274
|
-
}, [theme]);
|
|
279
|
+
// Use centralized theme styles hook for consistency
|
|
280
|
+
const colorScheme = useColorScheme();
|
|
281
|
+
const normalizedTheme = normalizeTheme(theme);
|
|
282
|
+
const baseThemeStyles = useThemeStyles(normalizedTheme, colorScheme);
|
|
283
|
+
// FileManagementScreen uses a slightly different light background
|
|
284
|
+
const themeStyles = useMemo(() => ({
|
|
285
|
+
...baseThemeStyles,
|
|
286
|
+
backgroundColor: baseThemeStyles.isDarkTheme ? baseThemeStyles.backgroundColor : '#f2f2f2'
|
|
287
|
+
}), [baseThemeStyles]);
|
|
275
288
|
|
|
276
289
|
// Extract commonly used theme variables
|
|
277
290
|
const backgroundColor = themeStyles.backgroundColor;
|
|
@@ -356,7 +369,7 @@ const FileManagementScreen = ({
|
|
|
356
369
|
|
|
357
370
|
// (removed effect; filteredFiles is memoized)
|
|
358
371
|
|
|
359
|
-
// Load photo dimensions for justified grid
|
|
372
|
+
// Load photo dimensions for justified grid - unified approach using Image.getSize
|
|
360
373
|
const loadPhotoDimensions = useCallback(async photos => {
|
|
361
374
|
if (photos.length === 0) return;
|
|
362
375
|
setLoadingDimensions(true);
|
|
@@ -374,50 +387,27 @@ const FileManagementScreen = ({
|
|
|
374
387
|
try {
|
|
375
388
|
await Promise.all(photosToLoad.map(async photo => {
|
|
376
389
|
try {
|
|
377
|
-
const downloadUrl =
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
};
|
|
386
|
-
hasNewDimensions = true;
|
|
387
|
-
resolve();
|
|
390
|
+
const downloadUrl = getSafeDownloadUrlCallback(photo, 'thumb');
|
|
391
|
+
|
|
392
|
+
// Unified approach using Image.getSize (works on all platforms)
|
|
393
|
+
await new Promise(resolve => {
|
|
394
|
+
Image.getSize(downloadUrl, (width, height) => {
|
|
395
|
+
newDimensions[photo.id] = {
|
|
396
|
+
width,
|
|
397
|
+
height
|
|
388
398
|
};
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
resolve();
|
|
399
|
+
hasNewDimensions = true;
|
|
400
|
+
resolve();
|
|
401
|
+
}, () => {
|
|
402
|
+
// Fallback dimensions
|
|
403
|
+
newDimensions[photo.id] = {
|
|
404
|
+
width: 1,
|
|
405
|
+
height: 1
|
|
397
406
|
};
|
|
398
|
-
|
|
407
|
+
hasNewDimensions = true;
|
|
408
|
+
resolve();
|
|
399
409
|
});
|
|
400
|
-
}
|
|
401
|
-
// For mobile, use Image.getSize from react-native
|
|
402
|
-
await new Promise(resolve => {
|
|
403
|
-
Image.getSize(downloadUrl, (width, height) => {
|
|
404
|
-
newDimensions[photo.id] = {
|
|
405
|
-
width,
|
|
406
|
-
height
|
|
407
|
-
};
|
|
408
|
-
hasNewDimensions = true;
|
|
409
|
-
resolve();
|
|
410
|
-
}, () => {
|
|
411
|
-
// Fallback dimensions
|
|
412
|
-
newDimensions[photo.id] = {
|
|
413
|
-
width: 1,
|
|
414
|
-
height: 1
|
|
415
|
-
};
|
|
416
|
-
hasNewDimensions = true;
|
|
417
|
-
resolve();
|
|
418
|
-
});
|
|
419
|
-
});
|
|
420
|
-
}
|
|
410
|
+
});
|
|
421
411
|
} catch (error) {
|
|
422
412
|
// Fallback dimensions for any errors
|
|
423
413
|
newDimensions[photo.id] = {
|
|
@@ -435,7 +425,7 @@ const FileManagementScreen = ({
|
|
|
435
425
|
} finally {
|
|
436
426
|
setLoadingDimensions(false);
|
|
437
427
|
}
|
|
438
|
-
}, [
|
|
428
|
+
}, [getSafeDownloadUrlCallback, photoDimensions]);
|
|
439
429
|
|
|
440
430
|
// Create justified rows from photos with responsive algorithm
|
|
441
431
|
const createJustifiedRows = useCallback((photos, containerWidth) => {
|
|
@@ -450,8 +440,9 @@ const FileManagementScreen = ({
|
|
|
450
440
|
return rows;
|
|
451
441
|
}, []);
|
|
452
442
|
const processFileUploads = async selectedFiles => {
|
|
453
|
-
if (selectedFiles.length === 0) return;
|
|
454
|
-
if (!targetUserId) return; // Guard clause to ensure userId is defined
|
|
443
|
+
if (selectedFiles.length === 0) return [];
|
|
444
|
+
if (!targetUserId) return []; // Guard clause to ensure userId is defined
|
|
445
|
+
const uploadedFiles = [];
|
|
455
446
|
try {
|
|
456
447
|
storeSetUploadProgress({
|
|
457
448
|
current: 0,
|
|
@@ -460,9 +451,9 @@ const FileManagementScreen = ({
|
|
|
460
451
|
const maxSize = 50 * 1024 * 1024; // 50MB
|
|
461
452
|
const oversizedFiles = selectedFiles.filter(file => file.size > maxSize);
|
|
462
453
|
if (oversizedFiles.length > 0) {
|
|
463
|
-
const fileList = oversizedFiles.map(f => f.name).join('
|
|
464
|
-
|
|
465
|
-
return;
|
|
454
|
+
const fileList = oversizedFiles.map(f => f.name).join(', ');
|
|
455
|
+
toast.error(`The following files are too large (max 50MB): ${fileList}`);
|
|
456
|
+
return [];
|
|
466
457
|
}
|
|
467
458
|
let successCount = 0;
|
|
468
459
|
let failureCount = 0;
|
|
@@ -472,9 +463,22 @@ const FileManagementScreen = ({
|
|
|
472
463
|
current: i + 1,
|
|
473
464
|
total: selectedFiles.length
|
|
474
465
|
});
|
|
466
|
+
const raw = selectedFiles[i];
|
|
467
|
+
const fileName = raw.name || `file-${i + 1}`;
|
|
468
|
+
const optimisticId = `temp-${Date.now()}-${i}-${Math.random().toString(36).substr(2, 9)}`; // Unique ID per file
|
|
469
|
+
|
|
475
470
|
try {
|
|
476
|
-
|
|
477
|
-
|
|
471
|
+
// Validate file before upload
|
|
472
|
+
if (!raw || !raw.name || raw.size === undefined || raw.size <= 0) {
|
|
473
|
+
const errorMsg = `Invalid file: ${fileName}`;
|
|
474
|
+
console.error('Upload validation failed:', {
|
|
475
|
+
file: raw,
|
|
476
|
+
error: errorMsg
|
|
477
|
+
});
|
|
478
|
+
failureCount++;
|
|
479
|
+
errors.push(`${fileName}: Invalid file (missing name or size)`);
|
|
480
|
+
continue;
|
|
481
|
+
}
|
|
478
482
|
const optimisticFile = {
|
|
479
483
|
id: optimisticId,
|
|
480
484
|
filename: raw.name,
|
|
@@ -491,6 +495,7 @@ const FileManagementScreen = ({
|
|
|
491
495
|
prepend: true
|
|
492
496
|
});
|
|
493
497
|
const result = await uploadFileRaw(raw, targetUserId, oxyServices, defaultVisibility);
|
|
498
|
+
|
|
494
499
|
// Attempt to refresh file list incrementally – fetch single file metadata if API allows
|
|
495
500
|
if (result?.file || result?.files?.[0]) {
|
|
496
501
|
const f = result.file || result.files[0];
|
|
@@ -509,6 +514,8 @@ const FileManagementScreen = ({
|
|
|
509
514
|
useFileStore.getState().addFile(merged, {
|
|
510
515
|
prepend: true
|
|
511
516
|
});
|
|
517
|
+
uploadedFiles.push(merged);
|
|
518
|
+
successCount++;
|
|
512
519
|
} else {
|
|
513
520
|
// Fallback: will reconcile on later list refresh
|
|
514
521
|
useFileStore.getState().updateFile(optimisticId, {
|
|
@@ -516,19 +523,39 @@ const FileManagementScreen = ({
|
|
|
516
523
|
uploading: false
|
|
517
524
|
}
|
|
518
525
|
});
|
|
526
|
+
console.warn('Upload completed but no file data returned:', {
|
|
527
|
+
fileName,
|
|
528
|
+
result
|
|
529
|
+
});
|
|
530
|
+
// Still count as success if upload didn't throw
|
|
531
|
+
successCount++;
|
|
519
532
|
}
|
|
520
|
-
successCount++;
|
|
521
533
|
} catch (error) {
|
|
522
534
|
failureCount++;
|
|
523
|
-
|
|
535
|
+
const errorMessage = error.message || error.toString() || 'Upload failed';
|
|
536
|
+
const fullError = `${fileName}: ${errorMessage}`;
|
|
537
|
+
errors.push(fullError);
|
|
538
|
+
console.error('File upload failed:', {
|
|
539
|
+
fileName,
|
|
540
|
+
fileSize: raw.size,
|
|
541
|
+
fileType: raw.type,
|
|
542
|
+
error: errorMessage,
|
|
543
|
+
stack: error.stack
|
|
544
|
+
});
|
|
545
|
+
|
|
546
|
+
// Remove optimistic file on error (use the same optimisticId from above)
|
|
547
|
+
useFileStore.getState().removeFile(optimisticId);
|
|
524
548
|
}
|
|
525
549
|
}
|
|
550
|
+
|
|
551
|
+
// Show success/error messages
|
|
526
552
|
if (successCount > 0) {
|
|
527
553
|
toast.success(`${successCount} file(s) uploaded successfully`);
|
|
528
554
|
}
|
|
529
555
|
if (failureCount > 0) {
|
|
530
|
-
|
|
531
|
-
|
|
556
|
+
// Show detailed error message with first few errors
|
|
557
|
+
const errorDetails = errors.length > 0 ? `\n${errors.slice(0, 3).join('\n')}${errors.length > 3 ? `\n...and ${errors.length - 3} more` : ''}` : '';
|
|
558
|
+
toast.error(`${failureCount} file(s) failed to upload${errorDetails}`);
|
|
532
559
|
}
|
|
533
560
|
// Silent background refresh to ensure metadata/variants updated
|
|
534
561
|
setTimeout(() => {
|
|
@@ -539,31 +566,74 @@ const FileManagementScreen = ({
|
|
|
539
566
|
} finally {
|
|
540
567
|
storeSetUploadProgress(null);
|
|
541
568
|
}
|
|
569
|
+
return uploadedFiles;
|
|
542
570
|
};
|
|
543
571
|
const handleFileSelection = useCallback(async selectedFiles => {
|
|
544
572
|
const MAX_FILE_SIZE = 100 * 1024 * 1024; // 100MB
|
|
545
573
|
const processedFiles = [];
|
|
546
574
|
for (const file of selectedFiles) {
|
|
575
|
+
// Validate file has required properties
|
|
576
|
+
if (!file) {
|
|
577
|
+
console.error('Invalid file: file is null or undefined');
|
|
578
|
+
toast.error('Invalid file: file is missing');
|
|
579
|
+
continue;
|
|
580
|
+
}
|
|
581
|
+
if (!file.name || typeof file.name !== 'string') {
|
|
582
|
+
console.error('Invalid file: missing or invalid name property', file);
|
|
583
|
+
toast.error('Invalid file: missing file name');
|
|
584
|
+
continue;
|
|
585
|
+
}
|
|
586
|
+
if (file.size === undefined || file.size === null || isNaN(file.size)) {
|
|
587
|
+
console.error('Invalid file: missing or invalid size property', file);
|
|
588
|
+
toast.error(`Invalid file "${file.name || 'unknown'}": missing file size`);
|
|
589
|
+
continue;
|
|
590
|
+
}
|
|
591
|
+
if (file.size <= 0) {
|
|
592
|
+
console.error('Invalid file: file size is zero or negative', file);
|
|
593
|
+
toast.error(`File "${file.name}" is empty`);
|
|
594
|
+
continue;
|
|
595
|
+
}
|
|
596
|
+
|
|
547
597
|
// Validate file size
|
|
548
598
|
if (file.size > MAX_FILE_SIZE) {
|
|
549
599
|
toast.error(`"${file.name}" is too large. Maximum file size is ${formatFileSize(MAX_FILE_SIZE)}`);
|
|
550
600
|
continue;
|
|
551
601
|
}
|
|
552
602
|
|
|
553
|
-
//
|
|
603
|
+
// Ensure file has a type property
|
|
604
|
+
const fileType = file.type || 'application/octet-stream';
|
|
605
|
+
|
|
606
|
+
// Generate preview for images - unified approach
|
|
554
607
|
let preview;
|
|
555
|
-
if (
|
|
556
|
-
|
|
608
|
+
if (fileType.startsWith('image/')) {
|
|
609
|
+
// Try to use file URI from expo-document-picker if available (works on all platforms)
|
|
610
|
+
const fileUri = file.uri;
|
|
611
|
+
if (fileUri && typeof fileUri === 'string' && (fileUri.startsWith('file://') || fileUri.startsWith('content://') || fileUri.startsWith('http://') || fileUri.startsWith('https://') || fileUri.startsWith('blob:'))) {
|
|
612
|
+
preview = fileUri;
|
|
613
|
+
} else {
|
|
614
|
+
// Fallback: create blob URL if possible (works on web)
|
|
615
|
+
try {
|
|
616
|
+
if (file instanceof File || file instanceof Blob) {
|
|
617
|
+
preview = URL.createObjectURL(file);
|
|
618
|
+
}
|
|
619
|
+
} catch (error) {
|
|
620
|
+
console.warn('Failed to create preview URL:', error);
|
|
621
|
+
// Preview is optional, continue without it
|
|
622
|
+
}
|
|
623
|
+
}
|
|
557
624
|
}
|
|
558
625
|
processedFiles.push({
|
|
559
626
|
file,
|
|
560
627
|
preview,
|
|
561
628
|
size: file.size,
|
|
562
629
|
name: file.name,
|
|
563
|
-
type:
|
|
630
|
+
type: fileType
|
|
564
631
|
});
|
|
565
632
|
}
|
|
566
|
-
if (processedFiles.length === 0)
|
|
633
|
+
if (processedFiles.length === 0) {
|
|
634
|
+
toast.error('No valid files to upload');
|
|
635
|
+
return;
|
|
636
|
+
}
|
|
567
637
|
|
|
568
638
|
// Show preview modal for user to review files before upload
|
|
569
639
|
setPendingFiles(processedFiles);
|
|
@@ -581,7 +651,7 @@ const FileManagementScreen = ({
|
|
|
581
651
|
current: 0,
|
|
582
652
|
total: filesToUpload.length
|
|
583
653
|
});
|
|
584
|
-
await processFileUploads(filesToUpload);
|
|
654
|
+
const uploadedFiles = await processFileUploads(filesToUpload);
|
|
585
655
|
|
|
586
656
|
// Cleanup preview URLs
|
|
587
657
|
pendingFiles.forEach(pf => {
|
|
@@ -590,6 +660,30 @@ const FileManagementScreen = ({
|
|
|
590
660
|
}
|
|
591
661
|
});
|
|
592
662
|
setPendingFiles([]);
|
|
663
|
+
|
|
664
|
+
// If in selectMode, automatically select the uploaded file(s)
|
|
665
|
+
if (selectMode && uploadedFiles.length > 0) {
|
|
666
|
+
// Wait a bit for the file store to update and ensure file is available
|
|
667
|
+
setTimeout(() => {
|
|
668
|
+
const fileToSelect = uploadedFiles[0];
|
|
669
|
+
if (!multiSelect && fileToSelect) {
|
|
670
|
+
// Single select mode - directly call onSelect callback
|
|
671
|
+
onSelect?.(fileToSelect);
|
|
672
|
+
if (afterSelect === 'back') {
|
|
673
|
+
goBack?.();
|
|
674
|
+
} else if (afterSelect === 'close') {
|
|
675
|
+
onClose?.();
|
|
676
|
+
}
|
|
677
|
+
} else if (multiSelect) {
|
|
678
|
+
// Multi-select mode - add all uploaded files to selection
|
|
679
|
+
uploadedFiles.forEach(file => {
|
|
680
|
+
if (!selectedIds.has(file.id)) {
|
|
681
|
+
setSelectedIds(prev => new Set(prev).add(file.id));
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
}, 500);
|
|
686
|
+
}
|
|
593
687
|
endUpload();
|
|
594
688
|
} catch (error) {
|
|
595
689
|
toast.error(error.message || 'Failed to upload files');
|
|
@@ -617,82 +711,110 @@ const FileManagementScreen = ({
|
|
|
617
711
|
setShowUploadPreview(false);
|
|
618
712
|
}
|
|
619
713
|
};
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* Handle file upload - opens document picker and processes selected files
|
|
717
|
+
* Expo 54 compatible - works on web, iOS, and Android
|
|
718
|
+
*/
|
|
620
719
|
const handleFileUpload = async () => {
|
|
720
|
+
// Prevent concurrent document picker calls
|
|
721
|
+
if (isPickingDocument) {
|
|
722
|
+
toast.error('Please wait for the current file selection to complete');
|
|
723
|
+
return;
|
|
724
|
+
}
|
|
621
725
|
try {
|
|
622
|
-
|
|
623
|
-
// Enhanced web file picker
|
|
624
|
-
const input = document.createElement('input');
|
|
625
|
-
input.type = 'file';
|
|
626
|
-
input.multiple = true;
|
|
627
|
-
input.accept = '*/*';
|
|
628
|
-
const cancellationTimer = setTimeout(() => {
|
|
629
|
-
const state = useFileStore.getState();
|
|
630
|
-
if (state.uploading && uploadStartRef.current && !state.uploadProgress) {
|
|
631
|
-
endUpload();
|
|
632
|
-
}
|
|
633
|
-
}, 1500);
|
|
634
|
-
input.onchange = async e => {
|
|
635
|
-
clearTimeout(cancellationTimer);
|
|
636
|
-
const selectedFiles = Array.from(e.target.files || []);
|
|
637
|
-
if (selectedFiles.length === 0) {
|
|
638
|
-
endUpload();
|
|
639
|
-
return;
|
|
640
|
-
}
|
|
641
|
-
await handleFileSelection(selectedFiles);
|
|
642
|
-
};
|
|
643
|
-
input.click();
|
|
644
|
-
} else {
|
|
645
|
-
// Mobile file picker with expo-document-picker
|
|
646
|
-
try {
|
|
647
|
-
// Dynamically import to avoid breaking if not installed
|
|
648
|
-
const DocumentPicker = await import('expo-document-picker').catch(() => null);
|
|
649
|
-
if (!DocumentPicker) {
|
|
650
|
-
toast.error('File picker not available. Please install expo-document-picker');
|
|
651
|
-
return;
|
|
652
|
-
}
|
|
653
|
-
const result = await DocumentPicker.getDocumentAsync({
|
|
654
|
-
type: '*/*',
|
|
655
|
-
multiple: true,
|
|
656
|
-
copyToCacheDirectory: true
|
|
657
|
-
});
|
|
658
|
-
if (result.canceled) {
|
|
659
|
-
return;
|
|
660
|
-
}
|
|
726
|
+
setIsPickingDocument(true);
|
|
661
727
|
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
728
|
+
// Dynamically import expo-document-picker (Expo 54 supports it on all platforms)
|
|
729
|
+
const DocumentPicker = await import('expo-document-picker').catch(() => null);
|
|
730
|
+
if (!DocumentPicker || !DocumentPicker.getDocumentAsync) {
|
|
731
|
+
toast.error('File picker not available. Please install expo-document-picker');
|
|
732
|
+
return;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
// Use getDocumentAsync directly - it will handle platform availability
|
|
736
|
+
const result = await DocumentPicker.getDocumentAsync({
|
|
737
|
+
type: '*/*',
|
|
738
|
+
multiple: true,
|
|
739
|
+
copyToCacheDirectory: true
|
|
740
|
+
});
|
|
741
|
+
if (result.canceled) {
|
|
742
|
+
setIsPickingDocument(false);
|
|
743
|
+
return;
|
|
744
|
+
}
|
|
745
|
+
if (!result.assets || result.assets.length === 0) {
|
|
746
|
+
setIsPickingDocument(false);
|
|
747
|
+
toast.error('No files were selected');
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
// Convert expo document picker results to File-like objects
|
|
752
|
+
// According to Expo 54 docs, expo-document-picker returns assets with:
|
|
753
|
+
// - uri: file URI (file://, content://, or blob URL)
|
|
754
|
+
// - name: file name
|
|
755
|
+
// - size: file size in bytes
|
|
756
|
+
// - mimeType: MIME type of the file
|
|
757
|
+
// - file: (optional) native File object (usually only on web)
|
|
758
|
+
const files = [];
|
|
759
|
+
const errors = [];
|
|
760
|
+
|
|
761
|
+
// Process files in parallel for better performance
|
|
762
|
+
// This allows multiple files to be converted simultaneously
|
|
763
|
+
const conversionPromises = result.assets.map((doc, index) => convertDocumentPickerAssetToFile(doc, index).then(file => {
|
|
764
|
+
if (file) {
|
|
765
|
+
// Validate file has required properties before adding
|
|
766
|
+
if (!file.name || file.size === undefined) {
|
|
767
|
+
errors.push(`File "${doc.name || 'file'}" is invalid: missing required properties`);
|
|
768
|
+
return null;
|
|
686
769
|
}
|
|
770
|
+
return file;
|
|
687
771
|
}
|
|
772
|
+
return null;
|
|
773
|
+
}).catch(error => {
|
|
774
|
+
errors.push(`File "${doc.name || 'file'}": ${error.message || 'Failed to process'}`);
|
|
775
|
+
return null;
|
|
776
|
+
}));
|
|
777
|
+
const convertedFiles = await Promise.all(conversionPromises);
|
|
778
|
+
|
|
779
|
+
// Filter out null values
|
|
780
|
+
for (const file of convertedFiles) {
|
|
781
|
+
if (file) {
|
|
782
|
+
files.push(file);
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
// Show errors if any
|
|
787
|
+
if (errors.length > 0) {
|
|
788
|
+
const errorMessage = errors.slice(0, 3).join('\n') + (errors.length > 3 ? `\n...and ${errors.length - 3} more` : '');
|
|
789
|
+
toast.error(`Failed to load some files:\n${errorMessage}`);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
// Process successfully converted files
|
|
793
|
+
if (files.length > 0) {
|
|
794
|
+
await handleFileSelection(files);
|
|
795
|
+
} else {
|
|
796
|
+
// Files were selected but none could be converted
|
|
797
|
+
toast.error('No files could be processed. Please try selecting files again.');
|
|
688
798
|
}
|
|
689
799
|
} catch (error) {
|
|
690
|
-
|
|
800
|
+
console.error('File upload error:', error);
|
|
801
|
+
if (error.message?.includes('expo-document-picker') || error.message?.includes('Different document picking in progress')) {
|
|
802
|
+
if (error.message?.includes('Different document picking in progress')) {
|
|
803
|
+
toast.error('Please wait for the current file selection to complete');
|
|
804
|
+
} else {
|
|
805
|
+
toast.error('File picker not available. Please install expo-document-picker');
|
|
806
|
+
}
|
|
807
|
+
} else {
|
|
808
|
+
toast.error(error.message || 'Failed to select files');
|
|
809
|
+
}
|
|
810
|
+
} finally {
|
|
811
|
+
// Always reset the picking state, even if there was an error
|
|
812
|
+
setIsPickingDocument(false);
|
|
691
813
|
}
|
|
692
814
|
};
|
|
693
815
|
const handleFileDelete = async (fileId, filename) => {
|
|
694
|
-
// Use
|
|
695
|
-
const confirmed =
|
|
816
|
+
// Use platform-aware confirmation dialog
|
|
817
|
+
const confirmed = await confirmAction(`Are you sure you want to delete "${filename}"? This action cannot be undone.`, 'Delete File', 'Delete', 'Cancel');
|
|
696
818
|
if (!confirmed) {
|
|
697
819
|
return;
|
|
698
820
|
}
|
|
@@ -728,7 +850,7 @@ const FileManagementScreen = ({
|
|
|
728
850
|
fileMap[f.id] = f;
|
|
729
851
|
});
|
|
730
852
|
const selectedFiles = Array.from(selectedIds).map(id => fileMap[id]).filter(Boolean);
|
|
731
|
-
const confirmed =
|
|
853
|
+
const confirmed = await confirmAction(`Are you sure you want to delete ${selectedFiles.length} file(s)? This action cannot be undone.`, 'Delete Files', 'Delete', 'Cancel');
|
|
732
854
|
if (!confirmed) return;
|
|
733
855
|
try {
|
|
734
856
|
const deletePromises = Array.from(selectedIds).map(async fileId => {
|
|
@@ -804,70 +926,17 @@ const FileManagementScreen = ({
|
|
|
804
926
|
}
|
|
805
927
|
}, [selectedIds, oxyServices, files, loadFiles]);
|
|
806
928
|
|
|
807
|
-
//
|
|
808
|
-
useEffect(() => {
|
|
809
|
-
if (Platform.OS !== 'web' || user?.id !== targetUserId) return;
|
|
810
|
-
let dragCounter = 0; // Track drag enter/leave to handle nested elements
|
|
811
|
-
|
|
812
|
-
const onDragEnter = e => {
|
|
813
|
-
dragCounter++;
|
|
814
|
-
if (e?.dataTransfer?.types?.includes('Files')) {
|
|
815
|
-
e.preventDefault();
|
|
816
|
-
e.stopPropagation();
|
|
817
|
-
setIsDragging(true);
|
|
818
|
-
}
|
|
819
|
-
};
|
|
820
|
-
const onDragOver = e => {
|
|
821
|
-
if (e?.dataTransfer?.types?.includes('Files')) {
|
|
822
|
-
e.preventDefault();
|
|
823
|
-
e.stopPropagation();
|
|
824
|
-
// Keep dragging state true while over document
|
|
825
|
-
setIsDragging(true);
|
|
826
|
-
}
|
|
827
|
-
};
|
|
828
|
-
const onDrop = async e => {
|
|
829
|
-
dragCounter = 0;
|
|
830
|
-
setIsDragging(false);
|
|
831
|
-
if (e?.dataTransfer?.files?.length) {
|
|
832
|
-
e.preventDefault();
|
|
833
|
-
e.stopPropagation();
|
|
834
|
-
try {
|
|
835
|
-
const files = Array.from(e.dataTransfer.files);
|
|
836
|
-
if (files.length > 0) {
|
|
837
|
-
await handleFileSelection(files);
|
|
838
|
-
}
|
|
839
|
-
} catch (error) {
|
|
840
|
-
toast.error(error.message || 'Failed to upload files');
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
};
|
|
844
|
-
const onDragLeave = e => {
|
|
845
|
-
dragCounter--;
|
|
846
|
-
// Only hide drag overlay if we're actually leaving the document (drag counter reaches 0)
|
|
847
|
-
if (dragCounter === 0) {
|
|
848
|
-
setIsDragging(false);
|
|
849
|
-
}
|
|
850
|
-
};
|
|
851
|
-
|
|
852
|
-
// Attach to document for global drag detection
|
|
853
|
-
document.addEventListener('dragenter', onDragEnter, false);
|
|
854
|
-
document.addEventListener('dragover', onDragOver, false);
|
|
855
|
-
document.addEventListener('drop', onDrop, false);
|
|
856
|
-
document.addEventListener('dragleave', onDragLeave, false);
|
|
857
|
-
return () => {
|
|
858
|
-
document.removeEventListener('dragenter', onDragEnter, false);
|
|
859
|
-
document.removeEventListener('dragover', onDragOver, false);
|
|
860
|
-
document.removeEventListener('drop', onDrop, false);
|
|
861
|
-
document.removeEventListener('dragleave', onDragLeave, false);
|
|
862
|
-
};
|
|
863
|
-
}, [user?.id, targetUserId, handleFileSelection]);
|
|
929
|
+
// Unified download function - works on all platforms
|
|
864
930
|
const handleFileDownload = async (fileId, filename) => {
|
|
865
931
|
try {
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
932
|
+
// Try to use the download URL with a simple approach
|
|
933
|
+
// On web, this creates a download link. On mobile, it opens the URL.
|
|
934
|
+
const downloadUrl = oxyServices.getFileDownloadUrl(fileId);
|
|
935
|
+
|
|
936
|
+
// For web platforms, use link download
|
|
937
|
+
if (typeof window !== 'undefined' && window.document) {
|
|
869
938
|
try {
|
|
870
|
-
//
|
|
939
|
+
// Try simple link download first
|
|
871
940
|
const link = document.createElement('a');
|
|
872
941
|
link.href = downloadUrl;
|
|
873
942
|
link.download = filename;
|
|
@@ -877,9 +946,9 @@ const FileManagementScreen = ({
|
|
|
877
946
|
document.body.removeChild(link);
|
|
878
947
|
toast.success('File download started');
|
|
879
948
|
} catch (linkError) {
|
|
880
|
-
//
|
|
949
|
+
// Fallback to authenticated download
|
|
881
950
|
const blob = await oxyServices.getFileContentAsBlob(fileId);
|
|
882
|
-
const url =
|
|
951
|
+
const url = URL.createObjectURL(blob);
|
|
883
952
|
const link = document.createElement('a');
|
|
884
953
|
link.href = url;
|
|
885
954
|
link.download = filename;
|
|
@@ -888,33 +957,19 @@ const FileManagementScreen = ({
|
|
|
888
957
|
document.body.removeChild(link);
|
|
889
958
|
|
|
890
959
|
// Clean up the blob URL
|
|
891
|
-
|
|
960
|
+
URL.revokeObjectURL(url);
|
|
892
961
|
toast.success('File downloaded successfully');
|
|
893
962
|
}
|
|
894
963
|
} else {
|
|
895
|
-
|
|
964
|
+
// For mobile, open the URL (user can save from browser)
|
|
965
|
+
// Note: This is a simplified approach - for full mobile support,
|
|
966
|
+
// consider using expo-file-system or react-native-fs
|
|
967
|
+
toast.info('Please use your browser to download the file');
|
|
896
968
|
}
|
|
897
969
|
} catch (error) {
|
|
898
970
|
toast.error(error.message || 'Failed to download file');
|
|
899
971
|
}
|
|
900
972
|
};
|
|
901
|
-
const formatFileSize = bytes => {
|
|
902
|
-
if (bytes === 0) return '0 Bytes';
|
|
903
|
-
const k = 1024;
|
|
904
|
-
const sizes = ['Bytes', 'KB', 'MB', 'GB'];
|
|
905
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
906
|
-
return Number.parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
|
907
|
-
};
|
|
908
|
-
const getFileIcon = contentType => {
|
|
909
|
-
if (contentType.startsWith('image/')) return 'image';
|
|
910
|
-
if (contentType.startsWith('video/')) return 'videocam';
|
|
911
|
-
if (contentType.startsWith('audio/')) return 'musical-notes';
|
|
912
|
-
if (contentType.includes('pdf')) return 'document-text';
|
|
913
|
-
if (contentType.includes('word') || contentType.includes('doc')) return 'document';
|
|
914
|
-
if (contentType.includes('excel') || contentType.includes('sheet')) return 'grid';
|
|
915
|
-
if (contentType.includes('zip') || contentType.includes('archive')) return 'archive';
|
|
916
|
-
return 'document-outline';
|
|
917
|
-
};
|
|
918
973
|
const handleFileOpen = async file => {
|
|
919
974
|
if (selectMode) {
|
|
920
975
|
toggleSelect(file);
|
|
@@ -965,20 +1020,20 @@ const FileManagementScreen = ({
|
|
|
965
1020
|
setShowFileDetails(true);
|
|
966
1021
|
};
|
|
967
1022
|
const renderSimplePhotoItem = useCallback((photo, index) => {
|
|
968
|
-
const downloadUrl =
|
|
1023
|
+
const downloadUrl = getSafeDownloadUrlCallback(photo, 'thumb');
|
|
969
1024
|
|
|
970
1025
|
// Calculate photo item width based on actual container size from bottom sheet
|
|
971
1026
|
let itemsPerRow = 3; // Default for mobile
|
|
972
|
-
if (
|
|
973
|
-
else if (
|
|
1027
|
+
if (safeContainerWidth > 768) itemsPerRow = 4; // Desktop/tablet
|
|
1028
|
+
else if (safeContainerWidth > 480) itemsPerRow = 3; // Large mobile
|
|
974
1029
|
|
|
975
1030
|
// Account for the photoScrollContainer padding (16px on each side = 32px total)
|
|
976
1031
|
const scrollContainerPadding = 32; // Total horizontal padding from photoScrollContainer
|
|
977
1032
|
const gaps = (itemsPerRow - 1) * 4; // Gap between items (4px)
|
|
978
|
-
const availableWidth =
|
|
1033
|
+
const availableWidth = safeContainerWidth - scrollContainerPadding;
|
|
979
1034
|
const itemWidth = (availableWidth - gaps) / itemsPerRow;
|
|
980
1035
|
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
981
|
-
style: [
|
|
1036
|
+
style: [fileManagementStyles.simplePhotoItem, {
|
|
982
1037
|
width: itemWidth,
|
|
983
1038
|
height: itemWidth,
|
|
984
1039
|
marginRight: (index + 1) % itemsPerRow === 0 ? 0 : 4,
|
|
@@ -990,12 +1045,12 @@ const FileManagementScreen = ({
|
|
|
990
1045
|
onPress: () => handleFileOpen(photo),
|
|
991
1046
|
activeOpacity: 0.8,
|
|
992
1047
|
children: /*#__PURE__*/_jsxs(View, {
|
|
993
|
-
style:
|
|
1048
|
+
style: fileManagementStyles.simplePhotoContainer,
|
|
994
1049
|
children: [/*#__PURE__*/_jsx(ExpoImage, {
|
|
995
1050
|
source: {
|
|
996
1051
|
uri: downloadUrl
|
|
997
1052
|
},
|
|
998
|
-
style:
|
|
1053
|
+
style: fileManagementStyles.simplePhotoImage,
|
|
999
1054
|
contentFit: "cover",
|
|
1000
1055
|
transition: 120,
|
|
1001
1056
|
cachePolicy: "memory-disk",
|
|
@@ -1004,7 +1059,7 @@ const FileManagementScreen = ({
|
|
|
1004
1059
|
},
|
|
1005
1060
|
accessibilityLabel: photo.filename
|
|
1006
1061
|
}), selectMode && /*#__PURE__*/_jsx(View, {
|
|
1007
|
-
style:
|
|
1062
|
+
style: fileManagementStyles.selectionBadge,
|
|
1008
1063
|
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1009
1064
|
name: selectedIds.has(photo.id) ? 'checkmark-circle' : 'ellipse-outline',
|
|
1010
1065
|
size: 20,
|
|
@@ -1013,11 +1068,11 @@ const FileManagementScreen = ({
|
|
|
1013
1068
|
})]
|
|
1014
1069
|
})
|
|
1015
1070
|
}, photo.id);
|
|
1016
|
-
}, [oxyServices,
|
|
1071
|
+
}, [oxyServices, safeContainerWidth, selectMode, selectedIds, themeStyles.primaryColor, themeStyles.textColor]);
|
|
1017
1072
|
const renderJustifiedPhotoItem = useCallback((photo, width, height, isLast) => {
|
|
1018
|
-
const downloadUrl =
|
|
1073
|
+
const downloadUrl = getSafeDownloadUrlCallback(photo, 'thumb');
|
|
1019
1074
|
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1020
|
-
style: [
|
|
1075
|
+
style: [fileManagementStyles.justifiedPhotoItem, {
|
|
1021
1076
|
width,
|
|
1022
1077
|
height,
|
|
1023
1078
|
...(selectMode && selectedIds.has(photo.id) ? {
|
|
@@ -1031,12 +1086,12 @@ const FileManagementScreen = ({
|
|
|
1031
1086
|
onPress: () => handleFileOpen(photo),
|
|
1032
1087
|
activeOpacity: 0.8,
|
|
1033
1088
|
children: /*#__PURE__*/_jsxs(View, {
|
|
1034
|
-
style:
|
|
1089
|
+
style: fileManagementStyles.justifiedPhotoContainer,
|
|
1035
1090
|
children: [/*#__PURE__*/_jsx(ExpoImage, {
|
|
1036
1091
|
source: {
|
|
1037
1092
|
uri: downloadUrl
|
|
1038
1093
|
},
|
|
1039
|
-
style:
|
|
1094
|
+
style: fileManagementStyles.justifiedPhotoImage,
|
|
1040
1095
|
contentFit: "cover",
|
|
1041
1096
|
transition: 120,
|
|
1042
1097
|
cachePolicy: "memory-disk",
|
|
@@ -1045,7 +1100,7 @@ const FileManagementScreen = ({
|
|
|
1045
1100
|
},
|
|
1046
1101
|
accessibilityLabel: photo.filename
|
|
1047
1102
|
}), selectMode && /*#__PURE__*/_jsx(View, {
|
|
1048
|
-
style:
|
|
1103
|
+
style: fileManagementStyles.selectionBadge,
|
|
1049
1104
|
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1050
1105
|
name: selectedIds.has(photo.id) ? 'checkmark-circle' : 'ellipse-outline',
|
|
1051
1106
|
size: 20,
|
|
@@ -1074,7 +1129,7 @@ const FileManagementScreen = ({
|
|
|
1074
1129
|
const hasPreview = isImage || isPDF || isVideo;
|
|
1075
1130
|
const borderColor = themeStyles.borderColor;
|
|
1076
1131
|
return /*#__PURE__*/_jsxs(View, {
|
|
1077
|
-
style: [
|
|
1132
|
+
style: [fileManagementStyles.fileItem, {
|
|
1078
1133
|
backgroundColor: themeStyles.secondaryBackgroundColor,
|
|
1079
1134
|
borderColor
|
|
1080
1135
|
}, selectMode && selectedIds.has(file.id) && {
|
|
@@ -1082,21 +1137,17 @@ const FileManagementScreen = ({
|
|
|
1082
1137
|
borderWidth: 2
|
|
1083
1138
|
}],
|
|
1084
1139
|
children: [/*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
1085
|
-
style:
|
|
1140
|
+
style: fileManagementStyles.fileContent,
|
|
1086
1141
|
onPress: () => handleFileOpen(file),
|
|
1087
1142
|
children: [/*#__PURE__*/_jsx(View, {
|
|
1088
|
-
style:
|
|
1143
|
+
style: fileManagementStyles.filePreviewContainer,
|
|
1089
1144
|
children: hasPreview ? /*#__PURE__*/_jsxs(View, {
|
|
1090
|
-
style:
|
|
1091
|
-
...(Platform.OS === 'web' && {
|
|
1092
|
-
onMouseEnter: () => setHoveredPreview(file.id),
|
|
1093
|
-
onMouseLeave: () => setHoveredPreview(null)
|
|
1094
|
-
}),
|
|
1145
|
+
style: fileManagementStyles.filePreview,
|
|
1095
1146
|
children: [isImage && /*#__PURE__*/_jsx(ExpoImage, {
|
|
1096
1147
|
source: {
|
|
1097
|
-
uri:
|
|
1148
|
+
uri: getSafeDownloadUrlCallback(file, 'thumb')
|
|
1098
1149
|
},
|
|
1099
|
-
style:
|
|
1150
|
+
style: fileManagementStyles.previewImage,
|
|
1100
1151
|
contentFit: "cover",
|
|
1101
1152
|
transition: 120,
|
|
1102
1153
|
cachePolicy: "memory-disk",
|
|
@@ -1105,24 +1156,24 @@ const FileManagementScreen = ({
|
|
|
1105
1156
|
},
|
|
1106
1157
|
accessibilityLabel: file.filename
|
|
1107
1158
|
}), isPDF && /*#__PURE__*/_jsxs(View, {
|
|
1108
|
-
style:
|
|
1159
|
+
style: fileManagementStyles.pdfPreview,
|
|
1109
1160
|
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
1110
1161
|
name: "document",
|
|
1111
1162
|
size: 32,
|
|
1112
1163
|
color: themeStyles.primaryColor
|
|
1113
1164
|
}), /*#__PURE__*/_jsx(Text, {
|
|
1114
|
-
style: [
|
|
1165
|
+
style: [fileManagementStyles.pdfLabel, {
|
|
1115
1166
|
color: themeStyles.primaryColor
|
|
1116
1167
|
}],
|
|
1117
1168
|
children: "PDF"
|
|
1118
1169
|
})]
|
|
1119
1170
|
}), isVideo && /*#__PURE__*/_jsxs(View, {
|
|
1120
|
-
style:
|
|
1171
|
+
style: fileManagementStyles.videoPreviewWrapper,
|
|
1121
1172
|
children: [/*#__PURE__*/_jsx(ExpoImage, {
|
|
1122
1173
|
source: {
|
|
1123
|
-
uri:
|
|
1174
|
+
uri: getSafeDownloadUrlCallback(file, 'thumb')
|
|
1124
1175
|
},
|
|
1125
|
-
style:
|
|
1176
|
+
style: fileManagementStyles.videoPosterImage,
|
|
1126
1177
|
contentFit: "cover",
|
|
1127
1178
|
transition: 120,
|
|
1128
1179
|
cachePolicy: "memory-disk",
|
|
@@ -1131,7 +1182,7 @@ const FileManagementScreen = ({
|
|
|
1131
1182
|
},
|
|
1132
1183
|
accessibilityLabel: file.filename + ' video thumbnail'
|
|
1133
1184
|
}), /*#__PURE__*/_jsx(View, {
|
|
1134
|
-
style:
|
|
1185
|
+
style: fileManagementStyles.videoOverlay,
|
|
1135
1186
|
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1136
1187
|
name: "play",
|
|
1137
1188
|
size: 24,
|
|
@@ -1139,26 +1190,16 @@ const FileManagementScreen = ({
|
|
|
1139
1190
|
})
|
|
1140
1191
|
})]
|
|
1141
1192
|
}), /*#__PURE__*/_jsx(View, {
|
|
1142
|
-
style: [
|
|
1193
|
+
style: [fileManagementStyles.fallbackIcon, {
|
|
1143
1194
|
display: isImage ? 'none' : 'flex'
|
|
1144
1195
|
}],
|
|
1145
|
-
...(Platform.OS === 'web' && {
|
|
1146
|
-
'data-fallback': 'true'
|
|
1147
|
-
}),
|
|
1148
1196
|
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1149
1197
|
name: getFileIcon(file.contentType),
|
|
1150
1198
|
size: 32,
|
|
1151
1199
|
color: themeStyles.primaryColor
|
|
1152
1200
|
})
|
|
1153
|
-
}), !selectMode && Platform.OS === 'web' && hoveredPreview === file.id && isImage && /*#__PURE__*/_jsx(View, {
|
|
1154
|
-
style: styles.previewOverlay,
|
|
1155
|
-
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1156
|
-
name: "eye",
|
|
1157
|
-
size: 24,
|
|
1158
|
-
color: "#FFFFFF"
|
|
1159
|
-
})
|
|
1160
1201
|
}), selectMode && /*#__PURE__*/_jsx(View, {
|
|
1161
|
-
style:
|
|
1202
|
+
style: fileManagementStyles.selectionBadge,
|
|
1162
1203
|
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1163
1204
|
name: selectedIds.has(file.id) ? 'checkmark-circle' : 'ellipse-outline',
|
|
1164
1205
|
size: 22,
|
|
@@ -1166,7 +1207,7 @@ const FileManagementScreen = ({
|
|
|
1166
1207
|
})
|
|
1167
1208
|
})]
|
|
1168
1209
|
}) : /*#__PURE__*/_jsx(View, {
|
|
1169
|
-
style:
|
|
1210
|
+
style: fileManagementStyles.fileIconContainer,
|
|
1170
1211
|
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1171
1212
|
name: getFileIcon(file.contentType),
|
|
1172
1213
|
size: 32,
|
|
@@ -1174,20 +1215,20 @@ const FileManagementScreen = ({
|
|
|
1174
1215
|
})
|
|
1175
1216
|
})
|
|
1176
1217
|
}), /*#__PURE__*/_jsxs(View, {
|
|
1177
|
-
style:
|
|
1218
|
+
style: fileManagementStyles.fileInfo,
|
|
1178
1219
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
1179
|
-
style: [
|
|
1220
|
+
style: [fileManagementStyles.fileName, {
|
|
1180
1221
|
color: themeStyles.textColor
|
|
1181
1222
|
}],
|
|
1182
1223
|
numberOfLines: 1,
|
|
1183
1224
|
children: file.filename
|
|
1184
1225
|
}), /*#__PURE__*/_jsxs(Text, {
|
|
1185
|
-
style: [
|
|
1226
|
+
style: [fileManagementStyles.fileDetails, {
|
|
1186
1227
|
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1187
1228
|
}],
|
|
1188
1229
|
children: [formatFileSize(file.length), " \u2022 ", new Date(file.uploadDate).toLocaleDateString()]
|
|
1189
1230
|
}), file.metadata?.description && /*#__PURE__*/_jsx(Text, {
|
|
1190
|
-
style: [
|
|
1231
|
+
style: [fileManagementStyles.fileDescription, {
|
|
1191
1232
|
color: themeStyles.isDarkTheme ? '#AAAAAA' : '#888888'
|
|
1192
1233
|
}],
|
|
1193
1234
|
numberOfLines: 2,
|
|
@@ -1195,9 +1236,9 @@ const FileManagementScreen = ({
|
|
|
1195
1236
|
})]
|
|
1196
1237
|
})]
|
|
1197
1238
|
}), !selectMode && /*#__PURE__*/_jsxs(View, {
|
|
1198
|
-
style:
|
|
1239
|
+
style: fileManagementStyles.fileActions,
|
|
1199
1240
|
children: [hasPreview && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1200
|
-
style: [
|
|
1241
|
+
style: [fileManagementStyles.actionButton, {
|
|
1201
1242
|
backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0'
|
|
1202
1243
|
}],
|
|
1203
1244
|
onPress: () => handleFileOpen(file),
|
|
@@ -1207,7 +1248,7 @@ const FileManagementScreen = ({
|
|
|
1207
1248
|
color: themeStyles.primaryColor
|
|
1208
1249
|
})
|
|
1209
1250
|
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1210
|
-
style: [
|
|
1251
|
+
style: [fileManagementStyles.actionButton, {
|
|
1211
1252
|
backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0'
|
|
1212
1253
|
}],
|
|
1213
1254
|
onPress: () => handleFileDownload(file.id, file.filename),
|
|
@@ -1217,7 +1258,7 @@ const FileManagementScreen = ({
|
|
|
1217
1258
|
color: themeStyles.primaryColor
|
|
1218
1259
|
})
|
|
1219
1260
|
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1220
|
-
style: [
|
|
1261
|
+
style: [fileManagementStyles.actionButton, {
|
|
1221
1262
|
backgroundColor: themeStyles.isDarkTheme ? '#400000' : '#FFEBEE'
|
|
1222
1263
|
}],
|
|
1223
1264
|
onPress: () => {
|
|
@@ -1248,15 +1289,104 @@ const FileManagementScreen = ({
|
|
|
1248
1289
|
});
|
|
1249
1290
|
return sortedFiles.map(file => {
|
|
1250
1291
|
const isImage = file.contentType.startsWith('image/');
|
|
1292
|
+
const isPDF = file.contentType.includes('pdf');
|
|
1251
1293
|
const isVideo = file.contentType.startsWith('video/');
|
|
1252
|
-
const hasPreview = isImage || isVideo;
|
|
1253
|
-
const previewUrl = hasPreview ? isVideo ? getSafeDownloadUrl(file, 'poster') : getSafeDownloadUrl(file, 'thumb') : undefined;
|
|
1294
|
+
const hasPreview = isImage || isPDF || isVideo;
|
|
1254
1295
|
const isSelected = selectedIds.has(file.id);
|
|
1296
|
+
|
|
1297
|
+
// Create customIcon for preview thumbnails (36x36 to match GroupedItem iconContainer)
|
|
1298
|
+
let customIcon;
|
|
1299
|
+
if (hasPreview) {
|
|
1300
|
+
if (isImage) {
|
|
1301
|
+
customIcon = /*#__PURE__*/_jsx(View, {
|
|
1302
|
+
style: {
|
|
1303
|
+
width: 36,
|
|
1304
|
+
height: 36,
|
|
1305
|
+
borderRadius: 18,
|
|
1306
|
+
overflow: 'hidden'
|
|
1307
|
+
},
|
|
1308
|
+
children: /*#__PURE__*/_jsx(ExpoImage, {
|
|
1309
|
+
source: {
|
|
1310
|
+
uri: getSafeDownloadUrlCallback(file, 'thumb')
|
|
1311
|
+
},
|
|
1312
|
+
style: {
|
|
1313
|
+
width: 36,
|
|
1314
|
+
height: 36
|
|
1315
|
+
},
|
|
1316
|
+
contentFit: "cover",
|
|
1317
|
+
transition: 120,
|
|
1318
|
+
cachePolicy: "memory-disk",
|
|
1319
|
+
onError: () => {
|
|
1320
|
+
// Image preview failed to load - will fallback to icon
|
|
1321
|
+
},
|
|
1322
|
+
accessibilityLabel: file.filename
|
|
1323
|
+
})
|
|
1324
|
+
});
|
|
1325
|
+
} else if (isVideo) {
|
|
1326
|
+
customIcon = /*#__PURE__*/_jsxs(View, {
|
|
1327
|
+
style: {
|
|
1328
|
+
width: 36,
|
|
1329
|
+
height: 36,
|
|
1330
|
+
borderRadius: 18,
|
|
1331
|
+
overflow: 'hidden',
|
|
1332
|
+
backgroundColor: '#000000',
|
|
1333
|
+
position: 'relative'
|
|
1334
|
+
},
|
|
1335
|
+
children: [/*#__PURE__*/_jsx(ExpoImage, {
|
|
1336
|
+
source: {
|
|
1337
|
+
uri: getSafeDownloadUrlCallback(file, 'thumb')
|
|
1338
|
+
},
|
|
1339
|
+
style: {
|
|
1340
|
+
width: 36,
|
|
1341
|
+
height: 36
|
|
1342
|
+
},
|
|
1343
|
+
contentFit: "cover",
|
|
1344
|
+
transition: 120,
|
|
1345
|
+
cachePolicy: "memory-disk",
|
|
1346
|
+
onError: _ => {
|
|
1347
|
+
// If thumbnail not available, we still show icon overlay
|
|
1348
|
+
},
|
|
1349
|
+
accessibilityLabel: file.filename + ' video thumbnail'
|
|
1350
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
1351
|
+
style: {
|
|
1352
|
+
position: 'absolute',
|
|
1353
|
+
top: 0,
|
|
1354
|
+
left: 0,
|
|
1355
|
+
right: 0,
|
|
1356
|
+
bottom: 0,
|
|
1357
|
+
alignItems: 'center',
|
|
1358
|
+
justifyContent: 'center',
|
|
1359
|
+
backgroundColor: 'rgba(0,0,0,0.25)'
|
|
1360
|
+
},
|
|
1361
|
+
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1362
|
+
name: "play",
|
|
1363
|
+
size: 16,
|
|
1364
|
+
color: "#FFFFFF"
|
|
1365
|
+
})
|
|
1366
|
+
})]
|
|
1367
|
+
});
|
|
1368
|
+
} else if (isPDF) {
|
|
1369
|
+
customIcon = /*#__PURE__*/_jsx(View, {
|
|
1370
|
+
style: {
|
|
1371
|
+
width: 36,
|
|
1372
|
+
height: 36,
|
|
1373
|
+
borderRadius: 18,
|
|
1374
|
+
alignItems: 'center',
|
|
1375
|
+
justifyContent: 'center',
|
|
1376
|
+
backgroundColor: '#FF6B6B20'
|
|
1377
|
+
},
|
|
1378
|
+
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1379
|
+
name: "document",
|
|
1380
|
+
size: 20,
|
|
1381
|
+
color: themeStyles.primaryColor
|
|
1382
|
+
})
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1255
1386
|
return {
|
|
1256
1387
|
id: file.id,
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
icon: !previewUrl ? getFileIcon(file.contentType) : undefined,
|
|
1388
|
+
customIcon: customIcon,
|
|
1389
|
+
icon: !hasPreview ? getFileIcon(file.contentType) : undefined,
|
|
1260
1390
|
iconColor: themeStyles.primaryColor,
|
|
1261
1391
|
title: file.filename,
|
|
1262
1392
|
subtitle: `${formatFileSize(file.length)} • ${new Date(file.uploadDate).toLocaleDateString()}`,
|
|
@@ -1284,9 +1414,9 @@ const FileManagementScreen = ({
|
|
|
1284
1414
|
selected: (selectMode || selectedIds.size > 0) && isSelected,
|
|
1285
1415
|
// Hide action buttons when selecting (in selectMode or bulk operations mode)
|
|
1286
1416
|
customContent: !selectMode && selectedIds.size === 0 ? /*#__PURE__*/_jsxs(View, {
|
|
1287
|
-
style:
|
|
1417
|
+
style: fileManagementStyles.groupedActions,
|
|
1288
1418
|
children: [(isImage || isVideo || file.contentType.includes('pdf')) && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1289
|
-
style: [
|
|
1419
|
+
style: [fileManagementStyles.groupedActionBtn, {
|
|
1290
1420
|
backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0'
|
|
1291
1421
|
}],
|
|
1292
1422
|
onPress: () => handleFileOpen(file),
|
|
@@ -1296,7 +1426,7 @@ const FileManagementScreen = ({
|
|
|
1296
1426
|
color: themeStyles.primaryColor
|
|
1297
1427
|
})
|
|
1298
1428
|
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1299
|
-
style: [
|
|
1429
|
+
style: [fileManagementStyles.groupedActionBtn, {
|
|
1300
1430
|
backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0'
|
|
1301
1431
|
}],
|
|
1302
1432
|
onPress: () => handleFileDownload(file.id, file.filename),
|
|
@@ -1306,7 +1436,7 @@ const FileManagementScreen = ({
|
|
|
1306
1436
|
color: themeStyles.primaryColor
|
|
1307
1437
|
})
|
|
1308
1438
|
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1309
|
-
style: [
|
|
1439
|
+
style: [fileManagementStyles.groupedActionBtn, {
|
|
1310
1440
|
backgroundColor: themeStyles.isDarkTheme ? '#400000' : '#FFEBEE'
|
|
1311
1441
|
}],
|
|
1312
1442
|
onPress: () => handleFileDelete(file.id, file.filename),
|
|
@@ -1322,7 +1452,7 @@ const FileManagementScreen = ({
|
|
|
1322
1452
|
})]
|
|
1323
1453
|
}) : undefined,
|
|
1324
1454
|
customContentBelow: file.metadata?.description ? /*#__PURE__*/_jsx(Text, {
|
|
1325
|
-
style: [
|
|
1455
|
+
style: [fileManagementStyles.groupedDescription, {
|
|
1326
1456
|
color: themeStyles.isDarkTheme ? '#AAAAAA' : '#666666'
|
|
1327
1457
|
}],
|
|
1328
1458
|
numberOfLines: 2,
|
|
@@ -1330,7 +1460,7 @@ const FileManagementScreen = ({
|
|
|
1330
1460
|
}) : undefined
|
|
1331
1461
|
};
|
|
1332
1462
|
});
|
|
1333
|
-
}, [filteredFiles, theme, themeStyles, deleting, handleFileDownload, handleFileDelete, handleFileOpen,
|
|
1463
|
+
}, [filteredFiles, theme, themeStyles, deleting, handleFileDownload, handleFileDelete, handleFileOpen, getSafeDownloadUrlCallback, selectMode, selectedIds]);
|
|
1334
1464
|
|
|
1335
1465
|
// Scroll to selected file after selection
|
|
1336
1466
|
useEffect(() => {
|
|
@@ -1378,10 +1508,10 @@ const FileManagementScreen = ({
|
|
|
1378
1508
|
// Estimate photo item height based on grid layout
|
|
1379
1509
|
// Calculate items per row
|
|
1380
1510
|
let itemsPerRow = 3;
|
|
1381
|
-
if (
|
|
1511
|
+
if (safeContainerWidth > 768) itemsPerRow = 6;else if (safeContainerWidth > 480) itemsPerRow = 4;
|
|
1382
1512
|
const scrollContainerPadding = 32;
|
|
1383
1513
|
const gaps = (itemsPerRow - 1) * 4;
|
|
1384
|
-
const availableWidth =
|
|
1514
|
+
const availableWidth = safeContainerWidth - scrollContainerPadding;
|
|
1385
1515
|
const itemWidth = (availableWidth - gaps) / itemsPerRow;
|
|
1386
1516
|
|
|
1387
1517
|
// Calculate row and approximate scroll position
|
|
@@ -1401,7 +1531,7 @@ const FileManagementScreen = ({
|
|
|
1401
1531
|
}
|
|
1402
1532
|
}
|
|
1403
1533
|
}
|
|
1404
|
-
}, [lastSelectedFileId, selectMode, viewMode, filteredFiles,
|
|
1534
|
+
}, [lastSelectedFileId, selectMode, viewMode, filteredFiles, safeContainerWidth]);
|
|
1405
1535
|
|
|
1406
1536
|
// Clear selected file ID after scroll animation completes
|
|
1407
1537
|
useEffect(() => {
|
|
@@ -1414,32 +1544,32 @@ const FileManagementScreen = ({
|
|
|
1414
1544
|
}
|
|
1415
1545
|
}, [lastSelectedFileId]);
|
|
1416
1546
|
const renderPhotoItem = (photo, index) => {
|
|
1417
|
-
const downloadUrl =
|
|
1547
|
+
const downloadUrl = getSafeDownloadUrlCallback(photo, 'thumb');
|
|
1418
1548
|
|
|
1419
1549
|
// Calculate photo item width based on actual container size from bottom sheet
|
|
1420
1550
|
let itemsPerRow = 3; // Default for mobile
|
|
1421
|
-
if (
|
|
1422
|
-
else if (
|
|
1551
|
+
if (safeContainerWidth > 768) itemsPerRow = 6; // Tablet/Desktop
|
|
1552
|
+
else if (safeContainerWidth > 480) itemsPerRow = 4; // Large mobile
|
|
1423
1553
|
|
|
1424
1554
|
// Account for the photoScrollContainer padding (16px on each side = 32px total)
|
|
1425
1555
|
const scrollContainerPadding = 32; // Total horizontal padding from photoScrollContainer
|
|
1426
1556
|
const gaps = (itemsPerRow - 1) * 4; // Gap between items
|
|
1427
|
-
const availableWidth =
|
|
1557
|
+
const availableWidth = safeContainerWidth - scrollContainerPadding;
|
|
1428
1558
|
const itemWidth = (availableWidth - gaps) / itemsPerRow;
|
|
1429
1559
|
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1430
|
-
style: [
|
|
1560
|
+
style: [fileManagementStyles.photoItem, {
|
|
1431
1561
|
width: itemWidth,
|
|
1432
1562
|
height: itemWidth
|
|
1433
1563
|
}],
|
|
1434
1564
|
onPress: () => handleFileOpen(photo),
|
|
1435
1565
|
activeOpacity: 0.8,
|
|
1436
1566
|
children: /*#__PURE__*/_jsx(View, {
|
|
1437
|
-
style:
|
|
1567
|
+
style: fileManagementStyles.photoContainer,
|
|
1438
1568
|
children: /*#__PURE__*/_jsx(ExpoImage, {
|
|
1439
1569
|
source: {
|
|
1440
1570
|
uri: downloadUrl
|
|
1441
1571
|
},
|
|
1442
|
-
style:
|
|
1572
|
+
style: fileManagementStyles.photoImage,
|
|
1443
1573
|
contentFit: "cover",
|
|
1444
1574
|
transition: 120,
|
|
1445
1575
|
cachePolicy: "memory-disk",
|
|
@@ -1455,37 +1585,40 @@ const FileManagementScreen = ({
|
|
|
1455
1585
|
const photos = filteredFiles.filter(file => file.contentType.startsWith('image/'));
|
|
1456
1586
|
if (photos.length === 0) {
|
|
1457
1587
|
return /*#__PURE__*/_jsxs(View, {
|
|
1458
|
-
style:
|
|
1588
|
+
style: fileManagementStyles.emptyState,
|
|
1459
1589
|
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
1460
1590
|
name: "images-outline",
|
|
1461
1591
|
size: 64,
|
|
1462
1592
|
color: themeStyles.isDarkTheme ? '#666666' : '#CCCCCC'
|
|
1463
1593
|
}), /*#__PURE__*/_jsx(Text, {
|
|
1464
|
-
style: [
|
|
1594
|
+
style: [fileManagementStyles.emptyStateTitle, {
|
|
1465
1595
|
color: themeStyles.textColor
|
|
1466
1596
|
}],
|
|
1467
1597
|
children: "No Photos Yet"
|
|
1468
1598
|
}), /*#__PURE__*/_jsxs(Text, {
|
|
1469
|
-
style: [
|
|
1599
|
+
style: [fileManagementStyles.emptyStateDescription, {
|
|
1470
1600
|
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1471
1601
|
}],
|
|
1472
|
-
children: [" ", user?.id === targetUserId ? `Upload photos to get started. You can select multiple photos at once
|
|
1602
|
+
children: [" ", user?.id === targetUserId ? `Upload photos to get started. You can select multiple photos at once.` : "This user hasn't uploaded any photos yet", " "]
|
|
1473
1603
|
}), user?.id === targetUserId && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1474
|
-
style: [
|
|
1604
|
+
style: [fileManagementStyles.emptyStateButton, {
|
|
1475
1605
|
backgroundColor: themeStyles.primaryColor
|
|
1476
1606
|
}],
|
|
1477
1607
|
onPress: handleFileUpload,
|
|
1478
|
-
disabled: uploading,
|
|
1608
|
+
disabled: uploading || isPickingDocument,
|
|
1479
1609
|
children: uploading ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
1480
1610
|
size: "small",
|
|
1481
1611
|
color: "#FFFFFF"
|
|
1612
|
+
}) : isPickingDocument ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
1613
|
+
size: "small",
|
|
1614
|
+
color: "#FFFFFF"
|
|
1482
1615
|
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
1483
1616
|
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
1484
1617
|
name: "cloud-upload",
|
|
1485
1618
|
size: 20,
|
|
1486
1619
|
color: "#FFFFFF"
|
|
1487
1620
|
}), /*#__PURE__*/_jsx(Text, {
|
|
1488
|
-
style:
|
|
1621
|
+
style: fileManagementStyles.emptyStateButtonText,
|
|
1489
1622
|
children: "Upload Photos"
|
|
1490
1623
|
})]
|
|
1491
1624
|
})
|
|
@@ -1494,8 +1627,8 @@ const FileManagementScreen = ({
|
|
|
1494
1627
|
}
|
|
1495
1628
|
return /*#__PURE__*/_jsxs(ScrollView, {
|
|
1496
1629
|
ref: photoScrollViewRef,
|
|
1497
|
-
style:
|
|
1498
|
-
contentContainerStyle:
|
|
1630
|
+
style: fileManagementStyles.scrollView,
|
|
1631
|
+
contentContainerStyle: fileManagementStyles.photoScrollContainer,
|
|
1499
1632
|
refreshControl: /*#__PURE__*/_jsx(RefreshControl, {
|
|
1500
1633
|
refreshing: refreshing,
|
|
1501
1634
|
onRefresh: () => loadFiles('refresh'),
|
|
@@ -1517,12 +1650,12 @@ const FileManagementScreen = ({
|
|
|
1517
1650
|
},
|
|
1518
1651
|
scrollEventThrottle: 250,
|
|
1519
1652
|
children: [loadingDimensions && /*#__PURE__*/_jsxs(View, {
|
|
1520
|
-
style:
|
|
1653
|
+
style: fileManagementStyles.dimensionsLoadingIndicator,
|
|
1521
1654
|
children: [/*#__PURE__*/_jsx(ActivityIndicator, {
|
|
1522
1655
|
size: "small",
|
|
1523
1656
|
color: themeStyles.primaryColor
|
|
1524
1657
|
}), /*#__PURE__*/_jsx(Text, {
|
|
1525
|
-
style: [
|
|
1658
|
+
style: [fileManagementStyles.dimensionsLoadingText, {
|
|
1526
1659
|
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1527
1660
|
}],
|
|
1528
1661
|
children: "Loading photo layout..."
|
|
@@ -1535,525 +1668,48 @@ const FileManagementScreen = ({
|
|
|
1535
1668
|
renderJustifiedPhotoItem: renderJustifiedPhotoItem,
|
|
1536
1669
|
renderSimplePhotoItem: renderPhotoItem,
|
|
1537
1670
|
textColor: themeStyles.textColor,
|
|
1538
|
-
containerWidth:
|
|
1671
|
+
containerWidth: safeContainerWidth
|
|
1539
1672
|
})]
|
|
1540
1673
|
});
|
|
1541
|
-
}, [filteredFiles, themeStyles, user?.id, targetUserId, uploading, handleFileUpload, refreshing, loadFiles, loadingDimensions, photoDimensions, loadPhotoDimensions, createJustifiedRows, renderJustifiedPhotoItem, renderPhotoItem,
|
|
1674
|
+
}, [filteredFiles, themeStyles, user?.id, targetUserId, uploading, handleFileUpload, refreshing, loadFiles, loadingDimensions, photoDimensions, loadPhotoDimensions, createJustifiedRows, renderJustifiedPhotoItem, renderPhotoItem, safeContainerWidth]);
|
|
1542
1675
|
|
|
1543
1676
|
// Inline justified grid removed (moved to components/photogrid/JustifiedPhotoGrid.tsx)
|
|
1544
1677
|
|
|
1545
|
-
const renderFileDetailsModal = () => {
|
|
1546
|
-
const backgroundColor = themeStyles.backgroundColor;
|
|
1547
|
-
const borderColor = themeStyles.borderColor;
|
|
1548
|
-
return /*#__PURE__*/_jsx(Modal, {
|
|
1549
|
-
visible: showFileDetails,
|
|
1550
|
-
animationType: "slide",
|
|
1551
|
-
presentationStyle: "pageSheet",
|
|
1552
|
-
onRequestClose: () => setShowFileDetails(false),
|
|
1553
|
-
children: /*#__PURE__*/_jsxs(View, {
|
|
1554
|
-
style: [styles.modalContainer, {
|
|
1555
|
-
backgroundColor
|
|
1556
|
-
}],
|
|
1557
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
1558
|
-
style: [styles.modalHeader, {
|
|
1559
|
-
borderBottomColor: borderColor
|
|
1560
|
-
}],
|
|
1561
|
-
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1562
|
-
style: styles.modalCloseButton,
|
|
1563
|
-
onPress: () => setShowFileDetails(false),
|
|
1564
|
-
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1565
|
-
name: "close",
|
|
1566
|
-
size: 24,
|
|
1567
|
-
color: themeStyles.textColor
|
|
1568
|
-
})
|
|
1569
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1570
|
-
style: [styles.modalTitle, {
|
|
1571
|
-
color: themeStyles.textColor
|
|
1572
|
-
}],
|
|
1573
|
-
children: "File Details"
|
|
1574
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
1575
|
-
style: styles.modalPlaceholder
|
|
1576
|
-
})]
|
|
1577
|
-
}), selectedFile && /*#__PURE__*/_jsx(ScrollView, {
|
|
1578
|
-
style: styles.modalContent,
|
|
1579
|
-
children: /*#__PURE__*/_jsxs(View, {
|
|
1580
|
-
style: [styles.fileDetailCard, {
|
|
1581
|
-
backgroundColor: themeStyles.secondaryBackgroundColor,
|
|
1582
|
-
borderColor
|
|
1583
|
-
}],
|
|
1584
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
1585
|
-
style: styles.fileDetailIcon,
|
|
1586
|
-
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1587
|
-
name: getFileIcon(selectedFile.contentType),
|
|
1588
|
-
size: 64,
|
|
1589
|
-
color: themeStyles.primaryColor
|
|
1590
|
-
})
|
|
1591
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1592
|
-
style: [styles.fileDetailName, {
|
|
1593
|
-
color: themeStyles.textColor
|
|
1594
|
-
}],
|
|
1595
|
-
children: selectedFile.filename
|
|
1596
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1597
|
-
style: styles.fileDetailInfo,
|
|
1598
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
1599
|
-
style: styles.detailRow,
|
|
1600
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
1601
|
-
style: [styles.detailLabel, {
|
|
1602
|
-
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1603
|
-
}],
|
|
1604
|
-
children: "Size:"
|
|
1605
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1606
|
-
style: [styles.detailValue, {
|
|
1607
|
-
color: themeStyles.textColor
|
|
1608
|
-
}],
|
|
1609
|
-
children: formatFileSize(selectedFile.length)
|
|
1610
|
-
})]
|
|
1611
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1612
|
-
style: styles.detailRow,
|
|
1613
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
1614
|
-
style: [styles.detailLabel, {
|
|
1615
|
-
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1616
|
-
}],
|
|
1617
|
-
children: "Type:"
|
|
1618
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1619
|
-
style: [styles.detailValue, {
|
|
1620
|
-
color: themeStyles.textColor
|
|
1621
|
-
}],
|
|
1622
|
-
children: selectedFile.contentType
|
|
1623
|
-
})]
|
|
1624
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1625
|
-
style: styles.detailRow,
|
|
1626
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
1627
|
-
style: [styles.detailLabel, {
|
|
1628
|
-
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1629
|
-
}],
|
|
1630
|
-
children: "Uploaded:"
|
|
1631
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1632
|
-
style: [styles.detailValue, {
|
|
1633
|
-
color: themeStyles.textColor
|
|
1634
|
-
}],
|
|
1635
|
-
children: new Date(selectedFile.uploadDate).toLocaleString()
|
|
1636
|
-
})]
|
|
1637
|
-
}), selectedFile.metadata?.description && /*#__PURE__*/_jsxs(View, {
|
|
1638
|
-
style: styles.detailRow,
|
|
1639
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
1640
|
-
style: [styles.detailLabel, {
|
|
1641
|
-
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1642
|
-
}],
|
|
1643
|
-
children: "Description:"
|
|
1644
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1645
|
-
style: [styles.detailValue, {
|
|
1646
|
-
color: themeStyles.textColor
|
|
1647
|
-
}],
|
|
1648
|
-
children: selectedFile.metadata.description
|
|
1649
|
-
})]
|
|
1650
|
-
})]
|
|
1651
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1652
|
-
style: styles.modalActions,
|
|
1653
|
-
children: [/*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
1654
|
-
style: [styles.modalActionButton, {
|
|
1655
|
-
backgroundColor: themeStyles.primaryColor
|
|
1656
|
-
}],
|
|
1657
|
-
onPress: () => {
|
|
1658
|
-
handleFileDownload(selectedFile.id, selectedFile.filename);
|
|
1659
|
-
setShowFileDetails(false);
|
|
1660
|
-
},
|
|
1661
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
1662
|
-
name: "download",
|
|
1663
|
-
size: 20,
|
|
1664
|
-
color: "#FFFFFF"
|
|
1665
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1666
|
-
style: styles.modalActionText,
|
|
1667
|
-
children: "Download"
|
|
1668
|
-
})]
|
|
1669
|
-
}), user?.id === targetUserId && /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
1670
|
-
style: [styles.modalActionButton, {
|
|
1671
|
-
backgroundColor: themeStyles.dangerColor
|
|
1672
|
-
}],
|
|
1673
|
-
onPress: () => {
|
|
1674
|
-
setShowFileDetails(false);
|
|
1675
|
-
handleFileDelete(selectedFile.id, selectedFile.filename);
|
|
1676
|
-
},
|
|
1677
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
1678
|
-
name: "trash",
|
|
1679
|
-
size: 20,
|
|
1680
|
-
color: "#FFFFFF"
|
|
1681
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1682
|
-
style: styles.modalActionText,
|
|
1683
|
-
children: "Delete"
|
|
1684
|
-
})]
|
|
1685
|
-
})]
|
|
1686
|
-
})]
|
|
1687
|
-
})
|
|
1688
|
-
})]
|
|
1689
|
-
})
|
|
1690
|
-
});
|
|
1691
|
-
};
|
|
1692
|
-
const renderFileViewer = () => {
|
|
1693
|
-
if (!openedFile) return null;
|
|
1694
|
-
const backgroundColor = themeStyles.backgroundColor;
|
|
1695
|
-
const borderColor = themeStyles.borderColor;
|
|
1696
|
-
const isImage = openedFile.contentType.startsWith('image/');
|
|
1697
|
-
const isText = openedFile.contentType.startsWith('text/') || openedFile.contentType.includes('json') || openedFile.contentType.includes('xml') || openedFile.contentType.includes('javascript') || openedFile.contentType.includes('typescript');
|
|
1698
|
-
const isPDF = openedFile.contentType.includes('pdf');
|
|
1699
|
-
const isVideo = openedFile.contentType.startsWith('video/');
|
|
1700
|
-
const isAudio = openedFile.contentType.startsWith('audio/');
|
|
1701
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
1702
|
-
style: [styles.fileViewerContainer, {
|
|
1703
|
-
backgroundColor
|
|
1704
|
-
}],
|
|
1705
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
1706
|
-
style: [styles.fileViewerHeader, {
|
|
1707
|
-
borderBottomColor: borderColor
|
|
1708
|
-
}],
|
|
1709
|
-
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1710
|
-
style: styles.backButton,
|
|
1711
|
-
onPress: handleCloseFile,
|
|
1712
|
-
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1713
|
-
name: "arrow-back",
|
|
1714
|
-
size: 24,
|
|
1715
|
-
color: themeStyles.textColor
|
|
1716
|
-
})
|
|
1717
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1718
|
-
style: styles.fileViewerTitleContainer,
|
|
1719
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
1720
|
-
style: [styles.fileViewerTitle, {
|
|
1721
|
-
color: themeStyles.textColor
|
|
1722
|
-
}],
|
|
1723
|
-
numberOfLines: 1,
|
|
1724
|
-
children: openedFile.filename
|
|
1725
|
-
}), /*#__PURE__*/_jsxs(Text, {
|
|
1726
|
-
style: [styles.fileViewerSubtitle, {
|
|
1727
|
-
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1728
|
-
}],
|
|
1729
|
-
children: [formatFileSize(openedFile.length), " \u2022 ", openedFile.contentType]
|
|
1730
|
-
})]
|
|
1731
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1732
|
-
style: styles.fileViewerActions,
|
|
1733
|
-
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1734
|
-
style: [styles.actionButton, {
|
|
1735
|
-
backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0'
|
|
1736
|
-
}],
|
|
1737
|
-
onPress: () => handleFileDownload(openedFile.id, openedFile.filename),
|
|
1738
|
-
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1739
|
-
name: "download",
|
|
1740
|
-
size: 20,
|
|
1741
|
-
color: themeStyles.primaryColor
|
|
1742
|
-
})
|
|
1743
|
-
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1744
|
-
style: [styles.actionButton, {
|
|
1745
|
-
backgroundColor: showFileDetailsInViewer ? themeStyles.primaryColor : themeStyles.isDarkTheme ? '#333333' : '#F0F0F0'
|
|
1746
|
-
}],
|
|
1747
|
-
onPress: () => setShowFileDetailsInViewer(!showFileDetailsInViewer),
|
|
1748
|
-
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1749
|
-
name: showFileDetailsInViewer ? "chevron-up" : "information-circle",
|
|
1750
|
-
size: 20,
|
|
1751
|
-
color: showFileDetailsInViewer ? "#FFFFFF" : themeStyles.primaryColor
|
|
1752
|
-
})
|
|
1753
|
-
})]
|
|
1754
|
-
})]
|
|
1755
|
-
}), showFileDetailsInViewer && /*#__PURE__*/_jsxs(View, {
|
|
1756
|
-
style: [styles.fileDetailsSection, {
|
|
1757
|
-
backgroundColor: themeStyles.secondaryBackgroundColor,
|
|
1758
|
-
borderColor
|
|
1759
|
-
}],
|
|
1760
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
1761
|
-
style: styles.fileDetailsSectionHeader,
|
|
1762
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
1763
|
-
style: [styles.fileDetailsSectionTitle, {
|
|
1764
|
-
color: themeStyles.textColor
|
|
1765
|
-
}],
|
|
1766
|
-
children: "File Details"
|
|
1767
|
-
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1768
|
-
style: styles.fileDetailsSectionToggle,
|
|
1769
|
-
onPress: () => setShowFileDetailsInViewer(false),
|
|
1770
|
-
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1771
|
-
name: "chevron-up",
|
|
1772
|
-
size: 20,
|
|
1773
|
-
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1774
|
-
})
|
|
1775
|
-
})]
|
|
1776
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1777
|
-
style: styles.fileDetailInfo,
|
|
1778
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
1779
|
-
style: styles.detailRow,
|
|
1780
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
1781
|
-
style: [styles.detailLabel, {
|
|
1782
|
-
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1783
|
-
}],
|
|
1784
|
-
children: "File Name:"
|
|
1785
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1786
|
-
style: [styles.detailValue, {
|
|
1787
|
-
color: themeStyles.textColor
|
|
1788
|
-
}],
|
|
1789
|
-
children: openedFile.filename
|
|
1790
|
-
})]
|
|
1791
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1792
|
-
style: styles.detailRow,
|
|
1793
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
1794
|
-
style: [styles.detailLabel, {
|
|
1795
|
-
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1796
|
-
}],
|
|
1797
|
-
children: "Size:"
|
|
1798
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1799
|
-
style: [styles.detailValue, {
|
|
1800
|
-
color: themeStyles.textColor
|
|
1801
|
-
}],
|
|
1802
|
-
children: formatFileSize(openedFile.length)
|
|
1803
|
-
})]
|
|
1804
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1805
|
-
style: styles.detailRow,
|
|
1806
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
1807
|
-
style: [styles.detailLabel, {
|
|
1808
|
-
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1809
|
-
}],
|
|
1810
|
-
children: "Type:"
|
|
1811
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1812
|
-
style: [styles.detailValue, {
|
|
1813
|
-
color: themeStyles.textColor
|
|
1814
|
-
}],
|
|
1815
|
-
children: openedFile.contentType
|
|
1816
|
-
})]
|
|
1817
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1818
|
-
style: styles.detailRow,
|
|
1819
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
1820
|
-
style: [styles.detailLabel, {
|
|
1821
|
-
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1822
|
-
}],
|
|
1823
|
-
children: "Uploaded:"
|
|
1824
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1825
|
-
style: [styles.detailValue, {
|
|
1826
|
-
color: themeStyles.textColor
|
|
1827
|
-
}],
|
|
1828
|
-
children: new Date(openedFile.uploadDate).toLocaleString()
|
|
1829
|
-
})]
|
|
1830
|
-
}), openedFile.metadata?.description && /*#__PURE__*/_jsxs(View, {
|
|
1831
|
-
style: styles.detailRow,
|
|
1832
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
1833
|
-
style: [styles.detailLabel, {
|
|
1834
|
-
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1835
|
-
}],
|
|
1836
|
-
children: "Description:"
|
|
1837
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1838
|
-
style: [styles.detailValue, {
|
|
1839
|
-
color: themeStyles.textColor
|
|
1840
|
-
}],
|
|
1841
|
-
children: openedFile.metadata.description
|
|
1842
|
-
})]
|
|
1843
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1844
|
-
style: styles.detailRow,
|
|
1845
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
1846
|
-
style: [styles.detailLabel, {
|
|
1847
|
-
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1848
|
-
}],
|
|
1849
|
-
children: "File ID:"
|
|
1850
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1851
|
-
style: [styles.detailValue, {
|
|
1852
|
-
color: themeStyles.textColor,
|
|
1853
|
-
fontSize: 12,
|
|
1854
|
-
fontFamily: Platform.OS === 'web' ? 'monospace' : 'Courier'
|
|
1855
|
-
}],
|
|
1856
|
-
children: openedFile.id
|
|
1857
|
-
})]
|
|
1858
|
-
})]
|
|
1859
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1860
|
-
style: styles.fileDetailsActions,
|
|
1861
|
-
children: [/*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
1862
|
-
style: [styles.fileDetailsActionButton, {
|
|
1863
|
-
backgroundColor: themeStyles.primaryColor
|
|
1864
|
-
}],
|
|
1865
|
-
onPress: () => handleFileDownload(openedFile.id, openedFile.filename),
|
|
1866
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
1867
|
-
name: "download",
|
|
1868
|
-
size: 16,
|
|
1869
|
-
color: "#FFFFFF"
|
|
1870
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1871
|
-
style: styles.fileDetailsActionText,
|
|
1872
|
-
children: "Download"
|
|
1873
|
-
})]
|
|
1874
|
-
}), user?.id === targetUserId && /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
1875
|
-
style: [styles.fileDetailsActionButton, {
|
|
1876
|
-
backgroundColor: themeStyles.dangerColor
|
|
1877
|
-
}],
|
|
1878
|
-
onPress: () => {
|
|
1879
|
-
handleCloseFile();
|
|
1880
|
-
handleFileDelete(openedFile.id, openedFile.filename);
|
|
1881
|
-
},
|
|
1882
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
1883
|
-
name: "trash",
|
|
1884
|
-
size: 16,
|
|
1885
|
-
color: "#FFFFFF"
|
|
1886
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1887
|
-
style: styles.fileDetailsActionText,
|
|
1888
|
-
children: "Delete"
|
|
1889
|
-
})]
|
|
1890
|
-
})]
|
|
1891
|
-
})]
|
|
1892
|
-
}), /*#__PURE__*/_jsx(ScrollView, {
|
|
1893
|
-
style: [styles.fileViewerContent, showFileDetailsInViewer && styles.fileViewerContentWithDetails],
|
|
1894
|
-
contentContainerStyle: styles.fileViewerContentContainer,
|
|
1895
|
-
children: loadingFileContent ? /*#__PURE__*/_jsxs(View, {
|
|
1896
|
-
style: styles.fileViewerLoading,
|
|
1897
|
-
children: [/*#__PURE__*/_jsx(ActivityIndicator, {
|
|
1898
|
-
size: "large",
|
|
1899
|
-
color: themeStyles.primaryColor
|
|
1900
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1901
|
-
style: [styles.fileViewerLoadingText, {
|
|
1902
|
-
color: themeStyles.textColor
|
|
1903
|
-
}],
|
|
1904
|
-
children: "Loading file content..."
|
|
1905
|
-
})]
|
|
1906
|
-
}) : isImage && fileContent ? /*#__PURE__*/_jsx(View, {
|
|
1907
|
-
style: styles.imageContainer,
|
|
1908
|
-
children: /*#__PURE__*/_jsx(ExpoImage, {
|
|
1909
|
-
source: {
|
|
1910
|
-
uri: fileContent
|
|
1911
|
-
},
|
|
1912
|
-
style: {
|
|
1913
|
-
width: '100%',
|
|
1914
|
-
height: 400,
|
|
1915
|
-
borderRadius: 8
|
|
1916
|
-
},
|
|
1917
|
-
contentFit: "contain",
|
|
1918
|
-
transition: 120,
|
|
1919
|
-
cachePolicy: "memory-disk",
|
|
1920
|
-
onError: () => {
|
|
1921
|
-
// Image failed to load
|
|
1922
|
-
},
|
|
1923
|
-
accessibilityLabel: openedFile.filename
|
|
1924
|
-
})
|
|
1925
|
-
}) : isText && fileContent ? /*#__PURE__*/_jsx(View, {
|
|
1926
|
-
style: [styles.textContainer, {
|
|
1927
|
-
backgroundColor: themeStyles.secondaryBackgroundColor,
|
|
1928
|
-
borderColor
|
|
1929
|
-
}],
|
|
1930
|
-
children: /*#__PURE__*/_jsx(ScrollView, {
|
|
1931
|
-
style: {
|
|
1932
|
-
flex: 1
|
|
1933
|
-
},
|
|
1934
|
-
nestedScrollEnabled: true,
|
|
1935
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
1936
|
-
style: [styles.textContent, {
|
|
1937
|
-
color: themeStyles.textColor
|
|
1938
|
-
}],
|
|
1939
|
-
children: fileContent
|
|
1940
|
-
})
|
|
1941
|
-
})
|
|
1942
|
-
}) : isPDF && fileContent && Platform.OS === 'web' ? /*#__PURE__*/_jsx(View, {
|
|
1943
|
-
style: styles.pdfContainer,
|
|
1944
|
-
children: /*#__PURE__*/_jsx("iframe", {
|
|
1945
|
-
src: fileContent,
|
|
1946
|
-
width: "100%",
|
|
1947
|
-
height: "600px",
|
|
1948
|
-
style: {
|
|
1949
|
-
border: 'none',
|
|
1950
|
-
borderRadius: 8
|
|
1951
|
-
},
|
|
1952
|
-
title: openedFile.filename
|
|
1953
|
-
})
|
|
1954
|
-
}) : isVideo && fileContent ? /*#__PURE__*/_jsx(View, {
|
|
1955
|
-
style: styles.mediaContainer,
|
|
1956
|
-
children: Platform.OS === 'web' ? /*#__PURE__*/_jsxs("video", {
|
|
1957
|
-
controls: true,
|
|
1958
|
-
style: {
|
|
1959
|
-
width: '100%',
|
|
1960
|
-
maxHeight: '70vh',
|
|
1961
|
-
borderRadius: 8
|
|
1962
|
-
},
|
|
1963
|
-
children: [/*#__PURE__*/_jsx("source", {
|
|
1964
|
-
src: fileContent,
|
|
1965
|
-
type: openedFile.contentType
|
|
1966
|
-
}), "Your browser does not support the video tag."]
|
|
1967
|
-
}) : /*#__PURE__*/_jsx(Text, {
|
|
1968
|
-
style: [styles.unsupportedText, {
|
|
1969
|
-
color: themeStyles.textColor
|
|
1970
|
-
}],
|
|
1971
|
-
children: "Video playback not supported on mobile"
|
|
1972
|
-
})
|
|
1973
|
-
}) : isAudio && fileContent ? /*#__PURE__*/_jsx(View, {
|
|
1974
|
-
style: styles.mediaContainer,
|
|
1975
|
-
children: Platform.OS === 'web' ? /*#__PURE__*/_jsxs("audio", {
|
|
1976
|
-
controls: true,
|
|
1977
|
-
style: {
|
|
1978
|
-
width: '100%',
|
|
1979
|
-
borderRadius: 8
|
|
1980
|
-
},
|
|
1981
|
-
children: [/*#__PURE__*/_jsx("source", {
|
|
1982
|
-
src: fileContent,
|
|
1983
|
-
type: openedFile.contentType
|
|
1984
|
-
}), "Your browser does not support the audio tag."]
|
|
1985
|
-
}) : /*#__PURE__*/_jsx(Text, {
|
|
1986
|
-
style: [styles.unsupportedText, {
|
|
1987
|
-
color: themeStyles.textColor
|
|
1988
|
-
}],
|
|
1989
|
-
children: "Audio playback not supported on mobile"
|
|
1990
|
-
})
|
|
1991
|
-
}) : /*#__PURE__*/_jsxs(View, {
|
|
1992
|
-
style: styles.unsupportedFileContainer,
|
|
1993
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
1994
|
-
name: getFileIcon(openedFile.contentType),
|
|
1995
|
-
size: 64,
|
|
1996
|
-
color: themeStyles.isDarkTheme ? '#666666' : '#CCCCCC'
|
|
1997
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1998
|
-
style: [styles.unsupportedFileTitle, {
|
|
1999
|
-
color: themeStyles.textColor
|
|
2000
|
-
}],
|
|
2001
|
-
children: "Preview Not Available"
|
|
2002
|
-
}), /*#__PURE__*/_jsxs(Text, {
|
|
2003
|
-
style: [styles.unsupportedFileDescription, {
|
|
2004
|
-
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
2005
|
-
}],
|
|
2006
|
-
children: ["This file type cannot be previewed in the browser.", '\n', "Download the file to view its contents."]
|
|
2007
|
-
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
2008
|
-
style: [styles.downloadButtonLarge, {
|
|
2009
|
-
backgroundColor: themeStyles.primaryColor
|
|
2010
|
-
}],
|
|
2011
|
-
onPress: () => handleFileDownload(openedFile.id, openedFile.filename),
|
|
2012
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
2013
|
-
name: "download",
|
|
2014
|
-
size: 20,
|
|
2015
|
-
color: "#FFFFFF"
|
|
2016
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
2017
|
-
style: styles.downloadButtonText,
|
|
2018
|
-
children: "Download File"
|
|
2019
|
-
})]
|
|
2020
|
-
})]
|
|
2021
|
-
})
|
|
2022
|
-
})]
|
|
2023
|
-
});
|
|
2024
|
-
};
|
|
2025
1678
|
const renderEmptyState = () => /*#__PURE__*/_jsxs(View, {
|
|
2026
|
-
style:
|
|
1679
|
+
style: fileManagementStyles.emptyState,
|
|
2027
1680
|
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
2028
1681
|
name: "folder-open-outline",
|
|
2029
1682
|
size: 64,
|
|
2030
1683
|
color: themeStyles.isDarkTheme ? '#666666' : '#CCCCCC'
|
|
2031
1684
|
}), /*#__PURE__*/_jsx(Text, {
|
|
2032
|
-
style: [
|
|
1685
|
+
style: [fileManagementStyles.emptyStateTitle, {
|
|
2033
1686
|
color: themeStyles.textColor
|
|
2034
1687
|
}],
|
|
2035
1688
|
children: "No Files Yet"
|
|
2036
1689
|
}), /*#__PURE__*/_jsx(Text, {
|
|
2037
|
-
style: [
|
|
1690
|
+
style: [fileManagementStyles.emptyStateDescription, {
|
|
2038
1691
|
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
2039
1692
|
}],
|
|
2040
|
-
children: user?.id === targetUserId ? `Upload files to get started. You can select multiple files at once
|
|
1693
|
+
children: user?.id === targetUserId ? `Upload files to get started. You can select multiple files at once.` : "This user hasn't uploaded any files yet"
|
|
2041
1694
|
}), user?.id === targetUserId && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
2042
|
-
style: [
|
|
1695
|
+
style: [fileManagementStyles.emptyStateButton, {
|
|
2043
1696
|
backgroundColor: themeStyles.primaryColor
|
|
2044
1697
|
}],
|
|
2045
1698
|
onPress: handleFileUpload,
|
|
2046
|
-
disabled: uploading,
|
|
1699
|
+
disabled: uploading || isPickingDocument,
|
|
2047
1700
|
children: uploading ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
2048
1701
|
size: "small",
|
|
2049
1702
|
color: "#FFFFFF"
|
|
1703
|
+
}) : isPickingDocument ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
1704
|
+
size: "small",
|
|
1705
|
+
color: "#FFFFFF"
|
|
2050
1706
|
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
2051
1707
|
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
2052
1708
|
name: "cloud-upload",
|
|
2053
1709
|
size: 20,
|
|
2054
1710
|
color: "#FFFFFF"
|
|
2055
1711
|
}), /*#__PURE__*/_jsx(Text, {
|
|
2056
|
-
style:
|
|
1712
|
+
style: fileManagementStyles.emptyStateButtonText,
|
|
2057
1713
|
children: "Upload Files"
|
|
2058
1714
|
})]
|
|
2059
1715
|
})
|
|
@@ -2063,7 +1719,7 @@ const FileManagementScreen = ({
|
|
|
2063
1719
|
// Professional Skeleton Loading Component with Advanced Shimmer Effect
|
|
2064
1720
|
const SkeletonLoader = /*#__PURE__*/React.memo(() => {
|
|
2065
1721
|
const shimmerAnim = useRef(new Animated.Value(0)).current;
|
|
2066
|
-
const skeletonContainerWidth =
|
|
1722
|
+
const skeletonContainerWidth = safeContainerWidth;
|
|
2067
1723
|
useEffect(() => {
|
|
2068
1724
|
const shimmer = Animated.loop(Animated.timing(shimmerAnim, {
|
|
2069
1725
|
toValue: 1,
|
|
@@ -2177,11 +1833,11 @@ const FileManagementScreen = ({
|
|
|
2177
1833
|
})]
|
|
2178
1834
|
});
|
|
2179
1835
|
return /*#__PURE__*/_jsxs(View, {
|
|
2180
|
-
style: [
|
|
1836
|
+
style: [fileManagementStyles.container, {
|
|
2181
1837
|
backgroundColor
|
|
2182
1838
|
}],
|
|
2183
1839
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
2184
|
-
style: [
|
|
1840
|
+
style: [fileManagementStyles.header, {
|
|
2185
1841
|
borderBottomColor: themeStyles.borderColor,
|
|
2186
1842
|
borderBottomWidth: StyleSheet.hairlineWidth
|
|
2187
1843
|
}],
|
|
@@ -2190,7 +1846,7 @@ const FileManagementScreen = ({
|
|
|
2190
1846
|
height: 44,
|
|
2191
1847
|
borderRadius: 12
|
|
2192
1848
|
}), /*#__PURE__*/_jsxs(View, {
|
|
2193
|
-
style: [
|
|
1849
|
+
style: [fileManagementStyles.headerTitleContainer, {
|
|
2194
1850
|
flex: 1
|
|
2195
1851
|
}],
|
|
2196
1852
|
children: [/*#__PURE__*/_jsx(SkeletonBox, {
|
|
@@ -2209,7 +1865,7 @@ const FileManagementScreen = ({
|
|
|
2209
1865
|
borderRadius: 12
|
|
2210
1866
|
})]
|
|
2211
1867
|
}), /*#__PURE__*/_jsxs(View, {
|
|
2212
|
-
style:
|
|
1868
|
+
style: fileManagementStyles.controlsBar,
|
|
2213
1869
|
children: [/*#__PURE__*/_jsx(SkeletonBox, {
|
|
2214
1870
|
width: 100,
|
|
2215
1871
|
height: 36,
|
|
@@ -2220,10 +1876,8 @@ const FileManagementScreen = ({
|
|
|
2220
1876
|
borderRadius: 22
|
|
2221
1877
|
})]
|
|
2222
1878
|
}), /*#__PURE__*/_jsx(View, {
|
|
2223
|
-
style: [
|
|
2224
|
-
backgroundColor: themeStyles.
|
|
2225
|
-
borderColor: themeStyles.borderColor,
|
|
2226
|
-
borderWidth: StyleSheet.hairlineWidth
|
|
1879
|
+
style: [fileManagementStyles.searchContainer, {
|
|
1880
|
+
backgroundColor: themeStyles.colors.card
|
|
2227
1881
|
}],
|
|
2228
1882
|
children: /*#__PURE__*/_jsx(SkeletonBox, {
|
|
2229
1883
|
width: "100%",
|
|
@@ -2231,13 +1885,11 @@ const FileManagementScreen = ({
|
|
|
2231
1885
|
borderRadius: 12
|
|
2232
1886
|
})
|
|
2233
1887
|
}), /*#__PURE__*/_jsx(View, {
|
|
2234
|
-
style: [
|
|
2235
|
-
backgroundColor: themeStyles.
|
|
2236
|
-
borderColor: themeStyles.borderColor,
|
|
2237
|
-
borderWidth: StyleSheet.hairlineWidth
|
|
1888
|
+
style: [fileManagementStyles.statsContainer, {
|
|
1889
|
+
backgroundColor: themeStyles.colors.card
|
|
2238
1890
|
}],
|
|
2239
1891
|
children: [1, 2, 3].map(i => /*#__PURE__*/_jsxs(View, {
|
|
2240
|
-
style:
|
|
1892
|
+
style: fileManagementStyles.statItem,
|
|
2241
1893
|
children: [/*#__PURE__*/_jsx(SkeletonBox, {
|
|
2242
1894
|
width: 50,
|
|
2243
1895
|
height: 20,
|
|
@@ -2252,15 +1904,14 @@ const FileManagementScreen = ({
|
|
|
2252
1904
|
})]
|
|
2253
1905
|
}, i))
|
|
2254
1906
|
}), /*#__PURE__*/_jsx(ScrollView, {
|
|
2255
|
-
style:
|
|
2256
|
-
contentContainerStyle:
|
|
1907
|
+
style: fileManagementStyles.scrollView,
|
|
1908
|
+
contentContainerStyle: fileManagementStyles.scrollContainer,
|
|
2257
1909
|
showsVerticalScrollIndicator: false,
|
|
2258
1910
|
children: /*#__PURE__*/_jsx(View, {
|
|
2259
1911
|
style: {
|
|
2260
|
-
backgroundColor: themeStyles.
|
|
2261
|
-
borderRadius:
|
|
1912
|
+
backgroundColor: themeStyles.colors.card,
|
|
1913
|
+
borderRadius: 18,
|
|
2262
1914
|
overflow: 'hidden',
|
|
2263
|
-
marginHorizontal: 16,
|
|
2264
1915
|
marginTop: 8
|
|
2265
1916
|
},
|
|
2266
1917
|
children: [1, 2, 3, 4, 5, 6, 7, 8].map(i => /*#__PURE__*/_jsx(SkeletonFileItem, {
|
|
@@ -2277,12 +1928,54 @@ const FileManagementScreen = ({
|
|
|
2277
1928
|
// If a file is opened, show the file viewer
|
|
2278
1929
|
if (!selectMode && openedFile) {
|
|
2279
1930
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
2280
|
-
children: [
|
|
1931
|
+
children: [/*#__PURE__*/_jsx(FileViewer, {
|
|
1932
|
+
file: openedFile,
|
|
1933
|
+
fileContent: fileContent,
|
|
1934
|
+
loadingFileContent: loadingFileContent,
|
|
1935
|
+
showFileDetailsInViewer: showFileDetailsInViewer,
|
|
1936
|
+
onToggleDetails: () => setShowFileDetailsInViewer(!showFileDetailsInViewer),
|
|
1937
|
+
onClose: handleCloseFile,
|
|
1938
|
+
onDownload: handleFileDownload,
|
|
1939
|
+
onDelete: handleFileDelete,
|
|
1940
|
+
themeStyles: themeStyles,
|
|
1941
|
+
isOwner: user?.id === targetUserId
|
|
1942
|
+
}), /*#__PURE__*/_jsx(FileDetailsModal, {
|
|
1943
|
+
visible: showFileDetails,
|
|
1944
|
+
file: selectedFile,
|
|
1945
|
+
onClose: () => setShowFileDetails(false),
|
|
1946
|
+
onDownload: handleFileDownload,
|
|
1947
|
+
onDelete: handleFileDelete,
|
|
1948
|
+
themeStyles: themeStyles,
|
|
1949
|
+
isOwner: user?.id === targetUserId
|
|
1950
|
+
})]
|
|
1951
|
+
});
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
// If upload preview is showing, render it inline instead of the file list
|
|
1955
|
+
if (showUploadPreview) {
|
|
1956
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
1957
|
+
style: fileManagementStyles.container,
|
|
1958
|
+
children: [/*#__PURE__*/_jsx(Header, {
|
|
1959
|
+
title: "Review Files",
|
|
1960
|
+
subtitle: `${pendingFiles.length} file${pendingFiles.length !== 1 ? 's' : ''} ready to upload`,
|
|
1961
|
+
onBack: handleCancelUpload,
|
|
1962
|
+
showBackButton: true,
|
|
1963
|
+
variant: "minimal",
|
|
1964
|
+
elevation: "none",
|
|
1965
|
+
titleAlignment: "left"
|
|
1966
|
+
}), /*#__PURE__*/_jsx(UploadPreview, {
|
|
1967
|
+
visible: true,
|
|
1968
|
+
pendingFiles: pendingFiles,
|
|
1969
|
+
onConfirm: handleConfirmUpload,
|
|
1970
|
+
onCancel: handleCancelUpload,
|
|
1971
|
+
onRemoveFile: removePendingFile,
|
|
1972
|
+
themeStyles: themeStyles,
|
|
1973
|
+
inline: true
|
|
1974
|
+
})]
|
|
2281
1975
|
});
|
|
2282
1976
|
}
|
|
2283
1977
|
return /*#__PURE__*/_jsxs(View, {
|
|
2284
|
-
|
|
2285
|
-
style: [styles.container, isDragging && Platform.OS === 'web' && styles.dragOverlay],
|
|
1978
|
+
style: fileManagementStyles.container,
|
|
2286
1979
|
children: [/*#__PURE__*/_jsx(Header, {
|
|
2287
1980
|
title: selectMode ? multiSelect ? `${selectedIds.size}${maxSelection ? '/' + maxSelection : ''} Selected` : 'Select a File' : viewMode === 'photos' ? 'Photos' : 'File Management',
|
|
2288
1981
|
subtitle: selectMode ? multiSelect ? `${filteredFiles.length} available` : 'Tap to select' : `${filteredFiles.length} ${filteredFiles.length === 1 ? 'item' : 'items'}`,
|
|
@@ -2327,79 +2020,60 @@ const FileManagementScreen = ({
|
|
|
2327
2020
|
icon: 'eye'
|
|
2328
2021
|
}] : undefined,
|
|
2329
2022
|
onBack: onClose || goBack,
|
|
2330
|
-
theme: theme,
|
|
2331
2023
|
showBackButton: true,
|
|
2332
2024
|
variant: "minimal",
|
|
2333
2025
|
elevation: "none",
|
|
2334
2026
|
titleAlignment: "left"
|
|
2335
2027
|
}), /*#__PURE__*/_jsxs(View, {
|
|
2336
|
-
style:
|
|
2028
|
+
style: fileManagementStyles.controlsBar,
|
|
2337
2029
|
children: [/*#__PURE__*/_jsx(ScrollView, {
|
|
2338
2030
|
horizontal: true,
|
|
2339
2031
|
showsHorizontalScrollIndicator: false,
|
|
2340
|
-
style:
|
|
2032
|
+
style: fileManagementStyles.viewModeScroll,
|
|
2341
2033
|
children: /*#__PURE__*/_jsxs(View, {
|
|
2342
|
-
style: [
|
|
2343
|
-
backgroundColor: themeStyles.
|
|
2344
|
-
borderWidth: 1,
|
|
2345
|
-
borderColor: themeStyles.isDarkTheme ? '#2A2A2A' : '#E8E9EA'
|
|
2034
|
+
style: [fileManagementStyles.viewModeToggle, {
|
|
2035
|
+
backgroundColor: themeStyles.colors.card
|
|
2346
2036
|
}],
|
|
2347
|
-
children: [/*#__PURE__*/_jsx(
|
|
2348
|
-
|
|
2349
|
-
backgroundColor: themeStyles.primaryColor
|
|
2350
|
-
}],
|
|
2037
|
+
children: [/*#__PURE__*/_jsx(AnimatedButton, {
|
|
2038
|
+
isSelected: viewMode === 'all',
|
|
2351
2039
|
onPress: () => setViewMode('all'),
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
style: [styles.viewModeButton, viewMode === 'photos' && {
|
|
2359
|
-
backgroundColor: themeStyles.primaryColor
|
|
2360
|
-
}],
|
|
2040
|
+
icon: viewMode === 'all' ? 'folder' : 'folder-outline',
|
|
2041
|
+
primaryColor: themeStyles.primaryColor,
|
|
2042
|
+
textColor: themeStyles.textColor,
|
|
2043
|
+
style: fileManagementStyles.viewModeButton
|
|
2044
|
+
}), /*#__PURE__*/_jsx(AnimatedButton, {
|
|
2045
|
+
isSelected: viewMode === 'photos',
|
|
2361
2046
|
onPress: () => setViewMode('photos'),
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
style: [styles.viewModeButton, viewMode === 'videos' && {
|
|
2369
|
-
backgroundColor: themeStyles.primaryColor
|
|
2370
|
-
}],
|
|
2047
|
+
icon: viewMode === 'photos' ? 'image-multiple' : 'image-multiple-outline',
|
|
2048
|
+
primaryColor: themeStyles.primaryColor,
|
|
2049
|
+
textColor: themeStyles.textColor,
|
|
2050
|
+
style: fileManagementStyles.viewModeButton
|
|
2051
|
+
}), /*#__PURE__*/_jsx(AnimatedButton, {
|
|
2052
|
+
isSelected: viewMode === 'videos',
|
|
2371
2053
|
onPress: () => setViewMode('videos'),
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
style: [styles.viewModeButton, viewMode === 'documents' && {
|
|
2379
|
-
backgroundColor: themeStyles.primaryColor
|
|
2380
|
-
}],
|
|
2054
|
+
icon: viewMode === 'videos' ? 'video' : 'video-outline',
|
|
2055
|
+
primaryColor: themeStyles.primaryColor,
|
|
2056
|
+
textColor: themeStyles.textColor,
|
|
2057
|
+
style: fileManagementStyles.viewModeButton
|
|
2058
|
+
}), /*#__PURE__*/_jsx(AnimatedButton, {
|
|
2059
|
+
isSelected: viewMode === 'documents',
|
|
2381
2060
|
onPress: () => setViewMode('documents'),
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
style: [styles.viewModeButton, viewMode === 'audio' && {
|
|
2389
|
-
backgroundColor: themeStyles.primaryColor
|
|
2390
|
-
}],
|
|
2061
|
+
icon: viewMode === 'documents' ? 'file-document' : 'file-document-outline',
|
|
2062
|
+
primaryColor: themeStyles.primaryColor,
|
|
2063
|
+
textColor: themeStyles.textColor,
|
|
2064
|
+
style: fileManagementStyles.viewModeButton
|
|
2065
|
+
}), /*#__PURE__*/_jsx(AnimatedButton, {
|
|
2066
|
+
isSelected: viewMode === 'audio',
|
|
2391
2067
|
onPress: () => setViewMode('audio'),
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
})
|
|
2068
|
+
icon: viewMode === 'audio' ? 'music-note' : 'music-note-outline',
|
|
2069
|
+
primaryColor: themeStyles.primaryColor,
|
|
2070
|
+
textColor: themeStyles.textColor,
|
|
2071
|
+
style: fileManagementStyles.viewModeButton
|
|
2397
2072
|
})]
|
|
2398
2073
|
})
|
|
2399
2074
|
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
2400
|
-
style: [
|
|
2401
|
-
backgroundColor: themeStyles.
|
|
2402
|
-
borderColor: themeStyles.isDarkTheme ? '#2A2A2A' : '#E8E9EA'
|
|
2075
|
+
style: [fileManagementStyles.sortButton, {
|
|
2076
|
+
backgroundColor: themeStyles.colors.card
|
|
2403
2077
|
}],
|
|
2404
2078
|
onPress: () => {
|
|
2405
2079
|
// Cycle through sort options: date -> size -> name -> type -> date
|
|
@@ -2412,33 +2086,33 @@ const FileManagementScreen = ({
|
|
|
2412
2086
|
setSortOrder(prev => prev === 'asc' ? 'desc' : 'asc');
|
|
2413
2087
|
}
|
|
2414
2088
|
},
|
|
2415
|
-
children: [/*#__PURE__*/_jsx(
|
|
2416
|
-
name:
|
|
2417
|
-
size: 18,
|
|
2418
|
-
color: themeStyles.textColor
|
|
2419
|
-
}), /*#__PURE__*/_jsx(Ionicons, {
|
|
2420
|
-
name: sortBy === 'date' ? 'calendar' : sortBy === 'size' ? 'resize' : sortBy === 'name' ? 'text' : 'document',
|
|
2089
|
+
children: [/*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
2090
|
+
name: sortBy === 'date' ? 'calendar' : sortBy === 'size' ? 'sort-numeric-variant' : sortBy === 'name' ? 'sort-alphabetical-variant' : 'file-document-outline',
|
|
2421
2091
|
size: 16,
|
|
2422
|
-
color: themeStyles.textColor
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2092
|
+
color: themeStyles.textColor
|
|
2093
|
+
}), /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
2094
|
+
name: sortOrder === 'asc' ? 'arrow-up' : 'arrow-down',
|
|
2095
|
+
size: 14,
|
|
2096
|
+
color: themeStyles.colors.secondaryText
|
|
2426
2097
|
})]
|
|
2427
2098
|
}), user?.id === targetUserId && (!selectMode || selectMode && allowUploadInSelectMode) && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
2428
|
-
style: [
|
|
2099
|
+
style: [fileManagementStyles.uploadButton, {
|
|
2429
2100
|
backgroundColor: themeStyles.primaryColor
|
|
2430
2101
|
}],
|
|
2431
2102
|
onPress: handleFileUpload,
|
|
2432
|
-
disabled: uploading,
|
|
2103
|
+
disabled: uploading || isPickingDocument,
|
|
2433
2104
|
children: uploading ? /*#__PURE__*/_jsxs(View, {
|
|
2434
|
-
style:
|
|
2105
|
+
style: fileManagementStyles.uploadProgress,
|
|
2435
2106
|
children: [/*#__PURE__*/_jsx(ActivityIndicator, {
|
|
2436
2107
|
size: "small",
|
|
2437
2108
|
color: "#FFFFFF"
|
|
2438
2109
|
}), uploadProgress && /*#__PURE__*/_jsxs(Text, {
|
|
2439
|
-
style:
|
|
2110
|
+
style: fileManagementStyles.uploadProgressText,
|
|
2440
2111
|
children: [uploadProgress.current, "/", uploadProgress.total]
|
|
2441
2112
|
})]
|
|
2113
|
+
}) : isPickingDocument ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
2114
|
+
size: "small",
|
|
2115
|
+
color: "#FFFFFF"
|
|
2442
2116
|
}) : /*#__PURE__*/_jsx(Ionicons, {
|
|
2443
2117
|
name: "add",
|
|
2444
2118
|
size: 22,
|
|
@@ -2446,80 +2120,78 @@ const FileManagementScreen = ({
|
|
|
2446
2120
|
})
|
|
2447
2121
|
})]
|
|
2448
2122
|
}), files.length > 0 && (viewMode === 'all' || files.some(f => f.contentType.startsWith('image/'))) && /*#__PURE__*/_jsxs(View, {
|
|
2449
|
-
style: [
|
|
2450
|
-
backgroundColor: themeStyles.
|
|
2451
|
-
borderColor: themeStyles.isDarkTheme ? '#3A3A3A' : '#E8E9EA'
|
|
2123
|
+
style: [fileManagementStyles.searchContainer, {
|
|
2124
|
+
backgroundColor: themeStyles.colors.card
|
|
2452
2125
|
}],
|
|
2453
2126
|
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
2454
2127
|
name: "search",
|
|
2455
2128
|
size: 22,
|
|
2456
|
-
color: themeStyles.
|
|
2129
|
+
color: themeStyles.colors.icon
|
|
2457
2130
|
}), /*#__PURE__*/_jsx(TextInput, {
|
|
2458
|
-
style: [
|
|
2131
|
+
style: [fileManagementStyles.searchInput, {
|
|
2459
2132
|
color: themeStyles.textColor
|
|
2460
2133
|
}],
|
|
2461
2134
|
placeholder: viewMode === 'photos' ? 'Search photos...' : 'Search files...',
|
|
2462
|
-
placeholderTextColor: themeStyles.
|
|
2135
|
+
placeholderTextColor: themeStyles.colors.secondaryText,
|
|
2463
2136
|
value: searchQuery,
|
|
2464
2137
|
onChangeText: setSearchQuery
|
|
2465
2138
|
}), searchQuery.length > 0 && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
2466
2139
|
onPress: () => setSearchQuery(''),
|
|
2467
|
-
style:
|
|
2140
|
+
style: fileManagementStyles.searchClearButton,
|
|
2468
2141
|
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
2469
2142
|
name: "close-circle",
|
|
2470
2143
|
size: 22,
|
|
2471
|
-
color: themeStyles.
|
|
2144
|
+
color: themeStyles.colors.icon
|
|
2472
2145
|
})
|
|
2473
2146
|
})]
|
|
2474
2147
|
}), files.length > 0 && /*#__PURE__*/_jsxs(View, {
|
|
2475
|
-
style: [
|
|
2476
|
-
backgroundColor: themeStyles.
|
|
2477
|
-
borderColor: themeStyles.isDarkTheme ? '#3A3A3A' : '#E8E9EA'
|
|
2148
|
+
style: [fileManagementStyles.statsContainer, {
|
|
2149
|
+
backgroundColor: themeStyles.colors.card
|
|
2478
2150
|
}],
|
|
2479
2151
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
2480
|
-
style:
|
|
2152
|
+
style: fileManagementStyles.statItem,
|
|
2481
2153
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
2482
|
-
style: [
|
|
2154
|
+
style: [fileManagementStyles.statValue, {
|
|
2483
2155
|
color: themeStyles.textColor
|
|
2484
2156
|
}],
|
|
2485
2157
|
children: filteredFiles.length
|
|
2486
2158
|
}), /*#__PURE__*/_jsx(Text, {
|
|
2487
|
-
style: [
|
|
2488
|
-
color: themeStyles.
|
|
2159
|
+
style: [fileManagementStyles.statLabel, {
|
|
2160
|
+
color: themeStyles.colors.secondaryText
|
|
2489
2161
|
}],
|
|
2490
2162
|
children: searchQuery.length > 0 ? 'Found' : filteredFiles.length === 1 ? viewMode === 'photos' ? 'Photo' : 'File' : viewMode === 'photos' ? 'Photos' : 'Files'
|
|
2491
2163
|
})]
|
|
2492
2164
|
}), /*#__PURE__*/_jsxs(View, {
|
|
2493
|
-
style:
|
|
2165
|
+
style: fileManagementStyles.statItem,
|
|
2494
2166
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
2495
|
-
style: [
|
|
2167
|
+
style: [fileManagementStyles.statValue, {
|
|
2496
2168
|
color: themeStyles.textColor
|
|
2497
2169
|
}],
|
|
2498
2170
|
children: formatFileSize(filteredFiles.reduce((total, file) => total + file.length, 0))
|
|
2499
2171
|
}), /*#__PURE__*/_jsx(Text, {
|
|
2500
|
-
style: [
|
|
2501
|
-
color: themeStyles.
|
|
2172
|
+
style: [fileManagementStyles.statLabel, {
|
|
2173
|
+
color: themeStyles.colors.secondaryText
|
|
2502
2174
|
}],
|
|
2503
2175
|
children: searchQuery.length > 0 ? 'Size' : 'Total Size'
|
|
2504
2176
|
})]
|
|
2505
2177
|
}), searchQuery.length > 0 && /*#__PURE__*/_jsxs(View, {
|
|
2506
|
-
style:
|
|
2178
|
+
style: fileManagementStyles.statItem,
|
|
2507
2179
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
2508
|
-
style: [
|
|
2180
|
+
style: [fileManagementStyles.statValue, {
|
|
2509
2181
|
color: themeStyles.textColor
|
|
2510
2182
|
}],
|
|
2511
2183
|
children: files.length
|
|
2512
2184
|
}), /*#__PURE__*/_jsx(Text, {
|
|
2513
|
-
style: [
|
|
2514
|
-
color: themeStyles.
|
|
2185
|
+
style: [fileManagementStyles.statLabel, {
|
|
2186
|
+
color: themeStyles.colors.secondaryText
|
|
2515
2187
|
}],
|
|
2516
2188
|
children: "Total"
|
|
2517
2189
|
})]
|
|
2518
2190
|
})]
|
|
2519
2191
|
}), viewMode === 'photos' ? renderPhotoGrid() : /*#__PURE__*/_jsx(ScrollView, {
|
|
2520
2192
|
ref: scrollViewRef,
|
|
2521
|
-
style:
|
|
2522
|
-
contentContainerStyle:
|
|
2193
|
+
style: fileManagementStyles.scrollView,
|
|
2194
|
+
contentContainerStyle: fileManagementStyles.scrollContainer,
|
|
2523
2195
|
refreshControl: /*#__PURE__*/_jsx(RefreshControl, {
|
|
2524
2196
|
refreshing: refreshing,
|
|
2525
2197
|
onRefresh: () => loadFiles('refresh'),
|
|
@@ -2540,23 +2212,23 @@ const FileManagementScreen = ({
|
|
|
2540
2212
|
},
|
|
2541
2213
|
scrollEventThrottle: 250,
|
|
2542
2214
|
children: filteredFiles.length === 0 && searchQuery.length > 0 ? /*#__PURE__*/_jsxs(View, {
|
|
2543
|
-
style:
|
|
2215
|
+
style: fileManagementStyles.emptyState,
|
|
2544
2216
|
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
2545
2217
|
name: "search",
|
|
2546
2218
|
size: 64,
|
|
2547
2219
|
color: themeStyles.isDarkTheme ? '#666666' : '#CCCCCC'
|
|
2548
2220
|
}), /*#__PURE__*/_jsx(Text, {
|
|
2549
|
-
style: [
|
|
2221
|
+
style: [fileManagementStyles.emptyStateTitle, {
|
|
2550
2222
|
color: themeStyles.textColor
|
|
2551
2223
|
}],
|
|
2552
2224
|
children: "No Results Found"
|
|
2553
2225
|
}), /*#__PURE__*/_jsxs(Text, {
|
|
2554
|
-
style: [
|
|
2226
|
+
style: [fileManagementStyles.emptyStateDescription, {
|
|
2555
2227
|
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
2556
2228
|
}],
|
|
2557
2229
|
children: ["No files match your search for \"", searchQuery, "\""]
|
|
2558
2230
|
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
2559
|
-
style: [
|
|
2231
|
+
style: [fileManagementStyles.emptyStateButton, {
|
|
2560
2232
|
backgroundColor: themeStyles.primaryColor
|
|
2561
2233
|
}],
|
|
2562
2234
|
onPress: () => setSearchQuery(''),
|
|
@@ -2565,33 +2237,40 @@ const FileManagementScreen = ({
|
|
|
2565
2237
|
size: 20,
|
|
2566
2238
|
color: "#FFFFFF"
|
|
2567
2239
|
}), /*#__PURE__*/_jsx(Text, {
|
|
2568
|
-
style:
|
|
2240
|
+
style: fileManagementStyles.emptyStateButtonText,
|
|
2569
2241
|
children: "Clear Search"
|
|
2570
2242
|
})]
|
|
2571
2243
|
})]
|
|
2572
2244
|
}) : filteredFiles.length === 0 ? renderEmptyState() : /*#__PURE__*/_jsxs(_Fragment, {
|
|
2573
2245
|
children: [/*#__PURE__*/_jsx(GroupedSection, {
|
|
2574
|
-
items: groupedFileItems
|
|
2575
|
-
theme: theme
|
|
2246
|
+
items: groupedFileItems
|
|
2576
2247
|
}), paging.loadingMore && /*#__PURE__*/_jsxs(View, {
|
|
2577
|
-
style:
|
|
2248
|
+
style: fileManagementStyles.loadingMoreBar,
|
|
2578
2249
|
children: [/*#__PURE__*/_jsx(ActivityIndicator, {
|
|
2579
2250
|
size: "small",
|
|
2580
2251
|
color: themeStyles.primaryColor
|
|
2581
2252
|
}), /*#__PURE__*/_jsx(Text, {
|
|
2582
|
-
style: [
|
|
2253
|
+
style: [fileManagementStyles.loadingMoreText, {
|
|
2583
2254
|
color: themeStyles.textColor
|
|
2584
2255
|
}],
|
|
2585
2256
|
children: "Loading more..."
|
|
2586
2257
|
})]
|
|
2587
2258
|
})]
|
|
2588
2259
|
})
|
|
2589
|
-
}), !selectMode &&
|
|
2590
|
-
|
|
2260
|
+
}), !selectMode && /*#__PURE__*/_jsx(FileDetailsModal, {
|
|
2261
|
+
visible: showFileDetails,
|
|
2262
|
+
file: selectedFile,
|
|
2263
|
+
onClose: () => setShowFileDetails(false),
|
|
2264
|
+
onDownload: handleFileDownload,
|
|
2265
|
+
onDelete: handleFileDelete,
|
|
2266
|
+
themeStyles: themeStyles,
|
|
2267
|
+
isOwner: user?.id === targetUserId
|
|
2268
|
+
}), !selectMode && uploading && /*#__PURE__*/_jsx(View, {
|
|
2269
|
+
style: [fileManagementStyles.uploadBannerContainer, {
|
|
2591
2270
|
pointerEvents: 'none'
|
|
2592
2271
|
}],
|
|
2593
2272
|
children: /*#__PURE__*/_jsxs(View, {
|
|
2594
|
-
style: [
|
|
2273
|
+
style: [fileManagementStyles.uploadBanner, {
|
|
2595
2274
|
backgroundColor: themeStyles.isDarkTheme ? '#222831EE' : '#FFFFFFEE',
|
|
2596
2275
|
borderColor: themeStyles.borderColor
|
|
2597
2276
|
}],
|
|
@@ -2599,1008 +2278,34 @@ const FileManagementScreen = ({
|
|
|
2599
2278
|
name: "cloud-upload",
|
|
2600
2279
|
size: 18,
|
|
2601
2280
|
color: themeStyles.primaryColor
|
|
2602
|
-
}), /*#__PURE__*/_jsxs(
|
|
2603
|
-
style:
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
style: [
|
|
2611
|
-
|
|
2612
|
-
}]
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
2624
|
-
style: [styles.dragDropIconContainer, {
|
|
2625
|
-
backgroundColor: `${themeStyles.primaryColor}15`
|
|
2626
|
-
}],
|
|
2627
|
-
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
2628
|
-
name: "cloud-upload",
|
|
2629
|
-
size: 64,
|
|
2630
|
-
color: themeStyles.primaryColor
|
|
2631
|
-
})
|
|
2632
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
2633
|
-
style: [styles.dragDropTitle, {
|
|
2634
|
-
color: themeStyles.primaryColor
|
|
2635
|
-
}],
|
|
2636
|
-
children: "Drop files to upload"
|
|
2637
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
2638
|
-
style: [styles.dragDropSubtitle, {
|
|
2639
|
-
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
2640
|
-
}],
|
|
2641
|
-
children: "Release to upload multiple files"
|
|
2281
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
2282
|
+
style: fileManagementStyles.uploadBannerContent,
|
|
2283
|
+
children: [/*#__PURE__*/_jsxs(Text, {
|
|
2284
|
+
style: [fileManagementStyles.uploadBannerText, {
|
|
2285
|
+
color: themeStyles.textColor
|
|
2286
|
+
}],
|
|
2287
|
+
children: ["Uploading", uploadProgress ? ` ${uploadProgress.current}/${uploadProgress.total}` : '...']
|
|
2288
|
+
}), uploadProgress && uploadProgress.total > 0 && /*#__PURE__*/_jsx(View, {
|
|
2289
|
+
style: [fileManagementStyles.uploadProgressBarContainer, {
|
|
2290
|
+
backgroundColor: themeStyles.isDarkTheme ? 'rgba(255,255,255,0.1)' : 'rgba(0,0,0,0.1)'
|
|
2291
|
+
}],
|
|
2292
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
2293
|
+
style: [fileManagementStyles.uploadProgressBar, {
|
|
2294
|
+
width: `${uploadProgress.current / uploadProgress.total * 100}%`,
|
|
2295
|
+
backgroundColor: themeStyles.primaryColor
|
|
2296
|
+
}]
|
|
2297
|
+
})
|
|
2298
|
+
})]
|
|
2299
|
+
}), /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
2300
|
+
size: "small",
|
|
2301
|
+
color: themeStyles.primaryColor
|
|
2642
2302
|
})]
|
|
2643
2303
|
})
|
|
2644
2304
|
})]
|
|
2645
2305
|
});
|
|
2646
2306
|
};
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
},
|
|
2651
|
-
selectionBadge: {
|
|
2652
|
-
position: 'absolute',
|
|
2653
|
-
top: 4,
|
|
2654
|
-
right: 4,
|
|
2655
|
-
backgroundColor: 'rgba(0,0,0,0.4)',
|
|
2656
|
-
borderRadius: 12,
|
|
2657
|
-
padding: 2
|
|
2658
|
-
},
|
|
2659
|
-
selectionBar: {
|
|
2660
|
-
position: 'absolute',
|
|
2661
|
-
left: 0,
|
|
2662
|
-
right: 0,
|
|
2663
|
-
bottom: 0,
|
|
2664
|
-
flexDirection: 'row',
|
|
2665
|
-
justifyContent: 'space-between',
|
|
2666
|
-
padding: 12,
|
|
2667
|
-
backgroundColor: 'rgba(0,0,0,0.55)',
|
|
2668
|
-
gap: 12
|
|
2669
|
-
},
|
|
2670
|
-
selectionBarButton: {
|
|
2671
|
-
flex: 1,
|
|
2672
|
-
paddingVertical: 14,
|
|
2673
|
-
borderRadius: 10,
|
|
2674
|
-
alignItems: 'center',
|
|
2675
|
-
justifyContent: 'center'
|
|
2676
|
-
},
|
|
2677
|
-
selectionBarButtonText: {
|
|
2678
|
-
color: '#FFFFFF',
|
|
2679
|
-
fontSize: 15,
|
|
2680
|
-
fontWeight: '600'
|
|
2681
|
-
},
|
|
2682
|
-
loadingMoreBar: {
|
|
2683
|
-
flexDirection: 'row',
|
|
2684
|
-
alignItems: 'center',
|
|
2685
|
-
justifyContent: 'center',
|
|
2686
|
-
paddingVertical: 12,
|
|
2687
|
-
gap: 8
|
|
2688
|
-
},
|
|
2689
|
-
loadingMoreText: {
|
|
2690
|
-
fontSize: 13,
|
|
2691
|
-
fontWeight: '500'
|
|
2692
|
-
},
|
|
2693
|
-
dragOverlay: {
|
|
2694
|
-
backgroundColor: 'rgba(0, 122, 255, 0.06)',
|
|
2695
|
-
borderWidth: 1,
|
|
2696
|
-
borderColor: '#66AFFF',
|
|
2697
|
-
borderStyle: 'dashed'
|
|
2698
|
-
},
|
|
2699
|
-
centerContent: {
|
|
2700
|
-
justifyContent: 'center',
|
|
2701
|
-
alignItems: 'center'
|
|
2702
|
-
},
|
|
2703
|
-
header: {
|
|
2704
|
-
flexDirection: 'row',
|
|
2705
|
-
alignItems: 'center',
|
|
2706
|
-
justifyContent: 'space-between',
|
|
2707
|
-
paddingHorizontal: 16,
|
|
2708
|
-
paddingVertical: 12,
|
|
2709
|
-
borderBottomWidth: 1,
|
|
2710
|
-
position: 'relative'
|
|
2711
|
-
},
|
|
2712
|
-
backButton: {
|
|
2713
|
-
padding: 12,
|
|
2714
|
-
borderRadius: 12,
|
|
2715
|
-
alignItems: 'center',
|
|
2716
|
-
justifyContent: 'center',
|
|
2717
|
-
minWidth: 44,
|
|
2718
|
-
minHeight: 44
|
|
2719
|
-
},
|
|
2720
|
-
headerTitleContainer: {
|
|
2721
|
-
flex: 1,
|
|
2722
|
-
alignItems: 'center',
|
|
2723
|
-
justifyContent: 'center',
|
|
2724
|
-
marginHorizontal: 16
|
|
2725
|
-
},
|
|
2726
|
-
headerTitle: {
|
|
2727
|
-
fontSize: 22,
|
|
2728
|
-
fontWeight: '700',
|
|
2729
|
-
fontFamily: fontFamilies.phuduBold,
|
|
2730
|
-
letterSpacing: -0.5,
|
|
2731
|
-
lineHeight: 28
|
|
2732
|
-
},
|
|
2733
|
-
headerSubtitle: {
|
|
2734
|
-
fontSize: 13,
|
|
2735
|
-
fontWeight: '500',
|
|
2736
|
-
fontFamily: fontFamilies.phuduMedium,
|
|
2737
|
-
marginTop: 2,
|
|
2738
|
-
letterSpacing: 0.2
|
|
2739
|
-
},
|
|
2740
|
-
uploadButton: {
|
|
2741
|
-
width: 44,
|
|
2742
|
-
height: 44,
|
|
2743
|
-
borderRadius: 22,
|
|
2744
|
-
alignItems: 'center',
|
|
2745
|
-
justifyContent: 'center'
|
|
2746
|
-
},
|
|
2747
|
-
uploadProgress: {
|
|
2748
|
-
alignItems: 'center',
|
|
2749
|
-
justifyContent: 'center'
|
|
2750
|
-
},
|
|
2751
|
-
uploadProgressText: {
|
|
2752
|
-
color: '#FFFFFF',
|
|
2753
|
-
fontSize: 10,
|
|
2754
|
-
fontWeight: '600',
|
|
2755
|
-
marginTop: 2
|
|
2756
|
-
},
|
|
2757
|
-
uploadBannerContainer: {
|
|
2758
|
-
position: 'absolute',
|
|
2759
|
-
top: 72,
|
|
2760
|
-
// below header
|
|
2761
|
-
left: 0,
|
|
2762
|
-
right: 0,
|
|
2763
|
-
alignItems: 'center',
|
|
2764
|
-
zIndex: 50
|
|
2765
|
-
},
|
|
2766
|
-
uploadBanner: {
|
|
2767
|
-
flexDirection: 'row',
|
|
2768
|
-
alignItems: 'center',
|
|
2769
|
-
paddingHorizontal: 14,
|
|
2770
|
-
paddingVertical: 8,
|
|
2771
|
-
borderRadius: 24,
|
|
2772
|
-
gap: 8,
|
|
2773
|
-
borderWidth: 1,
|
|
2774
|
-
shadowColor: '#000',
|
|
2775
|
-
shadowOpacity: 0.1,
|
|
2776
|
-
shadowRadius: 6,
|
|
2777
|
-
shadowOffset: {
|
|
2778
|
-
width: 0,
|
|
2779
|
-
height: 2
|
|
2780
|
-
},
|
|
2781
|
-
elevation: 2
|
|
2782
|
-
},
|
|
2783
|
-
uploadBannerText: {
|
|
2784
|
-
fontSize: 13,
|
|
2785
|
-
fontWeight: '500'
|
|
2786
|
-
},
|
|
2787
|
-
uploadBannerDots: {
|
|
2788
|
-
flexDirection: 'row',
|
|
2789
|
-
gap: 4,
|
|
2790
|
-
marginLeft: 2
|
|
2791
|
-
},
|
|
2792
|
-
dot: {
|
|
2793
|
-
width: 6,
|
|
2794
|
-
height: 6,
|
|
2795
|
-
borderRadius: 3,
|
|
2796
|
-
backgroundColor: '#007AFF'
|
|
2797
|
-
},
|
|
2798
|
-
searchContainer: {
|
|
2799
|
-
flexDirection: 'row',
|
|
2800
|
-
alignItems: 'center',
|
|
2801
|
-
paddingHorizontal: 14,
|
|
2802
|
-
paddingVertical: 10,
|
|
2803
|
-
marginHorizontal: 16,
|
|
2804
|
-
marginTop: 12,
|
|
2805
|
-
borderRadius: 10,
|
|
2806
|
-
borderWidth: 1,
|
|
2807
|
-
gap: 10
|
|
2808
|
-
},
|
|
2809
|
-
searchInput: {
|
|
2810
|
-
flex: 1,
|
|
2811
|
-
fontSize: 16,
|
|
2812
|
-
fontFamily: fontFamilies.phudu,
|
|
2813
|
-
lineHeight: 20
|
|
2814
|
-
},
|
|
2815
|
-
searchClearButton: {
|
|
2816
|
-
padding: 4,
|
|
2817
|
-
borderRadius: 12,
|
|
2818
|
-
alignItems: 'center',
|
|
2819
|
-
justifyContent: 'center'
|
|
2820
|
-
},
|
|
2821
|
-
searchIcon: {
|
|
2822
|
-
marginRight: 8
|
|
2823
|
-
},
|
|
2824
|
-
statsContainer: {
|
|
2825
|
-
flexDirection: 'row',
|
|
2826
|
-
paddingHorizontal: 14,
|
|
2827
|
-
paddingVertical: 10,
|
|
2828
|
-
marginHorizontal: 16,
|
|
2829
|
-
marginTop: 12,
|
|
2830
|
-
borderRadius: 10,
|
|
2831
|
-
borderWidth: 1
|
|
2832
|
-
},
|
|
2833
|
-
statItem: {
|
|
2834
|
-
flex: 1,
|
|
2835
|
-
alignItems: 'center',
|
|
2836
|
-
paddingVertical: 4
|
|
2837
|
-
},
|
|
2838
|
-
statValue: {
|
|
2839
|
-
fontSize: 20,
|
|
2840
|
-
fontWeight: '800',
|
|
2841
|
-
fontFamily: fontFamilies.phuduBold,
|
|
2842
|
-
letterSpacing: -0.5,
|
|
2843
|
-
lineHeight: 24
|
|
2844
|
-
},
|
|
2845
|
-
statLabel: {
|
|
2846
|
-
fontSize: 12,
|
|
2847
|
-
fontWeight: '500',
|
|
2848
|
-
fontFamily: fontFamilies.phuduMedium,
|
|
2849
|
-
marginTop: 2,
|
|
2850
|
-
letterSpacing: 0.2
|
|
2851
|
-
},
|
|
2852
|
-
scrollView: {
|
|
2853
|
-
flex: 1,
|
|
2854
|
-
backgroundColor: '#e5f1ff'
|
|
2855
|
-
},
|
|
2856
|
-
scrollContainer: {
|
|
2857
|
-
padding: 12
|
|
2858
|
-
},
|
|
2859
|
-
fileItem: {
|
|
2860
|
-
flexDirection: 'row',
|
|
2861
|
-
alignItems: 'center',
|
|
2862
|
-
padding: 10,
|
|
2863
|
-
marginBottom: 8,
|
|
2864
|
-
borderRadius: 10,
|
|
2865
|
-
borderWidth: 1
|
|
2866
|
-
},
|
|
2867
|
-
fileContent: {
|
|
2868
|
-
flexDirection: 'row',
|
|
2869
|
-
alignItems: 'center',
|
|
2870
|
-
flex: 1
|
|
2871
|
-
},
|
|
2872
|
-
fileIconContainer: {
|
|
2873
|
-
width: 50,
|
|
2874
|
-
height: 50,
|
|
2875
|
-
alignItems: 'center',
|
|
2876
|
-
justifyContent: 'center',
|
|
2877
|
-
marginRight: 12
|
|
2878
|
-
},
|
|
2879
|
-
filePreviewContainer: {
|
|
2880
|
-
width: 52,
|
|
2881
|
-
height: 52,
|
|
2882
|
-
marginRight: 10
|
|
2883
|
-
},
|
|
2884
|
-
filePreview: {
|
|
2885
|
-
width: '100%',
|
|
2886
|
-
height: '100%',
|
|
2887
|
-
borderRadius: 8,
|
|
2888
|
-
backgroundColor: 'transparent',
|
|
2889
|
-
alignItems: 'center',
|
|
2890
|
-
justifyContent: 'center',
|
|
2891
|
-
overflow: 'hidden',
|
|
2892
|
-
position: 'relative'
|
|
2893
|
-
},
|
|
2894
|
-
previewImage: {
|
|
2895
|
-
width: '100%',
|
|
2896
|
-
height: '100%',
|
|
2897
|
-
borderRadius: 8
|
|
2898
|
-
},
|
|
2899
|
-
pdfPreview: {
|
|
2900
|
-
alignItems: 'center',
|
|
2901
|
-
justifyContent: 'center',
|
|
2902
|
-
width: '100%',
|
|
2903
|
-
height: '100%',
|
|
2904
|
-
backgroundColor: '#FF6B6B20'
|
|
2905
|
-
},
|
|
2906
|
-
pdfLabel: {
|
|
2907
|
-
fontSize: 8,
|
|
2908
|
-
fontWeight: 'bold',
|
|
2909
|
-
marginTop: 2
|
|
2910
|
-
},
|
|
2911
|
-
videoPreview: {
|
|
2912
|
-
alignItems: 'center',
|
|
2913
|
-
justifyContent: 'center',
|
|
2914
|
-
width: '100%',
|
|
2915
|
-
height: '100%',
|
|
2916
|
-
backgroundColor: '#4ECDC420'
|
|
2917
|
-
},
|
|
2918
|
-
videoLabel: {
|
|
2919
|
-
fontSize: 8,
|
|
2920
|
-
fontWeight: 'bold',
|
|
2921
|
-
marginTop: 2
|
|
2922
|
-
},
|
|
2923
|
-
fallbackIcon: {
|
|
2924
|
-
position: 'absolute',
|
|
2925
|
-
top: 0,
|
|
2926
|
-
left: 0,
|
|
2927
|
-
right: 0,
|
|
2928
|
-
bottom: 0,
|
|
2929
|
-
alignItems: 'center',
|
|
2930
|
-
justifyContent: 'center',
|
|
2931
|
-
backgroundColor: 'transparent',
|
|
2932
|
-
borderRadius: 8
|
|
2933
|
-
},
|
|
2934
|
-
previewOverlay: {
|
|
2935
|
-
position: 'absolute',
|
|
2936
|
-
top: 0,
|
|
2937
|
-
left: 0,
|
|
2938
|
-
right: 0,
|
|
2939
|
-
bottom: 0,
|
|
2940
|
-
backgroundColor: 'rgba(0, 0, 0, 0.25)',
|
|
2941
|
-
alignItems: 'center',
|
|
2942
|
-
justifyContent: 'center',
|
|
2943
|
-
borderRadius: 8
|
|
2944
|
-
},
|
|
2945
|
-
groupedActions: {
|
|
2946
|
-
flexDirection: 'row',
|
|
2947
|
-
alignItems: 'center',
|
|
2948
|
-
gap: 6,
|
|
2949
|
-
marginLeft: 12
|
|
2950
|
-
},
|
|
2951
|
-
groupedActionBtn: {
|
|
2952
|
-
width: 34,
|
|
2953
|
-
height: 34,
|
|
2954
|
-
borderRadius: 8,
|
|
2955
|
-
alignItems: 'center',
|
|
2956
|
-
justifyContent: 'center'
|
|
2957
|
-
},
|
|
2958
|
-
groupedDescription: {
|
|
2959
|
-
fontSize: 12,
|
|
2960
|
-
lineHeight: 16,
|
|
2961
|
-
marginTop: 6
|
|
2962
|
-
},
|
|
2963
|
-
videoPreviewWrapper: {
|
|
2964
|
-
width: '100%',
|
|
2965
|
-
height: '100%',
|
|
2966
|
-
borderRadius: 8,
|
|
2967
|
-
overflow: 'hidden',
|
|
2968
|
-
backgroundColor: '#000000',
|
|
2969
|
-
alignItems: 'center',
|
|
2970
|
-
justifyContent: 'center'
|
|
2971
|
-
},
|
|
2972
|
-
videoPosterImage: {
|
|
2973
|
-
position: 'absolute',
|
|
2974
|
-
top: 0,
|
|
2975
|
-
left: 0,
|
|
2976
|
-
right: 0,
|
|
2977
|
-
bottom: 0,
|
|
2978
|
-
width: '100%',
|
|
2979
|
-
height: '100%'
|
|
2980
|
-
},
|
|
2981
|
-
videoOverlay: {
|
|
2982
|
-
position: 'absolute',
|
|
2983
|
-
top: 0,
|
|
2984
|
-
left: 0,
|
|
2985
|
-
right: 0,
|
|
2986
|
-
bottom: 0,
|
|
2987
|
-
alignItems: 'center',
|
|
2988
|
-
justifyContent: 'center',
|
|
2989
|
-
backgroundColor: 'rgba(0,0,0,0.25)'
|
|
2990
|
-
},
|
|
2991
|
-
fileInfo: {
|
|
2992
|
-
flex: 1
|
|
2993
|
-
},
|
|
2994
|
-
fileName: {
|
|
2995
|
-
fontSize: 16,
|
|
2996
|
-
fontWeight: '600',
|
|
2997
|
-
marginBottom: 4
|
|
2998
|
-
},
|
|
2999
|
-
fileDetails: {
|
|
3000
|
-
fontSize: 14,
|
|
3001
|
-
marginBottom: 2
|
|
3002
|
-
},
|
|
3003
|
-
fileDescription: {
|
|
3004
|
-
fontSize: 12,
|
|
3005
|
-
fontStyle: 'italic'
|
|
3006
|
-
},
|
|
3007
|
-
fileActions: {
|
|
3008
|
-
flexDirection: 'row',
|
|
3009
|
-
gap: 8
|
|
3010
|
-
},
|
|
3011
|
-
actionButton: {
|
|
3012
|
-
width: 36,
|
|
3013
|
-
height: 36,
|
|
3014
|
-
borderRadius: 18,
|
|
3015
|
-
alignItems: 'center',
|
|
3016
|
-
justifyContent: 'center',
|
|
3017
|
-
borderWidth: 1,
|
|
3018
|
-
borderColor: '#E0E0E0',
|
|
3019
|
-
backgroundColor: 'transparent'
|
|
3020
|
-
},
|
|
3021
|
-
emptyState: {
|
|
3022
|
-
alignItems: 'center',
|
|
3023
|
-
paddingVertical: 40,
|
|
3024
|
-
paddingHorizontal: 24
|
|
3025
|
-
},
|
|
3026
|
-
emptyStateTitle: {
|
|
3027
|
-
fontSize: 24,
|
|
3028
|
-
fontWeight: 'bold',
|
|
3029
|
-
fontFamily: fontFamilies.phuduBold,
|
|
3030
|
-
marginTop: 16,
|
|
3031
|
-
marginBottom: 8
|
|
3032
|
-
},
|
|
3033
|
-
emptyStateDescription: {
|
|
3034
|
-
fontSize: 16,
|
|
3035
|
-
textAlign: 'center',
|
|
3036
|
-
lineHeight: 24,
|
|
3037
|
-
marginBottom: 32
|
|
3038
|
-
},
|
|
3039
|
-
emptyStateButton: {
|
|
3040
|
-
flexDirection: 'row',
|
|
3041
|
-
alignItems: 'center',
|
|
3042
|
-
paddingHorizontal: 24,
|
|
3043
|
-
paddingVertical: 12,
|
|
3044
|
-
borderRadius: 24,
|
|
3045
|
-
gap: 8
|
|
3046
|
-
},
|
|
3047
|
-
emptyStateButtonText: {
|
|
3048
|
-
color: '#FFFFFF',
|
|
3049
|
-
fontSize: 16,
|
|
3050
|
-
fontWeight: '600'
|
|
3051
|
-
},
|
|
3052
|
-
loadingText: {
|
|
3053
|
-
fontSize: 16,
|
|
3054
|
-
marginTop: 16
|
|
3055
|
-
},
|
|
3056
|
-
// Modal styles
|
|
3057
|
-
modalContainer: {
|
|
3058
|
-
flex: 1
|
|
3059
|
-
},
|
|
3060
|
-
modalHeader: {
|
|
3061
|
-
flexDirection: 'row',
|
|
3062
|
-
alignItems: 'center',
|
|
3063
|
-
justifyContent: 'space-between',
|
|
3064
|
-
paddingHorizontal: 16,
|
|
3065
|
-
paddingVertical: 12,
|
|
3066
|
-
borderBottomWidth: 1
|
|
3067
|
-
},
|
|
3068
|
-
modalCloseButton: {
|
|
3069
|
-
padding: 8
|
|
3070
|
-
},
|
|
3071
|
-
modalTitle: {
|
|
3072
|
-
fontSize: 18,
|
|
3073
|
-
fontWeight: '600',
|
|
3074
|
-
fontFamily: fontFamilies.phuduSemiBold
|
|
3075
|
-
},
|
|
3076
|
-
modalPlaceholder: {
|
|
3077
|
-
width: 40
|
|
3078
|
-
},
|
|
3079
|
-
modalContent: {
|
|
3080
|
-
flex: 1,
|
|
3081
|
-
padding: 16
|
|
3082
|
-
},
|
|
3083
|
-
fileDetailCard: {
|
|
3084
|
-
padding: 18,
|
|
3085
|
-
borderRadius: 14,
|
|
3086
|
-
borderWidth: 1,
|
|
3087
|
-
alignItems: 'center'
|
|
3088
|
-
},
|
|
3089
|
-
fileDetailIcon: {
|
|
3090
|
-
marginBottom: 16
|
|
3091
|
-
},
|
|
3092
|
-
fileDetailName: {
|
|
3093
|
-
fontSize: 20,
|
|
3094
|
-
fontWeight: 'bold',
|
|
3095
|
-
fontFamily: fontFamilies.phuduBold,
|
|
3096
|
-
textAlign: 'center',
|
|
3097
|
-
marginBottom: 24
|
|
3098
|
-
},
|
|
3099
|
-
fileDetailInfo: {
|
|
3100
|
-
width: '100%',
|
|
3101
|
-
marginBottom: 32
|
|
3102
|
-
},
|
|
3103
|
-
detailRow: {
|
|
3104
|
-
flexDirection: 'row',
|
|
3105
|
-
justifyContent: 'space-between',
|
|
3106
|
-
alignItems: 'flex-start',
|
|
3107
|
-
marginBottom: 12,
|
|
3108
|
-
flexWrap: 'wrap'
|
|
3109
|
-
},
|
|
3110
|
-
detailLabel: {
|
|
3111
|
-
fontSize: 16,
|
|
3112
|
-
fontWeight: '500',
|
|
3113
|
-
flex: 1,
|
|
3114
|
-
minWidth: 100
|
|
3115
|
-
},
|
|
3116
|
-
detailValue: {
|
|
3117
|
-
fontSize: 16,
|
|
3118
|
-
flex: 2,
|
|
3119
|
-
textAlign: 'right'
|
|
3120
|
-
},
|
|
3121
|
-
modalActions: {
|
|
3122
|
-
flexDirection: 'row',
|
|
3123
|
-
gap: 12,
|
|
3124
|
-
width: '100%'
|
|
3125
|
-
},
|
|
3126
|
-
modalActionButton: {
|
|
3127
|
-
flex: 1,
|
|
3128
|
-
flexDirection: 'row',
|
|
3129
|
-
alignItems: 'center',
|
|
3130
|
-
justifyContent: 'center',
|
|
3131
|
-
paddingVertical: 16,
|
|
3132
|
-
borderRadius: 12,
|
|
3133
|
-
gap: 8
|
|
3134
|
-
},
|
|
3135
|
-
modalActionText: {
|
|
3136
|
-
color: '#FFFFFF',
|
|
3137
|
-
fontSize: 16,
|
|
3138
|
-
fontWeight: '600'
|
|
3139
|
-
},
|
|
3140
|
-
// Drag and Drop styles - Enhanced
|
|
3141
|
-
dragDropOverlay: {
|
|
3142
|
-
position: 'absolute',
|
|
3143
|
-
top: 0,
|
|
3144
|
-
left: 0,
|
|
3145
|
-
right: 0,
|
|
3146
|
-
bottom: 0,
|
|
3147
|
-
backgroundColor: 'rgba(0, 0, 0, 0.6)',
|
|
3148
|
-
justifyContent: 'center',
|
|
3149
|
-
alignItems: 'center',
|
|
3150
|
-
zIndex: 1000
|
|
3151
|
-
},
|
|
3152
|
-
dragDropContent: {
|
|
3153
|
-
alignItems: 'center',
|
|
3154
|
-
padding: 32,
|
|
3155
|
-
borderRadius: 20,
|
|
3156
|
-
borderWidth: 3,
|
|
3157
|
-
borderStyle: 'dashed',
|
|
3158
|
-
minWidth: 280,
|
|
3159
|
-
shadowColor: '#000',
|
|
3160
|
-
shadowOpacity: 0.3,
|
|
3161
|
-
shadowRadius: 20,
|
|
3162
|
-
shadowOffset: {
|
|
3163
|
-
width: 0,
|
|
3164
|
-
height: 10
|
|
3165
|
-
},
|
|
3166
|
-
elevation: 10
|
|
3167
|
-
},
|
|
3168
|
-
dragDropIconContainer: {
|
|
3169
|
-
padding: 24,
|
|
3170
|
-
borderRadius: 50,
|
|
3171
|
-
marginBottom: 16
|
|
3172
|
-
},
|
|
3173
|
-
dragDropTitle: {
|
|
3174
|
-
fontSize: 24,
|
|
3175
|
-
fontWeight: '700',
|
|
3176
|
-
fontFamily: fontFamilies.phuduBold,
|
|
3177
|
-
marginBottom: 8
|
|
3178
|
-
},
|
|
3179
|
-
dragDropSubtitle: {
|
|
3180
|
-
fontSize: 16,
|
|
3181
|
-
fontWeight: '500',
|
|
3182
|
-
fontFamily: fontFamilies.phuduMedium
|
|
3183
|
-
},
|
|
3184
|
-
// Upload Preview Modal styles
|
|
3185
|
-
uploadPreviewContainer: {
|
|
3186
|
-
flex: 1
|
|
3187
|
-
},
|
|
3188
|
-
uploadPreviewHeader: {
|
|
3189
|
-
flexDirection: 'row',
|
|
3190
|
-
alignItems: 'center',
|
|
3191
|
-
justifyContent: 'space-between',
|
|
3192
|
-
paddingHorizontal: 16,
|
|
3193
|
-
paddingVertical: 16,
|
|
3194
|
-
borderBottomWidth: 1
|
|
3195
|
-
},
|
|
3196
|
-
uploadPreviewTitle: {
|
|
3197
|
-
fontSize: 20,
|
|
3198
|
-
fontWeight: '700',
|
|
3199
|
-
fontFamily: fontFamilies.phuduBold
|
|
3200
|
-
},
|
|
3201
|
-
uploadPreviewList: {
|
|
3202
|
-
flex: 1,
|
|
3203
|
-
padding: 16
|
|
3204
|
-
},
|
|
3205
|
-
uploadPreviewItem: {
|
|
3206
|
-
flexDirection: 'row',
|
|
3207
|
-
alignItems: 'center',
|
|
3208
|
-
padding: 12,
|
|
3209
|
-
borderRadius: 12,
|
|
3210
|
-
borderWidth: 1,
|
|
3211
|
-
marginBottom: 12,
|
|
3212
|
-
gap: 12
|
|
3213
|
-
},
|
|
3214
|
-
uploadPreviewThumbnail: {
|
|
3215
|
-
width: 60,
|
|
3216
|
-
height: 60,
|
|
3217
|
-
borderRadius: 8
|
|
3218
|
-
},
|
|
3219
|
-
uploadPreviewIconContainer: {
|
|
3220
|
-
width: 60,
|
|
3221
|
-
height: 60,
|
|
3222
|
-
borderRadius: 8,
|
|
3223
|
-
alignItems: 'center',
|
|
3224
|
-
justifyContent: 'center'
|
|
3225
|
-
},
|
|
3226
|
-
uploadPreviewInfo: {
|
|
3227
|
-
flex: 1,
|
|
3228
|
-
minWidth: 0
|
|
3229
|
-
},
|
|
3230
|
-
uploadPreviewName: {
|
|
3231
|
-
fontSize: 16,
|
|
3232
|
-
fontWeight: '600',
|
|
3233
|
-
fontFamily: fontFamilies.phuduSemiBold,
|
|
3234
|
-
marginBottom: 4
|
|
3235
|
-
},
|
|
3236
|
-
uploadPreviewMeta: {
|
|
3237
|
-
fontSize: 13,
|
|
3238
|
-
fontFamily: fontFamilies.phudu
|
|
3239
|
-
},
|
|
3240
|
-
uploadPreviewRemove: {
|
|
3241
|
-
padding: 4
|
|
3242
|
-
},
|
|
3243
|
-
uploadPreviewFooter: {
|
|
3244
|
-
padding: 16,
|
|
3245
|
-
borderTopWidth: 1
|
|
3246
|
-
},
|
|
3247
|
-
uploadPreviewStats: {
|
|
3248
|
-
flexDirection: 'row',
|
|
3249
|
-
justifyContent: 'space-between',
|
|
3250
|
-
marginBottom: 16
|
|
3251
|
-
},
|
|
3252
|
-
uploadPreviewStatsText: {
|
|
3253
|
-
fontSize: 15,
|
|
3254
|
-
fontWeight: '600',
|
|
3255
|
-
fontFamily: fontFamilies.phuduSemiBold
|
|
3256
|
-
},
|
|
3257
|
-
uploadPreviewActions: {
|
|
3258
|
-
flexDirection: 'row',
|
|
3259
|
-
gap: 12
|
|
3260
|
-
},
|
|
3261
|
-
uploadPreviewCancelButton: {
|
|
3262
|
-
flex: 1,
|
|
3263
|
-
paddingVertical: 14,
|
|
3264
|
-
borderRadius: 12,
|
|
3265
|
-
borderWidth: 1,
|
|
3266
|
-
alignItems: 'center',
|
|
3267
|
-
justifyContent: 'center'
|
|
3268
|
-
},
|
|
3269
|
-
uploadPreviewCancelText: {
|
|
3270
|
-
fontSize: 16,
|
|
3271
|
-
fontWeight: '600',
|
|
3272
|
-
fontFamily: fontFamilies.phuduSemiBold
|
|
3273
|
-
},
|
|
3274
|
-
uploadPreviewConfirmButton: {
|
|
3275
|
-
flex: 2,
|
|
3276
|
-
flexDirection: 'row',
|
|
3277
|
-
alignItems: 'center',
|
|
3278
|
-
justifyContent: 'center',
|
|
3279
|
-
paddingVertical: 14,
|
|
3280
|
-
borderRadius: 12,
|
|
3281
|
-
gap: 8
|
|
3282
|
-
},
|
|
3283
|
-
uploadPreviewConfirmText: {
|
|
3284
|
-
color: '#FFFFFF',
|
|
3285
|
-
fontSize: 16,
|
|
3286
|
-
fontWeight: '600',
|
|
3287
|
-
fontFamily: fontFamilies.phuduSemiBold
|
|
3288
|
-
},
|
|
3289
|
-
// File Viewer styles
|
|
3290
|
-
fileViewerContainer: {
|
|
3291
|
-
flex: 1
|
|
3292
|
-
},
|
|
3293
|
-
fileViewerHeader: {
|
|
3294
|
-
flexDirection: 'row',
|
|
3295
|
-
alignItems: 'center',
|
|
3296
|
-
paddingHorizontal: 16,
|
|
3297
|
-
paddingVertical: 12,
|
|
3298
|
-
borderBottomWidth: 1
|
|
3299
|
-
},
|
|
3300
|
-
fileViewerTitleContainer: {
|
|
3301
|
-
flex: 1,
|
|
3302
|
-
marginHorizontal: 16
|
|
3303
|
-
},
|
|
3304
|
-
fileViewerTitle: {
|
|
3305
|
-
fontSize: 18,
|
|
3306
|
-
fontWeight: '600',
|
|
3307
|
-
fontFamily: fontFamilies.phuduSemiBold,
|
|
3308
|
-
marginBottom: 2
|
|
3309
|
-
},
|
|
3310
|
-
fileViewerSubtitle: {
|
|
3311
|
-
fontSize: 14
|
|
3312
|
-
},
|
|
3313
|
-
fileViewerActions: {
|
|
3314
|
-
flexDirection: 'row',
|
|
3315
|
-
gap: 8
|
|
3316
|
-
},
|
|
3317
|
-
fileViewerContent: {
|
|
3318
|
-
flex: 1
|
|
3319
|
-
},
|
|
3320
|
-
fileViewerContentWithDetails: {
|
|
3321
|
-
paddingBottom: 20
|
|
3322
|
-
},
|
|
3323
|
-
fileViewerContentContainer: {
|
|
3324
|
-
flexGrow: 1,
|
|
3325
|
-
padding: 14
|
|
3326
|
-
},
|
|
3327
|
-
fileViewerLoading: {
|
|
3328
|
-
flex: 1,
|
|
3329
|
-
justifyContent: 'center',
|
|
3330
|
-
alignItems: 'center'
|
|
3331
|
-
},
|
|
3332
|
-
fileViewerLoadingText: {
|
|
3333
|
-
fontSize: 16,
|
|
3334
|
-
marginTop: 16
|
|
3335
|
-
},
|
|
3336
|
-
imageContainer: {
|
|
3337
|
-
alignItems: 'center',
|
|
3338
|
-
justifyContent: 'center',
|
|
3339
|
-
flex: 1
|
|
3340
|
-
},
|
|
3341
|
-
textContainer: {
|
|
3342
|
-
flex: 1,
|
|
3343
|
-
borderRadius: 10,
|
|
3344
|
-
borderWidth: 1,
|
|
3345
|
-
padding: 12,
|
|
3346
|
-
minHeight: 180,
|
|
3347
|
-
maxHeight: '80%'
|
|
3348
|
-
},
|
|
3349
|
-
textContent: {
|
|
3350
|
-
fontSize: 14,
|
|
3351
|
-
fontFamily: Platform.OS === 'web' ? 'monospace' : 'Courier',
|
|
3352
|
-
lineHeight: 20
|
|
3353
|
-
},
|
|
3354
|
-
unsupportedFileContainer: {
|
|
3355
|
-
flex: 1,
|
|
3356
|
-
justifyContent: 'center',
|
|
3357
|
-
alignItems: 'center',
|
|
3358
|
-
paddingVertical: 40,
|
|
3359
|
-
paddingHorizontal: 24
|
|
3360
|
-
},
|
|
3361
|
-
unsupportedFileTitle: {
|
|
3362
|
-
fontSize: 24,
|
|
3363
|
-
fontWeight: 'bold',
|
|
3364
|
-
fontFamily: fontFamilies.phuduBold,
|
|
3365
|
-
marginTop: 16,
|
|
3366
|
-
marginBottom: 8,
|
|
3367
|
-
textAlign: 'center'
|
|
3368
|
-
},
|
|
3369
|
-
unsupportedFileDescription: {
|
|
3370
|
-
fontSize: 16,
|
|
3371
|
-
textAlign: 'center',
|
|
3372
|
-
lineHeight: 24,
|
|
3373
|
-
marginBottom: 32
|
|
3374
|
-
},
|
|
3375
|
-
downloadButtonLarge: {
|
|
3376
|
-
flexDirection: 'row',
|
|
3377
|
-
alignItems: 'center',
|
|
3378
|
-
paddingHorizontal: 18,
|
|
3379
|
-
paddingVertical: 12,
|
|
3380
|
-
borderRadius: 20,
|
|
3381
|
-
gap: 8
|
|
3382
|
-
},
|
|
3383
|
-
downloadButtonText: {
|
|
3384
|
-
color: '#FFFFFF',
|
|
3385
|
-
fontSize: 16,
|
|
3386
|
-
fontWeight: '600'
|
|
3387
|
-
},
|
|
3388
|
-
pdfContainer: {
|
|
3389
|
-
flex: 1,
|
|
3390
|
-
alignItems: 'center',
|
|
3391
|
-
justifyContent: 'center'
|
|
3392
|
-
},
|
|
3393
|
-
mediaContainer: {
|
|
3394
|
-
flex: 1,
|
|
3395
|
-
alignItems: 'center',
|
|
3396
|
-
justifyContent: 'center',
|
|
3397
|
-
padding: 20
|
|
3398
|
-
},
|
|
3399
|
-
unsupportedText: {
|
|
3400
|
-
fontSize: 16,
|
|
3401
|
-
textAlign: 'center',
|
|
3402
|
-
fontStyle: 'italic'
|
|
3403
|
-
},
|
|
3404
|
-
// File Details in Viewer styles
|
|
3405
|
-
fileDetailsSection: {
|
|
3406
|
-
margin: 12,
|
|
3407
|
-
marginTop: 0,
|
|
3408
|
-
padding: 14,
|
|
3409
|
-
borderRadius: 10,
|
|
3410
|
-
borderWidth: 1
|
|
3411
|
-
},
|
|
3412
|
-
fileDetailsSectionTitle: {
|
|
3413
|
-
fontSize: 18,
|
|
3414
|
-
fontWeight: '600',
|
|
3415
|
-
fontFamily: fontFamilies.phuduSemiBold,
|
|
3416
|
-
flex: 1
|
|
3417
|
-
},
|
|
3418
|
-
fileDetailsSectionHeader: {
|
|
3419
|
-
flexDirection: 'row',
|
|
3420
|
-
alignItems: 'center',
|
|
3421
|
-
justifyContent: 'space-between',
|
|
3422
|
-
marginBottom: 16
|
|
3423
|
-
},
|
|
3424
|
-
fileDetailsSectionToggle: {
|
|
3425
|
-
padding: 4
|
|
3426
|
-
},
|
|
3427
|
-
fileDetailsActions: {
|
|
3428
|
-
flexDirection: 'row',
|
|
3429
|
-
gap: 12,
|
|
3430
|
-
marginTop: 16
|
|
3431
|
-
},
|
|
3432
|
-
fileDetailsActionButton: {
|
|
3433
|
-
flex: 1,
|
|
3434
|
-
flexDirection: 'row',
|
|
3435
|
-
alignItems: 'center',
|
|
3436
|
-
justifyContent: 'center',
|
|
3437
|
-
paddingVertical: 12,
|
|
3438
|
-
borderRadius: 8,
|
|
3439
|
-
gap: 6
|
|
3440
|
-
},
|
|
3441
|
-
fileDetailsActionText: {
|
|
3442
|
-
color: '#FFFFFF',
|
|
3443
|
-
fontSize: 14,
|
|
3444
|
-
fontWeight: '600'
|
|
3445
|
-
},
|
|
3446
|
-
// Header styles
|
|
3447
|
-
headerActions: {
|
|
3448
|
-
flexDirection: 'row',
|
|
3449
|
-
alignItems: 'center',
|
|
3450
|
-
gap: 16
|
|
3451
|
-
},
|
|
3452
|
-
controlsBar: {
|
|
3453
|
-
flexDirection: 'row',
|
|
3454
|
-
alignItems: 'center',
|
|
3455
|
-
justifyContent: 'space-between',
|
|
3456
|
-
paddingHorizontal: 16,
|
|
3457
|
-
paddingTop: 8,
|
|
3458
|
-
paddingBottom: 4,
|
|
3459
|
-
gap: 12
|
|
3460
|
-
},
|
|
3461
|
-
viewModeScroll: {
|
|
3462
|
-
flex: 1,
|
|
3463
|
-
maxWidth: '80%'
|
|
3464
|
-
},
|
|
3465
|
-
viewModeToggle: {
|
|
3466
|
-
flexDirection: 'row',
|
|
3467
|
-
borderRadius: 24,
|
|
3468
|
-
padding: 3,
|
|
3469
|
-
overflow: 'hidden'
|
|
3470
|
-
},
|
|
3471
|
-
viewModeButton: {
|
|
3472
|
-
paddingHorizontal: 14,
|
|
3473
|
-
paddingVertical: 10,
|
|
3474
|
-
borderRadius: 20,
|
|
3475
|
-
minWidth: 44,
|
|
3476
|
-
alignItems: 'center',
|
|
3477
|
-
justifyContent: 'center',
|
|
3478
|
-
marginHorizontal: 1
|
|
3479
|
-
},
|
|
3480
|
-
sortButton: {
|
|
3481
|
-
flexDirection: 'row',
|
|
3482
|
-
alignItems: 'center',
|
|
3483
|
-
justifyContent: 'center',
|
|
3484
|
-
paddingHorizontal: 12,
|
|
3485
|
-
paddingVertical: 10,
|
|
3486
|
-
borderRadius: 20,
|
|
3487
|
-
borderWidth: 1,
|
|
3488
|
-
minWidth: 44
|
|
3489
|
-
},
|
|
3490
|
-
// Photo Grid styles
|
|
3491
|
-
photoScrollContainer: {
|
|
3492
|
-
padding: 10
|
|
3493
|
-
},
|
|
3494
|
-
photoDateSection: {
|
|
3495
|
-
marginBottom: 16
|
|
3496
|
-
},
|
|
3497
|
-
photoDateHeader: {
|
|
3498
|
-
fontSize: 16,
|
|
3499
|
-
fontWeight: '600',
|
|
3500
|
-
fontFamily: fontFamilies.phuduSemiBold,
|
|
3501
|
-
marginBottom: 8,
|
|
3502
|
-
paddingHorizontal: 2
|
|
3503
|
-
},
|
|
3504
|
-
photoGrid: {
|
|
3505
|
-
flexDirection: 'row',
|
|
3506
|
-
flexWrap: 'wrap',
|
|
3507
|
-
gap: 4,
|
|
3508
|
-
justifyContent: 'flex-start'
|
|
3509
|
-
},
|
|
3510
|
-
photoItem: {
|
|
3511
|
-
borderRadius: 8,
|
|
3512
|
-
overflow: 'hidden'
|
|
3513
|
-
},
|
|
3514
|
-
photoContainer: {
|
|
3515
|
-
width: '100%',
|
|
3516
|
-
height: '100%',
|
|
3517
|
-
position: 'relative',
|
|
3518
|
-
borderRadius: 8,
|
|
3519
|
-
overflow: 'hidden'
|
|
3520
|
-
},
|
|
3521
|
-
photoImage: {
|
|
3522
|
-
width: '100%',
|
|
3523
|
-
height: '100%'
|
|
3524
|
-
},
|
|
3525
|
-
// Justified Grid styles
|
|
3526
|
-
dimensionsLoadingIndicator: {
|
|
3527
|
-
flexDirection: 'row',
|
|
3528
|
-
alignItems: 'center',
|
|
3529
|
-
justifyContent: 'center',
|
|
3530
|
-
paddingVertical: 16,
|
|
3531
|
-
gap: 8
|
|
3532
|
-
},
|
|
3533
|
-
dimensionsLoadingText: {
|
|
3534
|
-
fontSize: 14,
|
|
3535
|
-
fontStyle: 'italic'
|
|
3536
|
-
},
|
|
3537
|
-
justifiedPhotoGrid: {
|
|
3538
|
-
gap: 4
|
|
3539
|
-
},
|
|
3540
|
-
justifiedPhotoRow: {
|
|
3541
|
-
flexDirection: 'row'
|
|
3542
|
-
},
|
|
3543
|
-
justifiedPhotoItem: {
|
|
3544
|
-
borderRadius: 6,
|
|
3545
|
-
overflow: 'hidden',
|
|
3546
|
-
position: 'relative'
|
|
3547
|
-
},
|
|
3548
|
-
justifiedPhotoContainer: {
|
|
3549
|
-
width: '100%',
|
|
3550
|
-
height: '100%',
|
|
3551
|
-
position: 'relative',
|
|
3552
|
-
borderRadius: 6,
|
|
3553
|
-
overflow: 'hidden',
|
|
3554
|
-
backgroundColor: 'transparent'
|
|
3555
|
-
},
|
|
3556
|
-
justifiedPhotoImage: {
|
|
3557
|
-
width: '100%',
|
|
3558
|
-
height: '100%',
|
|
3559
|
-
borderRadius: 6
|
|
3560
|
-
},
|
|
3561
|
-
// Simple Photo Grid styles
|
|
3562
|
-
simplePhotoItem: {
|
|
3563
|
-
borderRadius: 8,
|
|
3564
|
-
overflow: 'hidden',
|
|
3565
|
-
backgroundColor: 'transparent'
|
|
3566
|
-
},
|
|
3567
|
-
simplePhotoContainer: {
|
|
3568
|
-
width: '100%',
|
|
3569
|
-
height: '100%',
|
|
3570
|
-
position: 'relative',
|
|
3571
|
-
borderRadius: 8,
|
|
3572
|
-
overflow: 'hidden'
|
|
3573
|
-
},
|
|
3574
|
-
simplePhotoImage: {
|
|
3575
|
-
width: '100%',
|
|
3576
|
-
height: '100%',
|
|
3577
|
-
borderRadius: 8
|
|
3578
|
-
},
|
|
3579
|
-
// Loading skeleton styles
|
|
3580
|
-
photoSkeletonGrid: {
|
|
3581
|
-
flexDirection: 'row',
|
|
3582
|
-
flexWrap: 'wrap',
|
|
3583
|
-
gap: 4,
|
|
3584
|
-
marginTop: 20
|
|
3585
|
-
},
|
|
3586
|
-
photoSkeletonItem: {
|
|
3587
|
-
width: '32%',
|
|
3588
|
-
aspectRatio: 1,
|
|
3589
|
-
borderRadius: 8,
|
|
3590
|
-
marginBottom: 4
|
|
3591
|
-
},
|
|
3592
|
-
skeletonFileItem: {
|
|
3593
|
-
flexDirection: 'row',
|
|
3594
|
-
alignItems: 'center',
|
|
3595
|
-
paddingHorizontal: 16,
|
|
3596
|
-
paddingVertical: 12,
|
|
3597
|
-
borderBottomWidth: 1,
|
|
3598
|
-
gap: 12
|
|
3599
|
-
},
|
|
3600
|
-
skeletonFileInfo: {
|
|
3601
|
-
flex: 1,
|
|
3602
|
-
justifyContent: 'center'
|
|
3603
|
-
}
|
|
3604
|
-
});
|
|
2307
|
+
|
|
2308
|
+
// Styles have been moved to components/fileManagement/styles.ts
|
|
2309
|
+
|
|
3605
2310
|
export default FileManagementScreen;
|
|
3606
2311
|
//# sourceMappingURL=FileManagementScreen.js.map
|