@oxyhq/services 5.14.0 → 5.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +230 -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 +227 -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 +80 -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 +28 -0
- package/lib/typescript/types/color.d.ts +18 -0
- package/lib/typescript/types/elliptic.d.ts +60 -0
- package/lib/typescript/types/expo-crypto.d.ts +28 -0
- package/lib/typescript/types/expo-random.d.ts +8 -0
- package/lib/typescript/types/expo-secure-store.d.ts +20 -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 +20 -0
- package/src/crypto/keyManager.ts +213 -0
- package/src/crypto/recoveryPhrase.ts +146 -0
- package/src/crypto/signatureService.ts +258 -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 +28 -0
- package/src/types/color.d.ts +18 -0
- package/src/types/elliptic.d.ts +60 -0
- package/src/types/expo-crypto.d.ts +28 -0
- package/src/types/expo-random.d.ts +8 -0
- package/src/types/expo-secure-store.d.ts +20 -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 +402 -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
|
@@ -2,17 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useState, useEffect, useRef, useMemo, useCallback } from 'react';
|
|
4
4
|
import { View, Text, TouchableOpacity, StyleSheet, ActivityIndicator, ScrollView, TextInput, Animated, Platform, Image } from 'react-native';
|
|
5
|
-
import { useOxy } from '../context/OxyContext';
|
|
6
5
|
import OxyIcon from '../components/icon/OxyIcon';
|
|
7
6
|
import { Ionicons } from '@expo/vector-icons';
|
|
7
|
+
// @ts-ignore - MaterialCommunityIcons is available at runtime
|
|
8
|
+
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
8
9
|
import { toast } from '../../lib/sonner';
|
|
9
10
|
import { fontFamilies } from '../styles/fonts';
|
|
10
11
|
import { confirmAction } from '../utils/confirmAction';
|
|
11
12
|
import { useAuthStore } from '../stores/authStore';
|
|
12
|
-
import {
|
|
13
|
+
import { GroupedSection } from '../components';
|
|
13
14
|
import { useI18n } from '../hooks/useI18n';
|
|
14
|
-
import
|
|
15
|
+
import { useThemeStyles } from '../hooks/useThemeStyles';
|
|
16
|
+
import { useColorScheme } from '../hooks/use-color-scheme';
|
|
17
|
+
import { Colors } from '../constants/theme';
|
|
18
|
+
import { normalizeColorScheme, normalizeTheme } from '../utils/themeUtils';
|
|
19
|
+
import { useHapticPress } from '../hooks/use-haptic-press';
|
|
20
|
+
import { EditDisplayNameModal } from '../components/profile/EditDisplayNameModal';
|
|
21
|
+
import { EditUsernameModal } from '../components/profile/EditUsernameModal';
|
|
22
|
+
import { EditEmailModal } from '../components/profile/EditEmailModal';
|
|
23
|
+
import { EditBioModal } from '../components/profile/EditBioModal';
|
|
24
|
+
import { EditLocationModal } from '../components/profile/EditLocationModal';
|
|
25
|
+
import { EditLinksModal } from '../components/profile/EditLinksModal';
|
|
26
|
+
import { TwoFactorSetupModal } from '../components/profile/TwoFactorSetupModal';
|
|
27
|
+
import { getDisplayName } from '../utils/user-utils';
|
|
15
28
|
import { TTLCache, registerCacheForCleanup } from '../../utils/cache';
|
|
29
|
+
import QRCode from 'react-native-qrcode-svg';
|
|
30
|
+
import { useOxy } from '../context/OxyContext';
|
|
31
|
+
import { SECTION_GAP_LARGE, COMPONENT_GAP, HEADER_PADDING_TOP_SETTINGS, createScreenContentStyle } from '../constants/spacing';
|
|
16
32
|
|
|
17
33
|
// Caches for link metadata and location searches
|
|
18
34
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -26,19 +42,21 @@ const AccountSettingsScreen = ({
|
|
|
26
42
|
goBack,
|
|
27
43
|
navigate,
|
|
28
44
|
initialField,
|
|
29
|
-
initialSection
|
|
45
|
+
initialSection,
|
|
46
|
+
scrollTo
|
|
30
47
|
}) => {
|
|
48
|
+
// Use useOxy() hook for OxyContext values
|
|
31
49
|
const {
|
|
32
50
|
user: userFromContext,
|
|
33
51
|
oxyServices,
|
|
34
52
|
isLoading: authLoading,
|
|
35
53
|
isAuthenticated,
|
|
36
|
-
showBottomSheet,
|
|
37
54
|
activeSessionId
|
|
38
55
|
} = useOxy();
|
|
39
56
|
const {
|
|
40
57
|
t
|
|
41
58
|
} = useI18n();
|
|
59
|
+
const normalizedTheme = normalizeTheme(theme);
|
|
42
60
|
const updateUser = useAuthStore(state => state.updateUser);
|
|
43
61
|
// Get user directly from store to ensure reactivity to avatar changes
|
|
44
62
|
const user = useAuthStore(state => state.user) || userFromContext;
|
|
@@ -85,7 +103,20 @@ const AccountSettingsScreen = ({
|
|
|
85
103
|
const [links, setLinks] = useState([]);
|
|
86
104
|
const [avatarFileId, setAvatarFileId] = useState('');
|
|
87
105
|
|
|
88
|
-
//
|
|
106
|
+
// Modal visibility states
|
|
107
|
+
const [showEditDisplayNameModal, setShowEditDisplayNameModal] = useState(false);
|
|
108
|
+
const [showEditUsernameModal, setShowEditUsernameModal] = useState(false);
|
|
109
|
+
const [showEditEmailModal, setShowEditEmailModal] = useState(false);
|
|
110
|
+
const [showEditBioModal, setShowEditBioModal] = useState(false);
|
|
111
|
+
const [showEditLocationModal, setShowEditLocationModal] = useState(false);
|
|
112
|
+
const [showEditLinksModal, setShowEditLinksModal] = useState(false);
|
|
113
|
+
const [showTwoFactorModal, setShowTwoFactorModal] = useState(false);
|
|
114
|
+
|
|
115
|
+
// Location and links state (for display only - modals handle editing)
|
|
116
|
+
const [locations, setLocations] = useState([]);
|
|
117
|
+
const [linksMetadata, setLinksMetadata] = useState([]);
|
|
118
|
+
|
|
119
|
+
// State for inline editing (used by old renderEditingField code)
|
|
89
120
|
const [editingField, setEditingField] = useState(null);
|
|
90
121
|
const [tempDisplayName, setTempDisplayName] = useState('');
|
|
91
122
|
const [tempLastName, setTempLastName] = useState('');
|
|
@@ -94,27 +125,29 @@ const AccountSettingsScreen = ({
|
|
|
94
125
|
const [tempBio, setTempBio] = useState('');
|
|
95
126
|
const [tempLocation, setTempLocation] = useState('');
|
|
96
127
|
const [tempLinks, setTempLinks] = useState([]);
|
|
128
|
+
const [tempLocations, setTempLocations] = useState([]);
|
|
97
129
|
const [tempLinksWithMetadata, setTempLinksWithMetadata] = useState([]);
|
|
130
|
+
const [isAddingLocation, setIsAddingLocation] = useState(false);
|
|
131
|
+
const [isSearchingLocations, setIsSearchingLocations] = useState(false);
|
|
132
|
+
const [locationSearchResults, setLocationSearchResults] = useState([]);
|
|
133
|
+
const [newLocationQuery, setNewLocationQuery] = useState('');
|
|
98
134
|
const [isAddingLink, setIsAddingLink] = useState(false);
|
|
99
|
-
const [newLinkUrl, setNewLinkUrl] = useState('');
|
|
100
135
|
const [isFetchingMetadata, setIsFetchingMetadata] = useState(false);
|
|
136
|
+
const [newLinkUrl, setNewLinkUrl] = useState('');
|
|
101
137
|
|
|
102
|
-
//
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
const
|
|
106
|
-
const [locationSearchResults, setLocationSearchResults] = useState([]);
|
|
107
|
-
const [isSearchingLocations, setIsSearchingLocations] = useState(false);
|
|
138
|
+
// Get theme colors using centralized hook
|
|
139
|
+
const colorScheme = useColorScheme();
|
|
140
|
+
const themeStyles = useThemeStyles(theme || 'light', colorScheme);
|
|
141
|
+
const handlePressIn = useHapticPress();
|
|
108
142
|
|
|
109
|
-
//
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}, [theme]);
|
|
143
|
+
// Extract colors for convenience - ensure it's always defined
|
|
144
|
+
// useThemeStyles always returns colors, but add safety check for edge cases
|
|
145
|
+
const colors = themeStyles.colors || Colors[normalizeColorScheme(colorScheme, theme || 'light')];
|
|
146
|
+
|
|
147
|
+
// Memoize onBack handler to provide stable reference for Reanimated
|
|
148
|
+
const handleBack = useMemo(() => {
|
|
149
|
+
return goBack || onClose || undefined;
|
|
150
|
+
}, [goBack, onClose]);
|
|
118
151
|
|
|
119
152
|
// Memoize animation function to prevent recreation on every render
|
|
120
153
|
const animateSaveButton = useCallback((toValue, onComplete) => {
|
|
@@ -158,7 +191,7 @@ const AccountSettingsScreen = ({
|
|
|
158
191
|
|
|
159
192
|
// Handle locations - convert single location to array format
|
|
160
193
|
if (user.locations && Array.isArray(user.locations)) {
|
|
161
|
-
|
|
194
|
+
setLocations(user.locations.map((loc, index) => ({
|
|
162
195
|
id: loc.id || `existing-${index}`,
|
|
163
196
|
name: loc.name,
|
|
164
197
|
label: loc.label,
|
|
@@ -166,13 +199,13 @@ const AccountSettingsScreen = ({
|
|
|
166
199
|
})));
|
|
167
200
|
} else if (user.location) {
|
|
168
201
|
// Convert single location string to array format
|
|
169
|
-
|
|
202
|
+
setLocations([{
|
|
170
203
|
id: 'existing-0',
|
|
171
204
|
name: user.location,
|
|
172
205
|
label: 'Location'
|
|
173
206
|
}]);
|
|
174
207
|
} else {
|
|
175
|
-
|
|
208
|
+
setLocations([]);
|
|
176
209
|
}
|
|
177
210
|
|
|
178
211
|
// Handle links - simple and direct like other fields
|
|
@@ -183,7 +216,7 @@ const AccountSettingsScreen = ({
|
|
|
183
216
|
...link,
|
|
184
217
|
id: link.id || `existing-${index}`
|
|
185
218
|
}));
|
|
186
|
-
|
|
219
|
+
setLinksMetadata(metadataWithIds);
|
|
187
220
|
} else if (Array.isArray(user.links)) {
|
|
188
221
|
const simpleLinks = user.links.map(l => typeof l === 'string' ? l : l.link).filter(Boolean);
|
|
189
222
|
setLinks(simpleLinks);
|
|
@@ -194,10 +227,10 @@ const AccountSettingsScreen = ({
|
|
|
194
227
|
image: undefined,
|
|
195
228
|
id: `existing-${index}`
|
|
196
229
|
}));
|
|
197
|
-
|
|
230
|
+
setLinksMetadata(linksWithMetadata);
|
|
198
231
|
} else if (user.website) {
|
|
199
232
|
setLinks([user.website]);
|
|
200
|
-
|
|
233
|
+
setLinksMetadata([{
|
|
201
234
|
url: user.website,
|
|
202
235
|
title: user.website.replace(/^https?:\/\//, '').replace(/\/$/, ''),
|
|
203
236
|
description: `Link to ${user.website}`,
|
|
@@ -206,7 +239,7 @@ const AccountSettingsScreen = ({
|
|
|
206
239
|
}]);
|
|
207
240
|
} else {
|
|
208
241
|
setLinks([]);
|
|
209
|
-
|
|
242
|
+
setLinksMetadata([]);
|
|
210
243
|
}
|
|
211
244
|
isInitializedRef.current = true;
|
|
212
245
|
}
|
|
@@ -239,6 +272,109 @@ const AccountSettingsScreen = ({
|
|
|
239
272
|
// Delay constant for scroll completion
|
|
240
273
|
const SCROLL_DELAY_MS = 600;
|
|
241
274
|
|
|
275
|
+
// Helper functions for inline editing (legacy support)
|
|
276
|
+
const startEditing = useCallback((field, initialValue) => {
|
|
277
|
+
setEditingField(field);
|
|
278
|
+
switch (field) {
|
|
279
|
+
case 'displayName':
|
|
280
|
+
setTempDisplayName(initialValue || displayName);
|
|
281
|
+
setTempLastName(lastName);
|
|
282
|
+
break;
|
|
283
|
+
case 'username':
|
|
284
|
+
setTempUsername(initialValue || username);
|
|
285
|
+
break;
|
|
286
|
+
case 'email':
|
|
287
|
+
setTempEmail(initialValue || email);
|
|
288
|
+
break;
|
|
289
|
+
case 'bio':
|
|
290
|
+
setTempBio(initialValue || bio);
|
|
291
|
+
break;
|
|
292
|
+
case 'location':
|
|
293
|
+
setTempLocations([...locations]);
|
|
294
|
+
break;
|
|
295
|
+
case 'links':
|
|
296
|
+
setTempLinksWithMetadata([...linksMetadata]);
|
|
297
|
+
break;
|
|
298
|
+
case 'twoFactor':
|
|
299
|
+
// No temp state needed for twoFactor
|
|
300
|
+
break;
|
|
301
|
+
}
|
|
302
|
+
}, [displayName, lastName, username, email, bio, locations, linksMetadata]);
|
|
303
|
+
const cancelEditing = useCallback(() => {
|
|
304
|
+
setEditingField(null);
|
|
305
|
+
setTempDisplayName('');
|
|
306
|
+
setTempLastName('');
|
|
307
|
+
setTempUsername('');
|
|
308
|
+
setTempEmail('');
|
|
309
|
+
setTempBio('');
|
|
310
|
+
setTempLocation('');
|
|
311
|
+
setTempLinks([]);
|
|
312
|
+
setTempLocations([]);
|
|
313
|
+
setTempLinksWithMetadata([]);
|
|
314
|
+
setIsAddingLocation(false);
|
|
315
|
+
setIsSearchingLocations(false);
|
|
316
|
+
setLocationSearchResults([]);
|
|
317
|
+
setNewLocationQuery('');
|
|
318
|
+
setIsAddingLink(false);
|
|
319
|
+
setIsFetchingMetadata(false);
|
|
320
|
+
setNewLinkUrl('');
|
|
321
|
+
}, []);
|
|
322
|
+
const saveField = useCallback(async field => {
|
|
323
|
+
if (!field) return;
|
|
324
|
+
setIsSaving(true);
|
|
325
|
+
try {
|
|
326
|
+
switch (field) {
|
|
327
|
+
case 'displayName':
|
|
328
|
+
await updateUser({
|
|
329
|
+
name: {
|
|
330
|
+
first: tempDisplayName,
|
|
331
|
+
last: tempLastName
|
|
332
|
+
}
|
|
333
|
+
}, oxyServices);
|
|
334
|
+
setDisplayName(tempDisplayName);
|
|
335
|
+
setLastName(tempLastName);
|
|
336
|
+
break;
|
|
337
|
+
case 'username':
|
|
338
|
+
await updateUser({
|
|
339
|
+
username: tempUsername
|
|
340
|
+
}, oxyServices);
|
|
341
|
+
setUsername(tempUsername);
|
|
342
|
+
break;
|
|
343
|
+
case 'email':
|
|
344
|
+
await updateUser({
|
|
345
|
+
email: tempEmail
|
|
346
|
+
}, oxyServices);
|
|
347
|
+
setEmail(tempEmail);
|
|
348
|
+
break;
|
|
349
|
+
case 'bio':
|
|
350
|
+
await updateUser({
|
|
351
|
+
bio: tempBio
|
|
352
|
+
}, oxyServices);
|
|
353
|
+
setBio(tempBio);
|
|
354
|
+
break;
|
|
355
|
+
case 'location':
|
|
356
|
+
await updateUser({
|
|
357
|
+
locations: tempLocations
|
|
358
|
+
}, oxyServices);
|
|
359
|
+
setLocations(tempLocations);
|
|
360
|
+
break;
|
|
361
|
+
case 'links':
|
|
362
|
+
await updateUser({
|
|
363
|
+
linksMetadata: tempLinksWithMetadata
|
|
364
|
+
}, oxyServices);
|
|
365
|
+
setLinksMetadata(tempLinksWithMetadata);
|
|
366
|
+
setLinks(tempLinksWithMetadata.map(l => l.url));
|
|
367
|
+
break;
|
|
368
|
+
}
|
|
369
|
+
setEditingField(null);
|
|
370
|
+
toast.success(t('editProfile.toasts.saved') || 'Saved');
|
|
371
|
+
} catch (error) {
|
|
372
|
+
toast.error(error?.message || t('editProfile.toasts.saveFailed') || 'Failed to save');
|
|
373
|
+
} finally {
|
|
374
|
+
setIsSaving(false);
|
|
375
|
+
}
|
|
376
|
+
}, [tempDisplayName, tempLastName, tempUsername, tempEmail, tempBio, tempLocations, tempLinksWithMetadata, updateUser, oxyServices, t]);
|
|
377
|
+
|
|
242
378
|
// Helper to get current value for a field
|
|
243
379
|
const getFieldCurrentValue = useCallback(field => {
|
|
244
380
|
switch (field) {
|
|
@@ -282,13 +418,10 @@ const AccountSettingsScreen = ({
|
|
|
282
418
|
// Scroll to the specified section if initialSection is provided and we haven't scrolled yet
|
|
283
419
|
if (initialSection && !hasScrolledToSectionRef.current) {
|
|
284
420
|
const sectionY = sectionYPositions[initialSection];
|
|
285
|
-
if (sectionY !== null && sectionY !== undefined &&
|
|
421
|
+
if (sectionY !== null && sectionY !== undefined && scrollTo) {
|
|
286
422
|
requestAnimationFrame(() => {
|
|
287
423
|
requestAnimationFrame(() => {
|
|
288
|
-
|
|
289
|
-
y: Math.max(0, sectionY - SCROLL_OFFSET),
|
|
290
|
-
animated: true
|
|
291
|
-
});
|
|
424
|
+
scrollTo(Math.max(0, sectionY - SCROLL_OFFSET), true);
|
|
292
425
|
hasScrolledToSectionRef.current = true;
|
|
293
426
|
});
|
|
294
427
|
});
|
|
@@ -305,11 +438,11 @@ const AccountSettingsScreen = ({
|
|
|
305
438
|
username,
|
|
306
439
|
email,
|
|
307
440
|
bio,
|
|
308
|
-
location:
|
|
441
|
+
location: locations.length > 0 ? locations[0].name : '',
|
|
309
442
|
// Keep backward compatibility
|
|
310
|
-
locations:
|
|
443
|
+
locations: locations.length > 0 ? locations : undefined,
|
|
311
444
|
links,
|
|
312
|
-
linksMetadata:
|
|
445
|
+
linksMetadata: linksMetadata.length > 0 ? linksMetadata : undefined
|
|
313
446
|
};
|
|
314
447
|
|
|
315
448
|
// Handle name field
|
|
@@ -347,207 +480,106 @@ const AccountSettingsScreen = ({
|
|
|
347
480
|
});
|
|
348
481
|
};
|
|
349
482
|
const openAvatarPicker = useCallback(() => {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
props: {
|
|
353
|
-
selectMode: true,
|
|
354
|
-
multiSelect: false,
|
|
355
|
-
afterSelect: 'back',
|
|
356
|
-
onSelect: async file => {
|
|
357
|
-
if (!file.contentType.startsWith('image/')) {
|
|
358
|
-
toast.error(t('editProfile.toasts.selectImage') || 'Please select an image file');
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
|
-
// If already selected, do nothing
|
|
362
|
-
if (file.id === avatarFileId) {
|
|
363
|
-
toast.info?.(t('editProfile.toasts.avatarUnchanged') || 'Avatar unchanged');
|
|
364
|
-
return;
|
|
365
|
-
}
|
|
483
|
+
toast.info?.(t('editProfile.toasts.avatarPickerUnavailable') || 'Avatar picker is not available in this build.');
|
|
484
|
+
}, [t]);
|
|
366
485
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
486
|
+
// Handlers to open modals
|
|
487
|
+
const handleOpenDisplayNameModal = useCallback(() => setShowEditDisplayNameModal(true), []);
|
|
488
|
+
const handleOpenUsernameModal = useCallback(() => setShowEditUsernameModal(true), []);
|
|
489
|
+
const handleOpenEmailModal = useCallback(() => setShowEditEmailModal(true), []);
|
|
490
|
+
const handleOpenBioModal = useCallback(() => setShowEditBioModal(true), []);
|
|
491
|
+
const handleOpenLocationModal = useCallback(() => setShowEditLocationModal(true), []);
|
|
492
|
+
const handleOpenLinksModal = useCallback(() => setShowEditLinksModal(true), []);
|
|
493
|
+
const handleOpenTwoFactorModal = useCallback(() => setShowTwoFactorModal(true), []);
|
|
370
494
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
495
|
+
// Handler to refresh data after modal saves
|
|
496
|
+
// Note: Access user directly from store when invoked to get latest value,
|
|
497
|
+
// not from closure which may be stale after modal saves update the backend
|
|
498
|
+
const handleModalSave = useCallback(() => {
|
|
499
|
+
// Get fresh user data from store to ensure we have the latest values
|
|
500
|
+
// after the modal's save operation updates the backend
|
|
501
|
+
// Read from store directly (not from closure) to avoid stale data
|
|
502
|
+
const currentUser = useAuthStore.getState().user;
|
|
375
503
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
504
|
+
// Reload user data to reflect changes
|
|
505
|
+
if (currentUser) {
|
|
506
|
+
const userDisplayName = typeof currentUser.name === 'string' ? currentUser.name : currentUser.name?.first || currentUser.name?.full || '';
|
|
507
|
+
const userLastName = typeof currentUser.name === 'object' ? currentUser.name?.last || '' : '';
|
|
508
|
+
setDisplayName(userDisplayName);
|
|
509
|
+
setLastName(userLastName);
|
|
510
|
+
setUsername(currentUser.username || '');
|
|
511
|
+
setEmail(currentUser.email || '');
|
|
512
|
+
setBio(currentUser.bio || '');
|
|
382
513
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
// Scroll to avatar section after a brief delay to ensure UI is updated
|
|
409
|
-
requestAnimationFrame(() => {
|
|
410
|
-
requestAnimationFrame(() => {
|
|
411
|
-
if (avatarSectionY !== null) {
|
|
412
|
-
scrollViewRef.current?.scrollTo({
|
|
413
|
-
y: Math.max(0, avatarSectionY - 100),
|
|
414
|
-
// Offset to show section near top
|
|
415
|
-
animated: true
|
|
416
|
-
});
|
|
417
|
-
} else {
|
|
418
|
-
// Fallback: scroll to approximate position
|
|
419
|
-
scrollViewRef.current?.scrollTo({
|
|
420
|
-
y: 200,
|
|
421
|
-
// Approximate position of avatar section
|
|
422
|
-
animated: true
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
});
|
|
426
|
-
});
|
|
427
|
-
} catch (e) {
|
|
428
|
-
// Revert optimistic update on error
|
|
429
|
-
setAvatarFileId(typeof user?.avatar === 'string' ? user.avatar : '');
|
|
430
|
-
setOptimisticAvatarId(null);
|
|
431
|
-
toast.error(e.message || t('editProfile.toasts.updateAvatarFailed') || 'Failed to update avatar');
|
|
432
|
-
} finally {
|
|
433
|
-
setIsUpdatingAvatar(false);
|
|
434
|
-
}
|
|
435
|
-
})();
|
|
436
|
-
},
|
|
437
|
-
// Limit to images client-side by using photos view if later exposed
|
|
438
|
-
disabledMimeTypes: ['video/', 'audio/', 'application/pdf']
|
|
514
|
+
// Reload locations and links
|
|
515
|
+
if (currentUser.locations && Array.isArray(currentUser.locations)) {
|
|
516
|
+
setLocations(currentUser.locations.map((loc, index) => ({
|
|
517
|
+
id: loc.id || `existing-${index}`,
|
|
518
|
+
name: loc.name,
|
|
519
|
+
label: loc.label,
|
|
520
|
+
coordinates: loc.coordinates
|
|
521
|
+
})));
|
|
522
|
+
} else if (currentUser.location) {
|
|
523
|
+
setLocations([{
|
|
524
|
+
id: 'existing-0',
|
|
525
|
+
name: currentUser.location,
|
|
526
|
+
label: 'Location'
|
|
527
|
+
}]);
|
|
528
|
+
} else {
|
|
529
|
+
setLocations([]);
|
|
530
|
+
}
|
|
531
|
+
if (currentUser.linksMetadata && Array.isArray(currentUser.linksMetadata)) {
|
|
532
|
+
setLinksMetadata(currentUser.linksMetadata.map((link, index) => ({
|
|
533
|
+
...link,
|
|
534
|
+
id: link.id || `existing-${index}`
|
|
535
|
+
})));
|
|
536
|
+
} else {
|
|
537
|
+
setLinksMetadata([]);
|
|
439
538
|
}
|
|
440
|
-
});
|
|
441
|
-
}, [showBottomSheet, oxyServices, avatarFileId, updateUser, user]);
|
|
442
|
-
const startEditing = useCallback((type, currentValue) => {
|
|
443
|
-
switch (type) {
|
|
444
|
-
case 'displayName':
|
|
445
|
-
setTempDisplayName(displayName);
|
|
446
|
-
setTempLastName(lastName);
|
|
447
|
-
break;
|
|
448
|
-
case 'username':
|
|
449
|
-
setTempUsername(currentValue);
|
|
450
|
-
break;
|
|
451
|
-
case 'email':
|
|
452
|
-
setTempEmail(currentValue);
|
|
453
|
-
break;
|
|
454
|
-
case 'bio':
|
|
455
|
-
setTempBio(currentValue);
|
|
456
|
-
break;
|
|
457
|
-
case 'location':
|
|
458
|
-
// Don't reset the locations - keep the existing data
|
|
459
|
-
break;
|
|
460
|
-
case 'links':
|
|
461
|
-
// Don't reset the metadata - keep the existing rich metadata
|
|
462
|
-
// The tempLinksWithMetadata should already contain the rich data from the database
|
|
463
|
-
break;
|
|
464
|
-
case 'twoFactor':
|
|
465
|
-
// Reset TOTP temp state
|
|
466
|
-
setTotpSetupUrl(null);
|
|
467
|
-
setTotpCode('');
|
|
468
|
-
break;
|
|
469
539
|
}
|
|
470
|
-
|
|
471
|
-
}, [displayName, lastName]);
|
|
540
|
+
}, []); // Empty dependency array - callback reads fresh data from store at call time
|
|
472
541
|
|
|
473
|
-
// Handle initialField prop -
|
|
542
|
+
// Handle initialField prop - open appropriate modal
|
|
474
543
|
useEffect(() => {
|
|
475
|
-
|
|
476
|
-
if (initialFieldTimeoutRef.current) {
|
|
477
|
-
clearTimeout(initialFieldTimeoutRef.current);
|
|
478
|
-
initialFieldTimeoutRef.current = null;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
// If initialField changed, reset the flag
|
|
482
|
-
if (previousInitialFieldRef.current !== initialField) {
|
|
483
|
-
hasSetInitialFieldRef.current = false;
|
|
484
|
-
previousInitialFieldRef.current = initialField;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
// Set the editing field if initialField is provided and we haven't set it yet
|
|
488
|
-
if (initialField && !hasSetInitialFieldRef.current) {
|
|
544
|
+
if (initialField) {
|
|
489
545
|
// Special handling for avatar - open avatar picker directly
|
|
490
546
|
if (initialField === 'avatar') {
|
|
491
|
-
|
|
492
|
-
initialFieldTimeoutRef.current = setTimeout(() => {
|
|
547
|
+
setTimeout(() => {
|
|
493
548
|
openAvatarPicker();
|
|
494
|
-
|
|
495
|
-
}, SCROLL_DELAY_MS);
|
|
549
|
+
}, 300);
|
|
496
550
|
} else {
|
|
497
|
-
//
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
551
|
+
// Open appropriate modal
|
|
552
|
+
setTimeout(() => {
|
|
553
|
+
switch (initialField) {
|
|
554
|
+
case 'displayName':
|
|
555
|
+
setShowEditDisplayNameModal(true);
|
|
556
|
+
break;
|
|
557
|
+
case 'username':
|
|
558
|
+
setShowEditUsernameModal(true);
|
|
559
|
+
break;
|
|
560
|
+
case 'email':
|
|
561
|
+
setShowEditEmailModal(true);
|
|
562
|
+
break;
|
|
563
|
+
case 'bio':
|
|
564
|
+
setShowEditBioModal(true);
|
|
565
|
+
break;
|
|
566
|
+
case 'location':
|
|
567
|
+
setShowEditLocationModal(true);
|
|
568
|
+
break;
|
|
569
|
+
case 'links':
|
|
570
|
+
setShowEditLinksModal(true);
|
|
571
|
+
break;
|
|
572
|
+
case 'twoFactor':
|
|
573
|
+
setShowTwoFactorModal(true);
|
|
574
|
+
break;
|
|
575
|
+
}
|
|
576
|
+
}, 300);
|
|
511
577
|
}
|
|
512
|
-
};
|
|
513
|
-
}, [initialField, getFieldCurrentValue, startEditing, openAvatarPicker]);
|
|
514
|
-
const saveField = type => {
|
|
515
|
-
animateSaveButton(0.95); // Scale down slightly for animation
|
|
516
|
-
|
|
517
|
-
switch (type) {
|
|
518
|
-
case 'displayName':
|
|
519
|
-
setDisplayName(tempDisplayName);
|
|
520
|
-
setLastName(tempLastName);
|
|
521
|
-
break;
|
|
522
|
-
case 'username':
|
|
523
|
-
setUsername(tempUsername);
|
|
524
|
-
break;
|
|
525
|
-
case 'email':
|
|
526
|
-
setEmail(tempEmail);
|
|
527
|
-
break;
|
|
528
|
-
case 'bio':
|
|
529
|
-
setBio(tempBio);
|
|
530
|
-
break;
|
|
531
|
-
case 'location':
|
|
532
|
-
// Locations are handled in the main save function
|
|
533
|
-
break;
|
|
534
|
-
case 'links':
|
|
535
|
-
// Save both URLs and metadata
|
|
536
|
-
setLinks(tempLinksWithMetadata.map(link => link.url));
|
|
537
|
-
// Store full metadata for database
|
|
538
|
-
setTempLinksWithMetadata(tempLinksWithMetadata);
|
|
539
|
-
break;
|
|
540
578
|
}
|
|
579
|
+
}, [initialField, openAvatarPicker]);
|
|
541
580
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
setEditingField(null);
|
|
545
|
-
});
|
|
546
|
-
};
|
|
547
|
-
const cancelEditing = () => {
|
|
548
|
-
setEditingField(null);
|
|
549
|
-
};
|
|
550
|
-
const fetchLinkMetadata = async url => {
|
|
581
|
+
// Removed fetchLinkMetadata - now handled by EditLinksModal
|
|
582
|
+
const _fetchLinkMetadata = async url => {
|
|
551
583
|
// Check cache first
|
|
552
584
|
const cacheKey = url.toLowerCase().trim();
|
|
553
585
|
const cached = linkMetadataCache.get(cacheKey);
|
|
@@ -583,6 +615,8 @@ const AccountSettingsScreen = ({
|
|
|
583
615
|
setIsFetchingMetadata(false);
|
|
584
616
|
}
|
|
585
617
|
};
|
|
618
|
+
|
|
619
|
+
// Helper functions for inline editing (legacy support - still used by renderEditingField)
|
|
586
620
|
const searchLocations = async query => {
|
|
587
621
|
if (!query.trim() || query.length < 3) {
|
|
588
622
|
setLocationSearchResults([]);
|
|
@@ -639,7 +673,7 @@ const AccountSettingsScreen = ({
|
|
|
639
673
|
const addLink = async () => {
|
|
640
674
|
if (!newLinkUrl.trim()) return;
|
|
641
675
|
const url = newLinkUrl.trim();
|
|
642
|
-
const metadata = await
|
|
676
|
+
const metadata = await _fetchLinkMetadata(url);
|
|
643
677
|
setTempLinksWithMetadata(prev => [...prev, metadata]);
|
|
644
678
|
setNewLinkUrl('');
|
|
645
679
|
setIsAddingLink(false);
|
|
@@ -655,12 +689,18 @@ const AccountSettingsScreen = ({
|
|
|
655
689
|
return newLinks;
|
|
656
690
|
});
|
|
657
691
|
};
|
|
692
|
+
|
|
693
|
+
// Memoize display name for avatar
|
|
694
|
+
const displayNameForAvatar = useMemo(() => getDisplayName(user), [user]);
|
|
695
|
+
|
|
696
|
+
// Legacy renderEditingField function (still used for twoFactor and fallback)
|
|
658
697
|
const renderEditingField = type => {
|
|
698
|
+
if (!type) return null;
|
|
659
699
|
if (type === 'twoFactor') {
|
|
660
700
|
const enabled = !!user?.privacySettings?.twoFactorEnabled;
|
|
661
701
|
return /*#__PURE__*/_jsx(View, {
|
|
662
702
|
style: [styles.editingFieldContainer, {
|
|
663
|
-
backgroundColor:
|
|
703
|
+
backgroundColor: colors.background
|
|
664
704
|
}],
|
|
665
705
|
children: /*#__PURE__*/_jsx(View, {
|
|
666
706
|
style: styles.editingFieldContent,
|
|
@@ -670,7 +710,7 @@ const AccountSettingsScreen = ({
|
|
|
670
710
|
style: styles.editingFieldHeader,
|
|
671
711
|
children: /*#__PURE__*/_jsx(Text, {
|
|
672
712
|
style: [styles.editingFieldLabel, {
|
|
673
|
-
color:
|
|
713
|
+
color: colors.text
|
|
674
714
|
}],
|
|
675
715
|
children: "Two\u2011Factor Authentication (TOTP)"
|
|
676
716
|
})
|
|
@@ -679,7 +719,9 @@ const AccountSettingsScreen = ({
|
|
|
679
719
|
style: styles.editingFieldDescription,
|
|
680
720
|
children: "Protect your account with a 6\u2011digit code from an authenticator app. Scan the QR code then enter the code to enable."
|
|
681
721
|
}), !totpSetupUrl ? /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
682
|
-
style: styles.primaryButton,
|
|
722
|
+
style: [styles.primaryButton, {
|
|
723
|
+
backgroundColor: colors.iconSecurity
|
|
724
|
+
}],
|
|
683
725
|
disabled: isTotpBusy,
|
|
684
726
|
onPress: async () => {
|
|
685
727
|
if (!activeSessionId) {
|
|
@@ -734,7 +776,9 @@ const AccountSettingsScreen = ({
|
|
|
734
776
|
maxLength: 6
|
|
735
777
|
})]
|
|
736
778
|
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
737
|
-
style: styles.primaryButton,
|
|
779
|
+
style: [styles.primaryButton, {
|
|
780
|
+
backgroundColor: colors.iconSecurity
|
|
781
|
+
}],
|
|
738
782
|
disabled: isTotpBusy || totpCode.length !== 6,
|
|
739
783
|
onPress: async () => {
|
|
740
784
|
if (!activeSessionId) {
|
|
@@ -791,7 +835,7 @@ const AccountSettingsScreen = ({
|
|
|
791
835
|
})]
|
|
792
836
|
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
793
837
|
style: [styles.primaryButton, {
|
|
794
|
-
backgroundColor:
|
|
838
|
+
backgroundColor: colors.sidebarIconSharing
|
|
795
839
|
}],
|
|
796
840
|
disabled: isTotpBusy || totpCode.length !== 6,
|
|
797
841
|
onPress: async () => {
|
|
@@ -832,7 +876,7 @@ const AccountSettingsScreen = ({
|
|
|
832
876
|
if (type === 'displayName') {
|
|
833
877
|
return /*#__PURE__*/_jsx(View, {
|
|
834
878
|
style: [styles.editingFieldContainer, {
|
|
835
|
-
backgroundColor:
|
|
879
|
+
backgroundColor: colors.background
|
|
836
880
|
}],
|
|
837
881
|
children: /*#__PURE__*/_jsx(View, {
|
|
838
882
|
style: styles.editingFieldContent,
|
|
@@ -842,7 +886,7 @@ const AccountSettingsScreen = ({
|
|
|
842
886
|
style: styles.editingFieldHeader,
|
|
843
887
|
children: /*#__PURE__*/_jsx(Text, {
|
|
844
888
|
style: [styles.editingFieldLabel, {
|
|
845
|
-
color:
|
|
889
|
+
color: colors.text
|
|
846
890
|
}],
|
|
847
891
|
children: "Edit Full Name"
|
|
848
892
|
})
|
|
@@ -863,7 +907,7 @@ const AccountSettingsScreen = ({
|
|
|
863
907
|
value: tempDisplayName,
|
|
864
908
|
onChangeText: setTempDisplayName,
|
|
865
909
|
placeholder: "Enter your first name",
|
|
866
|
-
placeholderTextColor:
|
|
910
|
+
placeholderTextColor: colors.secondaryText,
|
|
867
911
|
autoFocus: true,
|
|
868
912
|
selectionColor: themeStyles.primaryColor
|
|
869
913
|
})]
|
|
@@ -879,7 +923,7 @@ const AccountSettingsScreen = ({
|
|
|
879
923
|
value: tempLastName,
|
|
880
924
|
onChangeText: setTempLastName,
|
|
881
925
|
placeholder: "Enter your last name",
|
|
882
|
-
placeholderTextColor:
|
|
926
|
+
placeholderTextColor: colors.secondaryText,
|
|
883
927
|
selectionColor: themeStyles.primaryColor
|
|
884
928
|
})]
|
|
885
929
|
})]
|
|
@@ -891,7 +935,7 @@ const AccountSettingsScreen = ({
|
|
|
891
935
|
if (type === 'location') {
|
|
892
936
|
return /*#__PURE__*/_jsx(View, {
|
|
893
937
|
style: [styles.editingFieldContainer, {
|
|
894
|
-
backgroundColor:
|
|
938
|
+
backgroundColor: colors.background
|
|
895
939
|
}],
|
|
896
940
|
children: /*#__PURE__*/_jsx(View, {
|
|
897
941
|
style: styles.editingFieldContent,
|
|
@@ -901,7 +945,7 @@ const AccountSettingsScreen = ({
|
|
|
901
945
|
style: styles.editingFieldHeader,
|
|
902
946
|
children: /*#__PURE__*/_jsx(Text, {
|
|
903
947
|
style: [styles.editingFieldLabel, {
|
|
904
|
-
color:
|
|
948
|
+
color: colors.text
|
|
905
949
|
}],
|
|
906
950
|
children: "Manage Your Locations"
|
|
907
951
|
})
|
|
@@ -910,7 +954,9 @@ const AccountSettingsScreen = ({
|
|
|
910
954
|
children: [/*#__PURE__*/_jsxs(Text, {
|
|
911
955
|
style: styles.addLocationLabel,
|
|
912
956
|
children: ["Add New Location", isSearchingLocations && /*#__PURE__*/_jsx(Text, {
|
|
913
|
-
style: styles.searchingText,
|
|
957
|
+
style: [styles.searchingText, {
|
|
958
|
+
color: colors.iconSecurity
|
|
959
|
+
}],
|
|
914
960
|
children: " \u2022 Searching..."
|
|
915
961
|
})]
|
|
916
962
|
}), /*#__PURE__*/_jsxs(View, {
|
|
@@ -923,7 +969,7 @@ const AccountSettingsScreen = ({
|
|
|
923
969
|
searchLocations(text);
|
|
924
970
|
},
|
|
925
971
|
placeholder: "Search for a location...",
|
|
926
|
-
placeholderTextColor:
|
|
972
|
+
placeholderTextColor: colors.secondaryText,
|
|
927
973
|
autoFocus: true,
|
|
928
974
|
selectionColor: themeStyles.primaryColor
|
|
929
975
|
}), /*#__PURE__*/_jsx(View, {
|
|
@@ -964,7 +1010,9 @@ const AccountSettingsScreen = ({
|
|
|
964
1010
|
size: 20,
|
|
965
1011
|
color: themeStyles.primaryColor
|
|
966
1012
|
}), /*#__PURE__*/_jsx(Text, {
|
|
967
|
-
style: styles.addLocationTriggerText,
|
|
1013
|
+
style: [styles.addLocationTriggerText, {
|
|
1014
|
+
color: colors.iconSecurity
|
|
1015
|
+
}],
|
|
968
1016
|
children: "Add a new location"
|
|
969
1017
|
})]
|
|
970
1018
|
}), tempLocations.length > 0 && /*#__PURE__*/_jsxs(View, {
|
|
@@ -1009,7 +1057,9 @@ const AccountSettingsScreen = ({
|
|
|
1009
1057
|
numberOfLines: 1,
|
|
1010
1058
|
children: location.name
|
|
1011
1059
|
}), location.label && /*#__PURE__*/_jsx(View, {
|
|
1012
|
-
style: styles.locationLabel,
|
|
1060
|
+
style: [styles.locationLabel, {
|
|
1061
|
+
backgroundColor: colors.iconSecurity
|
|
1062
|
+
}],
|
|
1013
1063
|
children: /*#__PURE__*/_jsx(Text, {
|
|
1014
1064
|
style: styles.locationLabelText,
|
|
1015
1065
|
children: location.label
|
|
@@ -1049,7 +1099,7 @@ const AccountSettingsScreen = ({
|
|
|
1049
1099
|
if (type === 'links') {
|
|
1050
1100
|
return /*#__PURE__*/_jsx(View, {
|
|
1051
1101
|
style: [styles.editingFieldContainer, {
|
|
1052
|
-
backgroundColor:
|
|
1102
|
+
backgroundColor: colors.background
|
|
1053
1103
|
}],
|
|
1054
1104
|
children: /*#__PURE__*/_jsx(View, {
|
|
1055
1105
|
style: styles.editingFieldContent,
|
|
@@ -1059,7 +1109,7 @@ const AccountSettingsScreen = ({
|
|
|
1059
1109
|
style: styles.editingFieldHeader,
|
|
1060
1110
|
children: /*#__PURE__*/_jsx(Text, {
|
|
1061
1111
|
style: [styles.editingFieldLabel, {
|
|
1062
|
-
color:
|
|
1112
|
+
color: colors.text
|
|
1063
1113
|
}],
|
|
1064
1114
|
children: "Manage Your Links"
|
|
1065
1115
|
})
|
|
@@ -1068,11 +1118,10 @@ const AccountSettingsScreen = ({
|
|
|
1068
1118
|
// Add new link item
|
|
1069
1119
|
...(isAddingLink ? [{
|
|
1070
1120
|
id: 'add-link-input',
|
|
1071
|
-
icon: '
|
|
1072
|
-
iconColor:
|
|
1121
|
+
icon: 'plus',
|
|
1122
|
+
iconColor: colors.sidebarIconSharing,
|
|
1073
1123
|
title: 'Add New Link',
|
|
1074
1124
|
subtitle: isFetchingMetadata ? 'Fetching metadata...' : 'Enter URL to add a new link',
|
|
1075
|
-
multiRow: true,
|
|
1076
1125
|
customContent: /*#__PURE__*/_jsxs(View, {
|
|
1077
1126
|
style: styles.addLinkInputContainer,
|
|
1078
1127
|
children: [/*#__PURE__*/_jsx(TextInput, {
|
|
@@ -1080,7 +1129,7 @@ const AccountSettingsScreen = ({
|
|
|
1080
1129
|
value: newLinkUrl,
|
|
1081
1130
|
onChangeText: setNewLinkUrl,
|
|
1082
1131
|
placeholder: "Enter URL (e.g., https://example.com)",
|
|
1083
|
-
placeholderTextColor:
|
|
1132
|
+
placeholderTextColor: colors.secondaryText,
|
|
1084
1133
|
keyboardType: "url",
|
|
1085
1134
|
autoFocus: true,
|
|
1086
1135
|
selectionColor: themeStyles.primaryColor
|
|
@@ -1098,6 +1147,7 @@ const AccountSettingsScreen = ({
|
|
|
1098
1147
|
})
|
|
1099
1148
|
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1100
1149
|
style: [styles.addLinkButton, styles.addButton, {
|
|
1150
|
+
backgroundColor: colors.iconSecurity,
|
|
1101
1151
|
opacity: isFetchingMetadata ? 0.5 : 1
|
|
1102
1152
|
}],
|
|
1103
1153
|
onPress: addLink,
|
|
@@ -1114,8 +1164,8 @@ const AccountSettingsScreen = ({
|
|
|
1114
1164
|
})
|
|
1115
1165
|
}] : [{
|
|
1116
1166
|
id: 'add-link-trigger',
|
|
1117
|
-
icon: '
|
|
1118
|
-
iconColor:
|
|
1167
|
+
icon: 'plus',
|
|
1168
|
+
iconColor: colors.sidebarIconSharing,
|
|
1119
1169
|
title: 'Add a new link',
|
|
1120
1170
|
subtitle: 'Tap to add a new link to your profile',
|
|
1121
1171
|
onPress: () => setIsAddingLink(true)
|
|
@@ -1123,13 +1173,20 @@ const AccountSettingsScreen = ({
|
|
|
1123
1173
|
// Existing links
|
|
1124
1174
|
...tempLinksWithMetadata.map((link, index) => ({
|
|
1125
1175
|
id: link.id,
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1176
|
+
customIcon: link.image ? /*#__PURE__*/_jsx(Image, {
|
|
1177
|
+
source: {
|
|
1178
|
+
uri: link.image
|
|
1179
|
+
},
|
|
1180
|
+
style: {
|
|
1181
|
+
width: 36,
|
|
1182
|
+
height: 36,
|
|
1183
|
+
borderRadius: 18
|
|
1184
|
+
}
|
|
1185
|
+
}) : undefined,
|
|
1186
|
+
icon: !link.image ? 'link-variant' : undefined,
|
|
1187
|
+
iconColor: colors.sidebarIconSharing,
|
|
1130
1188
|
title: link.title || link.url,
|
|
1131
1189
|
subtitle: link.description && link.description !== link.title ? link.description : link.url,
|
|
1132
|
-
multiRow: true,
|
|
1133
1190
|
customContent: /*#__PURE__*/_jsxs(View, {
|
|
1134
1191
|
style: styles.linkItemActions,
|
|
1135
1192
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
@@ -1163,8 +1220,7 @@ const AccountSettingsScreen = ({
|
|
|
1163
1220
|
})
|
|
1164
1221
|
})]
|
|
1165
1222
|
})
|
|
1166
|
-
}))]
|
|
1167
|
-
theme: theme
|
|
1223
|
+
}))]
|
|
1168
1224
|
}), tempLinksWithMetadata.length > 0 && /*#__PURE__*/_jsx(View, {
|
|
1169
1225
|
style: styles.reorderHint,
|
|
1170
1226
|
children: /*#__PURE__*/_jsx(Text, {
|
|
@@ -1182,7 +1238,7 @@ const AccountSettingsScreen = ({
|
|
|
1182
1238
|
value: displayName,
|
|
1183
1239
|
placeholder: 'Enter your display name',
|
|
1184
1240
|
icon: 'person',
|
|
1185
|
-
color:
|
|
1241
|
+
color: colors.iconPersonalInfo,
|
|
1186
1242
|
multiline: false,
|
|
1187
1243
|
keyboardType: 'default'
|
|
1188
1244
|
},
|
|
@@ -1191,7 +1247,7 @@ const AccountSettingsScreen = ({
|
|
|
1191
1247
|
value: username,
|
|
1192
1248
|
placeholder: 'Choose a username',
|
|
1193
1249
|
icon: 'at',
|
|
1194
|
-
color:
|
|
1250
|
+
color: colors.iconData,
|
|
1195
1251
|
multiline: false,
|
|
1196
1252
|
keyboardType: 'default'
|
|
1197
1253
|
},
|
|
@@ -1200,7 +1256,7 @@ const AccountSettingsScreen = ({
|
|
|
1200
1256
|
value: email,
|
|
1201
1257
|
placeholder: 'Enter your email address',
|
|
1202
1258
|
icon: 'mail',
|
|
1203
|
-
color:
|
|
1259
|
+
color: colors.iconStorage,
|
|
1204
1260
|
multiline: false,
|
|
1205
1261
|
keyboardType: 'email-address'
|
|
1206
1262
|
},
|
|
@@ -1209,7 +1265,7 @@ const AccountSettingsScreen = ({
|
|
|
1209
1265
|
value: bio,
|
|
1210
1266
|
placeholder: 'Tell people about yourself...',
|
|
1211
1267
|
icon: 'document-text',
|
|
1212
|
-
color:
|
|
1268
|
+
color: colors.iconPersonalInfo,
|
|
1213
1269
|
multiline: true,
|
|
1214
1270
|
keyboardType: 'default'
|
|
1215
1271
|
},
|
|
@@ -1218,7 +1274,7 @@ const AccountSettingsScreen = ({
|
|
|
1218
1274
|
value: location,
|
|
1219
1275
|
placeholder: 'Enter your location',
|
|
1220
1276
|
icon: 'location',
|
|
1221
|
-
color:
|
|
1277
|
+
color: colors.iconSharing,
|
|
1222
1278
|
multiline: false,
|
|
1223
1279
|
keyboardType: 'default'
|
|
1224
1280
|
},
|
|
@@ -1227,7 +1283,7 @@ const AccountSettingsScreen = ({
|
|
|
1227
1283
|
value: links.join(', '),
|
|
1228
1284
|
placeholder: 'Enter your links (comma separated)',
|
|
1229
1285
|
icon: 'link',
|
|
1230
|
-
color:
|
|
1286
|
+
color: colors.iconPersonalInfo,
|
|
1231
1287
|
multiline: false,
|
|
1232
1288
|
keyboardType: 'url'
|
|
1233
1289
|
}
|
|
@@ -1276,7 +1332,7 @@ const AccountSettingsScreen = ({
|
|
|
1276
1332
|
};
|
|
1277
1333
|
return /*#__PURE__*/_jsx(View, {
|
|
1278
1334
|
style: [styles.editingFieldContainer, {
|
|
1279
|
-
backgroundColor:
|
|
1335
|
+
backgroundColor: colors.background
|
|
1280
1336
|
}],
|
|
1281
1337
|
children: /*#__PURE__*/_jsx(View, {
|
|
1282
1338
|
style: styles.editingFieldContent,
|
|
@@ -1286,7 +1342,7 @@ const AccountSettingsScreen = ({
|
|
|
1286
1342
|
style: styles.editingFieldHeader,
|
|
1287
1343
|
children: /*#__PURE__*/_jsx(Text, {
|
|
1288
1344
|
style: [styles.editingFieldLabel, {
|
|
1289
|
-
color:
|
|
1345
|
+
color: colors.text
|
|
1290
1346
|
}],
|
|
1291
1347
|
children: config.label
|
|
1292
1348
|
})
|
|
@@ -1310,10 +1366,10 @@ const AccountSettingsScreen = ({
|
|
|
1310
1366
|
})
|
|
1311
1367
|
});
|
|
1312
1368
|
};
|
|
1313
|
-
if (
|
|
1369
|
+
if (isLoading || !isAuthenticated) {
|
|
1314
1370
|
return /*#__PURE__*/_jsx(View, {
|
|
1315
1371
|
style: [styles.container, {
|
|
1316
|
-
backgroundColor: themeStyles.
|
|
1372
|
+
backgroundColor: themeStyles.backgroundColor,
|
|
1317
1373
|
justifyContent: 'center'
|
|
1318
1374
|
}],
|
|
1319
1375
|
children: /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
@@ -1324,40 +1380,40 @@ const AccountSettingsScreen = ({
|
|
|
1324
1380
|
}
|
|
1325
1381
|
return /*#__PURE__*/_jsxs(View, {
|
|
1326
1382
|
style: [styles.container, {
|
|
1327
|
-
backgroundColor: themeStyles.
|
|
1383
|
+
backgroundColor: themeStyles.backgroundColor
|
|
1328
1384
|
}],
|
|
1329
1385
|
children: [editingField ? /*#__PURE__*/_jsxs(View, {
|
|
1330
1386
|
style: [styles.editingHeader, {
|
|
1331
|
-
backgroundColor:
|
|
1332
|
-
borderBottomColor:
|
|
1387
|
+
backgroundColor: colors.background,
|
|
1388
|
+
borderBottomColor: colors.border
|
|
1333
1389
|
}],
|
|
1334
1390
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
1335
1391
|
style: styles.editingHeaderContent,
|
|
1336
1392
|
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1337
1393
|
style: [styles.editingBackButton, {
|
|
1338
|
-
backgroundColor:
|
|
1394
|
+
backgroundColor: colors.card
|
|
1339
1395
|
}],
|
|
1340
1396
|
onPress: cancelEditing,
|
|
1341
1397
|
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
1342
1398
|
name: "chevron-back",
|
|
1343
1399
|
size: 20,
|
|
1344
|
-
color:
|
|
1400
|
+
color: colors.tint
|
|
1345
1401
|
})
|
|
1346
1402
|
}), /*#__PURE__*/_jsx(View, {
|
|
1347
1403
|
style: styles.editingTitleContainer
|
|
1348
1404
|
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1349
1405
|
style: [styles.editingSaveButton, {
|
|
1350
1406
|
opacity: isSaving ? 0.5 : 1,
|
|
1351
|
-
backgroundColor:
|
|
1407
|
+
backgroundColor: colors.card
|
|
1352
1408
|
}],
|
|
1353
1409
|
onPress: () => saveField(editingField),
|
|
1354
1410
|
disabled: isSaving,
|
|
1355
1411
|
children: isSaving ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
1356
1412
|
size: "small",
|
|
1357
|
-
color:
|
|
1413
|
+
color: colors.tint
|
|
1358
1414
|
}) : /*#__PURE__*/_jsx(Text, {
|
|
1359
1415
|
style: [styles.editingSaveButtonText, {
|
|
1360
|
-
color:
|
|
1416
|
+
color: colors.tint
|
|
1361
1417
|
}],
|
|
1362
1418
|
children: "Save"
|
|
1363
1419
|
})
|
|
@@ -1366,34 +1422,25 @@ const AccountSettingsScreen = ({
|
|
|
1366
1422
|
style: styles.editingHeaderBottom,
|
|
1367
1423
|
children: [/*#__PURE__*/_jsx(View, {
|
|
1368
1424
|
style: [styles.editingIconContainer, {
|
|
1369
|
-
backgroundColor: editingField === 'displayName' ?
|
|
1425
|
+
backgroundColor: editingField === 'displayName' ? `${colors.sidebarIconPersonalInfo}20` : editingField === 'username' ? `${colors.sidebarIconData}20` : editingField === 'email' ? `${colors.sidebarIconSecurity}20` : editingField === 'bio' ? `${colors.sidebarIconPersonalInfo}20` : editingField === 'location' ? `${colors.sidebarIconSharing}20` : editingField === 'links' ? `${colors.sidebarIconPersonalInfo}20` : `${colors.tint}20`
|
|
1370
1426
|
}],
|
|
1371
|
-
children: /*#__PURE__*/_jsx(
|
|
1372
|
-
name: editingField === 'displayName' ? '
|
|
1427
|
+
children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
1428
|
+
name: editingField === 'displayName' ? 'account-outline' : editingField === 'username' ? 'at' : editingField === 'email' ? 'email-outline' : editingField === 'bio' ? 'text-box-outline' : editingField === 'location' ? 'map-marker-outline' : editingField === 'links' ? 'link-variant' : 'account-outline',
|
|
1373
1429
|
size: 28,
|
|
1374
|
-
color: editingField === 'displayName' ?
|
|
1430
|
+
color: editingField === 'displayName' ? colors.sidebarIconPersonalInfo : editingField === 'username' ? colors.sidebarIconData : editingField === 'email' ? colors.sidebarIconSecurity : editingField === 'bio' ? colors.sidebarIconPersonalInfo : editingField === 'location' ? colors.sidebarIconSharing : editingField === 'links' ? colors.sidebarIconPersonalInfo : colors.tint
|
|
1375
1431
|
})
|
|
1376
1432
|
}), /*#__PURE__*/_jsx(Text, {
|
|
1377
1433
|
style: [styles.editingBottomTitle, {
|
|
1378
|
-
color:
|
|
1434
|
+
color: colors.text
|
|
1379
1435
|
}],
|
|
1380
1436
|
children: editingField === 'displayName' ? t('editProfile.items.displayName.title') || 'Display Name' : editingField === 'username' ? t('editProfile.items.username.title') || 'Username' : editingField === 'email' ? t('editProfile.items.email.title') || 'Email' : editingField === 'bio' ? t('editProfile.items.bio.title') || 'Bio' : editingField === 'location' ? t('editProfile.items.locations.title') || 'Location' : editingField === 'links' ? t('editProfile.items.links.title') || 'Links' : 'Field'
|
|
1381
1437
|
})]
|
|
1382
1438
|
})]
|
|
1383
|
-
}) : /*#__PURE__*/_jsx(
|
|
1384
|
-
title: t('editProfile.title') || 'Edit Profile',
|
|
1385
|
-
theme: theme,
|
|
1386
|
-
onBack: goBack || onClose,
|
|
1387
|
-
rightAction: {
|
|
1388
|
-
icon: 'checkmark',
|
|
1389
|
-
onPress: handleSave,
|
|
1390
|
-
loading: isSaving,
|
|
1391
|
-
disabled: isSaving
|
|
1392
|
-
},
|
|
1393
|
-
elevation: "subtle"
|
|
1394
|
-
}), /*#__PURE__*/_jsx(ScrollView, {
|
|
1439
|
+
}) : null, /*#__PURE__*/_jsx(ScrollView, {
|
|
1395
1440
|
ref: scrollViewRef,
|
|
1396
1441
|
style: editingField ? styles.contentEditing : styles.content,
|
|
1442
|
+
contentContainerStyle: styles.scrollContent,
|
|
1443
|
+
showsVerticalScrollIndicator: false,
|
|
1397
1444
|
children: editingField ?
|
|
1398
1445
|
/*#__PURE__*/
|
|
1399
1446
|
// Show only the editing interface when editing
|
|
@@ -1404,7 +1451,24 @@ const AccountSettingsScreen = ({
|
|
|
1404
1451
|
/*#__PURE__*/
|
|
1405
1452
|
// Show all settings when not editing
|
|
1406
1453
|
_jsxs(_Fragment, {
|
|
1407
|
-
children: [
|
|
1454
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
1455
|
+
style: [styles.headerContainer, styles.headerSection],
|
|
1456
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
1457
|
+
style: [styles.modernTitle, {
|
|
1458
|
+
color: themeStyles.textColor,
|
|
1459
|
+
marginBottom: 0,
|
|
1460
|
+
marginTop: 0
|
|
1461
|
+
}],
|
|
1462
|
+
children: t('accountOverview.items.editProfile.title') || t('editProfile.title') || 'Edit Profile'
|
|
1463
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
1464
|
+
style: [styles.modernSubtitle, {
|
|
1465
|
+
color: colors.secondaryText,
|
|
1466
|
+
marginBottom: 0,
|
|
1467
|
+
marginTop: 0
|
|
1468
|
+
}],
|
|
1469
|
+
children: t('accountOverview.items.editProfile.subtitle') || t('editProfile.subtitle') || 'Manage your profile and preferences'
|
|
1470
|
+
})]
|
|
1471
|
+
}), showRecoveryModal && /*#__PURE__*/_jsx(View, {
|
|
1408
1472
|
style: {
|
|
1409
1473
|
position: 'absolute',
|
|
1410
1474
|
top: 0,
|
|
@@ -1490,6 +1554,7 @@ const AccountSettingsScreen = ({
|
|
|
1490
1554
|
})]
|
|
1491
1555
|
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
1492
1556
|
style: [styles.primaryButton, {
|
|
1557
|
+
backgroundColor: colors.iconSecurity,
|
|
1493
1558
|
alignSelf: 'flex-end',
|
|
1494
1559
|
marginTop: 8
|
|
1495
1560
|
}],
|
|
@@ -1523,7 +1588,7 @@ const AccountSettingsScreen = ({
|
|
|
1523
1588
|
},
|
|
1524
1589
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
1525
1590
|
style: [styles.sectionTitle, {
|
|
1526
|
-
color:
|
|
1591
|
+
color: colors.secondaryText
|
|
1527
1592
|
}],
|
|
1528
1593
|
children: t('editProfile.sections.profilePicture') || 'PROFILE PICTURE'
|
|
1529
1594
|
}), /*#__PURE__*/_jsx(View, {
|
|
@@ -1531,29 +1596,20 @@ const AccountSettingsScreen = ({
|
|
|
1531
1596
|
children: /*#__PURE__*/_jsx(GroupedSection, {
|
|
1532
1597
|
items: [{
|
|
1533
1598
|
id: 'profile-photo',
|
|
1534
|
-
|
|
1535
|
-
iconColor: '#007AFF',
|
|
1536
|
-
// Use optimistic avatar ID if available, otherwise use saved one
|
|
1537
|
-
image: optimisticAvatarId || avatarFileId ? oxyServices.getFileDownloadUrl(optimisticAvatarId || avatarFileId, 'thumb') : undefined,
|
|
1538
|
-
imageSize: 40,
|
|
1539
|
-
title: 'Profile Photo',
|
|
1540
|
-
subtitle: isUpdatingAvatar ? 'Updating profile picture...' : avatarFileId ? 'Tap to change your profile picture' : 'Tap to add a profile picture',
|
|
1541
|
-
onPress: isUpdatingAvatar ? undefined : openAvatarPicker,
|
|
1542
|
-
disabled: isUpdatingAvatar,
|
|
1543
|
-
customIcon: isUpdatingAvatar ? /*#__PURE__*/_jsxs(Animated.View, {
|
|
1599
|
+
customIcon: optimisticAvatarId || avatarFileId ? isUpdatingAvatar ? /*#__PURE__*/_jsxs(Animated.View, {
|
|
1544
1600
|
style: {
|
|
1545
1601
|
position: 'relative',
|
|
1546
|
-
width:
|
|
1547
|
-
height:
|
|
1602
|
+
width: 36,
|
|
1603
|
+
height: 36
|
|
1548
1604
|
},
|
|
1549
|
-
children: [
|
|
1605
|
+
children: [/*#__PURE__*/_jsx(Animated.Image, {
|
|
1550
1606
|
source: {
|
|
1551
1607
|
uri: oxyServices.getFileDownloadUrl(optimisticAvatarId || avatarFileId, 'thumb')
|
|
1552
1608
|
},
|
|
1553
1609
|
style: {
|
|
1554
|
-
width:
|
|
1555
|
-
height:
|
|
1556
|
-
borderRadius:
|
|
1610
|
+
width: 36,
|
|
1611
|
+
height: 36,
|
|
1612
|
+
borderRadius: 18,
|
|
1557
1613
|
opacity: 0.6
|
|
1558
1614
|
}
|
|
1559
1615
|
}), /*#__PURE__*/_jsx(View, {
|
|
@@ -1565,24 +1621,38 @@ const AccountSettingsScreen = ({
|
|
|
1565
1621
|
bottom: 0,
|
|
1566
1622
|
justifyContent: 'center',
|
|
1567
1623
|
alignItems: 'center',
|
|
1568
|
-
backgroundColor:
|
|
1569
|
-
borderRadius:
|
|
1624
|
+
backgroundColor: colorScheme === 'dark' ? 'rgba(0, 0, 0, 0.4)' : 'rgba(255, 255, 255, 0.7)',
|
|
1625
|
+
borderRadius: 18
|
|
1570
1626
|
},
|
|
1571
1627
|
children: /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
1572
1628
|
size: "small",
|
|
1573
|
-
color:
|
|
1629
|
+
color: colors.tint
|
|
1574
1630
|
})
|
|
1575
1631
|
})]
|
|
1576
|
-
}) :
|
|
1632
|
+
}) : /*#__PURE__*/_jsx(Image, {
|
|
1633
|
+
source: {
|
|
1634
|
+
uri: oxyServices.getFileDownloadUrl(optimisticAvatarId || avatarFileId, 'thumb')
|
|
1635
|
+
},
|
|
1636
|
+
style: {
|
|
1637
|
+
width: 36,
|
|
1638
|
+
height: 36,
|
|
1639
|
+
borderRadius: 18
|
|
1640
|
+
}
|
|
1641
|
+
}) : undefined,
|
|
1642
|
+
icon: !(optimisticAvatarId || avatarFileId) ? 'account-outline' : undefined,
|
|
1643
|
+
iconColor: colors.sidebarIconPersonalInfo,
|
|
1644
|
+
title: 'Profile Photo',
|
|
1645
|
+
subtitle: isUpdatingAvatar ? 'Updating profile picture...' : avatarFileId ? 'Tap to change your profile picture' : 'Tap to add a profile picture',
|
|
1646
|
+
onPress: isUpdatingAvatar ? undefined : openAvatarPicker,
|
|
1647
|
+
disabled: isUpdatingAvatar
|
|
1577
1648
|
}, ...(avatarFileId && !isUpdatingAvatar ? [{
|
|
1578
1649
|
id: 'remove-profile-photo',
|
|
1579
|
-
icon: '
|
|
1580
|
-
iconColor:
|
|
1650
|
+
icon: 'delete-outline',
|
|
1651
|
+
iconColor: colors.sidebarIconSharing,
|
|
1581
1652
|
title: 'Remove Photo',
|
|
1582
1653
|
subtitle: 'Delete current profile picture',
|
|
1583
1654
|
onPress: handleAvatarRemove
|
|
1584
|
-
}] : [])]
|
|
1585
|
-
theme: theme
|
|
1655
|
+
}] : [])]
|
|
1586
1656
|
})
|
|
1587
1657
|
})]
|
|
1588
1658
|
}), /*#__PURE__*/_jsxs(View, {
|
|
@@ -1596,7 +1666,7 @@ const AccountSettingsScreen = ({
|
|
|
1596
1666
|
},
|
|
1597
1667
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
1598
1668
|
style: [styles.sectionTitle, {
|
|
1599
|
-
color:
|
|
1669
|
+
color: colors.secondaryText
|
|
1600
1670
|
}],
|
|
1601
1671
|
children: t('editProfile.sections.basicInfo') || 'BASIC INFORMATION'
|
|
1602
1672
|
}), /*#__PURE__*/_jsx(View, {
|
|
@@ -1604,27 +1674,26 @@ const AccountSettingsScreen = ({
|
|
|
1604
1674
|
children: /*#__PURE__*/_jsx(GroupedSection, {
|
|
1605
1675
|
items: [{
|
|
1606
1676
|
id: 'display-name',
|
|
1607
|
-
icon: '
|
|
1608
|
-
iconColor:
|
|
1677
|
+
icon: 'account-outline',
|
|
1678
|
+
iconColor: colors.sidebarIconPersonalInfo,
|
|
1609
1679
|
title: t('editProfile.items.displayName.title') || 'Display Name',
|
|
1610
1680
|
subtitle: [displayName, lastName].filter(Boolean).join(' ') || t('editProfile.items.displayName.add') || 'Add your display name',
|
|
1611
|
-
onPress:
|
|
1681
|
+
onPress: handleOpenDisplayNameModal
|
|
1612
1682
|
}, {
|
|
1613
1683
|
id: 'username',
|
|
1614
1684
|
icon: 'at',
|
|
1615
|
-
iconColor:
|
|
1685
|
+
iconColor: colors.sidebarIconData,
|
|
1616
1686
|
title: t('editProfile.items.username.title') || 'Username',
|
|
1617
1687
|
subtitle: username || t('editProfile.items.username.choose') || 'Choose a username',
|
|
1618
|
-
onPress:
|
|
1688
|
+
onPress: handleOpenUsernameModal
|
|
1619
1689
|
}, {
|
|
1620
1690
|
id: 'email',
|
|
1621
|
-
icon: '
|
|
1622
|
-
iconColor:
|
|
1691
|
+
icon: 'email-outline',
|
|
1692
|
+
iconColor: colors.sidebarIconSecurity,
|
|
1623
1693
|
title: t('editProfile.items.email.title') || 'Email',
|
|
1624
1694
|
subtitle: email || t('editProfile.items.email.add') || 'Add your email address',
|
|
1625
|
-
onPress:
|
|
1626
|
-
}]
|
|
1627
|
-
theme: theme
|
|
1695
|
+
onPress: handleOpenEmailModal
|
|
1696
|
+
}]
|
|
1628
1697
|
})
|
|
1629
1698
|
})]
|
|
1630
1699
|
}), /*#__PURE__*/_jsxs(View, {
|
|
@@ -1638,7 +1707,7 @@ const AccountSettingsScreen = ({
|
|
|
1638
1707
|
},
|
|
1639
1708
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
1640
1709
|
style: [styles.sectionTitle, {
|
|
1641
|
-
color:
|
|
1710
|
+
color: colors.secondaryText
|
|
1642
1711
|
}],
|
|
1643
1712
|
children: t('editProfile.sections.about') || 'ABOUT YOU'
|
|
1644
1713
|
}), /*#__PURE__*/_jsx(View, {
|
|
@@ -1646,87 +1715,34 @@ const AccountSettingsScreen = ({
|
|
|
1646
1715
|
children: /*#__PURE__*/_jsx(GroupedSection, {
|
|
1647
1716
|
items: [{
|
|
1648
1717
|
id: 'bio',
|
|
1649
|
-
icon: '
|
|
1650
|
-
iconColor:
|
|
1718
|
+
icon: 'text-box-outline',
|
|
1719
|
+
iconColor: colors.sidebarIconPersonalInfo,
|
|
1651
1720
|
title: t('editProfile.items.bio.title') || 'Bio',
|
|
1652
1721
|
subtitle: bio || t('editProfile.items.bio.placeholder') || 'Tell people about yourself',
|
|
1653
|
-
onPress:
|
|
1722
|
+
onPress: handleOpenBioModal
|
|
1654
1723
|
}, {
|
|
1655
1724
|
id: 'locations',
|
|
1656
|
-
icon: '
|
|
1657
|
-
iconColor:
|
|
1725
|
+
icon: 'map-marker-outline',
|
|
1726
|
+
iconColor: colors.sidebarIconSharing,
|
|
1658
1727
|
title: t('editProfile.items.locations.title') || 'Locations',
|
|
1659
|
-
subtitle:
|
|
1660
|
-
count:
|
|
1661
|
-
}) || `${
|
|
1662
|
-
count:
|
|
1663
|
-
}) || `${
|
|
1664
|
-
onPress:
|
|
1665
|
-
customContentBelow: tempLocations.length > 0 && /*#__PURE__*/_jsxs(View, {
|
|
1666
|
-
style: styles.linksPreviewContainer,
|
|
1667
|
-
children: [tempLocations.slice(0, 2).map((location, index) => /*#__PURE__*/_jsxs(View, {
|
|
1668
|
-
style: styles.linkPreviewItem,
|
|
1669
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
1670
|
-
style: styles.linkPreviewImage,
|
|
1671
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
1672
|
-
style: styles.linkPreviewImageText,
|
|
1673
|
-
children: location.name.charAt(0).toUpperCase()
|
|
1674
|
-
})
|
|
1675
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1676
|
-
style: styles.linkPreviewContent,
|
|
1677
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
1678
|
-
style: styles.linkPreviewTitle,
|
|
1679
|
-
numberOfLines: 1,
|
|
1680
|
-
children: location.name
|
|
1681
|
-
}), location.label && /*#__PURE__*/_jsx(Text, {
|
|
1682
|
-
style: styles.linkPreviewSubtitle,
|
|
1683
|
-
children: location.label
|
|
1684
|
-
})]
|
|
1685
|
-
})]
|
|
1686
|
-
}, location.id || index)), tempLocations.length > 2 && /*#__PURE__*/_jsxs(Text, {
|
|
1687
|
-
style: styles.linkPreviewMore,
|
|
1688
|
-
children: ["+", tempLocations.length - 2, " more"]
|
|
1689
|
-
})]
|
|
1690
|
-
})
|
|
1728
|
+
subtitle: locations.length > 0 ? locations.length === 1 ? t('editProfile.items.locations.count', {
|
|
1729
|
+
count: locations.length
|
|
1730
|
+
}) || `${locations.length} location added` : t('editProfile.items.locations.count_plural', {
|
|
1731
|
+
count: locations.length
|
|
1732
|
+
}) || `${locations.length} locations added` : t('editProfile.items.locations.add') || 'Add your locations',
|
|
1733
|
+
onPress: handleOpenLocationModal
|
|
1691
1734
|
}, {
|
|
1692
1735
|
id: 'links',
|
|
1693
|
-
icon: 'link',
|
|
1694
|
-
iconColor:
|
|
1736
|
+
icon: 'link-variant',
|
|
1737
|
+
iconColor: colors.sidebarIconSharing,
|
|
1695
1738
|
title: t('editProfile.items.links.title') || 'Links',
|
|
1696
|
-
subtitle:
|
|
1697
|
-
count:
|
|
1698
|
-
}) || `${
|
|
1699
|
-
count:
|
|
1700
|
-
}) || `${
|
|
1701
|
-
onPress:
|
|
1702
|
-
|
|
1703
|
-
customContentBelow: tempLinksWithMetadata.length > 0 && /*#__PURE__*/_jsxs(View, {
|
|
1704
|
-
style: styles.linksPreviewContainer,
|
|
1705
|
-
children: [tempLinksWithMetadata.slice(0, 2).map((link, index) => /*#__PURE__*/_jsxs(View, {
|
|
1706
|
-
style: styles.linkPreviewItem,
|
|
1707
|
-
children: [link.image ? /*#__PURE__*/_jsx(Image, {
|
|
1708
|
-
source: {
|
|
1709
|
-
uri: link.image
|
|
1710
|
-
},
|
|
1711
|
-
style: styles.linkPreviewImage
|
|
1712
|
-
}) : /*#__PURE__*/_jsx(View, {
|
|
1713
|
-
style: styles.linkPreviewImage,
|
|
1714
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
1715
|
-
style: styles.linkPreviewImageText,
|
|
1716
|
-
children: link.title?.charAt(0).toUpperCase() || link.url.charAt(0).toUpperCase()
|
|
1717
|
-
})
|
|
1718
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1719
|
-
style: styles.linkPreviewTitle,
|
|
1720
|
-
numberOfLines: 1,
|
|
1721
|
-
children: link.title || link.url
|
|
1722
|
-
})]
|
|
1723
|
-
}, link.id || index)), tempLinksWithMetadata.length > 2 && /*#__PURE__*/_jsxs(Text, {
|
|
1724
|
-
style: styles.linkPreviewMore,
|
|
1725
|
-
children: ["+", tempLinksWithMetadata.length - 2, " more"]
|
|
1726
|
-
})]
|
|
1727
|
-
})
|
|
1728
|
-
}],
|
|
1729
|
-
theme: theme
|
|
1739
|
+
subtitle: linksMetadata.length > 0 ? linksMetadata.length === 1 ? t('editProfile.items.links.count', {
|
|
1740
|
+
count: linksMetadata.length
|
|
1741
|
+
}) || `${linksMetadata.length} link added` : t('editProfile.items.links.count_plural', {
|
|
1742
|
+
count: linksMetadata.length
|
|
1743
|
+
}) || `${linksMetadata.length} links added` : t('editProfile.items.links.add') || 'Add your links',
|
|
1744
|
+
onPress: handleOpenLinksModal
|
|
1745
|
+
}]
|
|
1730
1746
|
})
|
|
1731
1747
|
})]
|
|
1732
1748
|
}), /*#__PURE__*/_jsxs(View, {
|
|
@@ -1740,7 +1756,7 @@ const AccountSettingsScreen = ({
|
|
|
1740
1756
|
},
|
|
1741
1757
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
1742
1758
|
style: [styles.sectionTitle, {
|
|
1743
|
-
color:
|
|
1759
|
+
color: colors.secondaryText
|
|
1744
1760
|
}],
|
|
1745
1761
|
children: t('editProfile.sections.quickActions') || 'QUICK ACTIONS'
|
|
1746
1762
|
}), /*#__PURE__*/_jsx(View, {
|
|
@@ -1749,7 +1765,7 @@ const AccountSettingsScreen = ({
|
|
|
1749
1765
|
items: [{
|
|
1750
1766
|
id: 'preview-profile',
|
|
1751
1767
|
icon: 'eye',
|
|
1752
|
-
iconColor:
|
|
1768
|
+
iconColor: colors.sidebarIconHome,
|
|
1753
1769
|
title: t('editProfile.items.previewProfile.title') || 'Preview Profile',
|
|
1754
1770
|
subtitle: t('editProfile.items.previewProfile.subtitle') || 'See how your profile looks to others',
|
|
1755
1771
|
onPress: () => navigate?.('Profile', {
|
|
@@ -1757,20 +1773,19 @@ const AccountSettingsScreen = ({
|
|
|
1757
1773
|
})
|
|
1758
1774
|
}, {
|
|
1759
1775
|
id: 'privacy-settings',
|
|
1760
|
-
icon: 'shield-
|
|
1761
|
-
iconColor:
|
|
1776
|
+
icon: 'shield-check',
|
|
1777
|
+
iconColor: colors.sidebarIconSecurity,
|
|
1762
1778
|
title: t('editProfile.items.privacySettings.title') || 'Privacy Settings',
|
|
1763
1779
|
subtitle: t('editProfile.items.privacySettings.subtitle') || 'Control who can see your profile',
|
|
1764
1780
|
onPress: () => navigate?.('PrivacySettings')
|
|
1765
1781
|
}, {
|
|
1766
1782
|
id: 'verify-account',
|
|
1767
|
-
icon: '
|
|
1768
|
-
iconColor:
|
|
1783
|
+
icon: 'check-circle',
|
|
1784
|
+
iconColor: colors.sidebarIconPersonalInfo,
|
|
1769
1785
|
title: t('editProfile.items.verifyAccount.title') || 'Verify Account',
|
|
1770
1786
|
subtitle: t('editProfile.items.verifyAccount.subtitle') || 'Get a verified badge',
|
|
1771
1787
|
onPress: () => navigate?.('AccountVerification')
|
|
1772
|
-
}]
|
|
1773
|
-
theme: theme
|
|
1788
|
+
}]
|
|
1774
1789
|
})
|
|
1775
1790
|
})]
|
|
1776
1791
|
}), /*#__PURE__*/_jsxs(View, {
|
|
@@ -1784,7 +1799,7 @@ const AccountSettingsScreen = ({
|
|
|
1784
1799
|
},
|
|
1785
1800
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
1786
1801
|
style: [styles.sectionTitle, {
|
|
1787
|
-
color:
|
|
1802
|
+
color: colors.secondaryText
|
|
1788
1803
|
}],
|
|
1789
1804
|
children: t('editProfile.sections.security') || 'SECURITY'
|
|
1790
1805
|
}), /*#__PURE__*/_jsx(View, {
|
|
@@ -1792,35 +1807,107 @@ const AccountSettingsScreen = ({
|
|
|
1792
1807
|
children: /*#__PURE__*/_jsx(GroupedSection, {
|
|
1793
1808
|
items: [{
|
|
1794
1809
|
id: 'two-factor',
|
|
1795
|
-
icon: 'shield-
|
|
1796
|
-
iconColor:
|
|
1810
|
+
icon: 'shield-lock',
|
|
1811
|
+
iconColor: colors.sidebarIconSecurity,
|
|
1797
1812
|
title: t('editProfile.items.twoFactor.title') || 'Two‑Factor Authentication',
|
|
1798
1813
|
subtitle: user?.privacySettings?.twoFactorEnabled ? t('editProfile.items.twoFactor.enabled') || 'Enabled' : t('editProfile.items.twoFactor.disabled') || 'Disabled (recommended)',
|
|
1799
|
-
onPress:
|
|
1800
|
-
}]
|
|
1801
|
-
theme: theme
|
|
1814
|
+
onPress: handleOpenTwoFactorModal
|
|
1815
|
+
}]
|
|
1802
1816
|
})
|
|
1803
1817
|
})]
|
|
1804
1818
|
})]
|
|
1805
1819
|
})
|
|
1820
|
+
}), /*#__PURE__*/_jsx(EditDisplayNameModal, {
|
|
1821
|
+
visible: showEditDisplayNameModal,
|
|
1822
|
+
onClose: () => setShowEditDisplayNameModal(false),
|
|
1823
|
+
initialDisplayName: displayName,
|
|
1824
|
+
initialLastName: lastName,
|
|
1825
|
+
theme: normalizedTheme,
|
|
1826
|
+
onSave: handleModalSave
|
|
1827
|
+
}), /*#__PURE__*/_jsx(EditUsernameModal, {
|
|
1828
|
+
visible: showEditUsernameModal,
|
|
1829
|
+
onClose: () => setShowEditUsernameModal(false),
|
|
1830
|
+
initialValue: username,
|
|
1831
|
+
theme: normalizedTheme,
|
|
1832
|
+
onSave: handleModalSave
|
|
1833
|
+
}), /*#__PURE__*/_jsx(EditEmailModal, {
|
|
1834
|
+
visible: showEditEmailModal,
|
|
1835
|
+
onClose: () => setShowEditEmailModal(false),
|
|
1836
|
+
initialValue: email,
|
|
1837
|
+
theme: normalizedTheme,
|
|
1838
|
+
onSave: handleModalSave
|
|
1839
|
+
}), /*#__PURE__*/_jsx(EditBioModal, {
|
|
1840
|
+
visible: showEditBioModal,
|
|
1841
|
+
onClose: () => setShowEditBioModal(false),
|
|
1842
|
+
initialValue: bio,
|
|
1843
|
+
theme: normalizedTheme,
|
|
1844
|
+
onSave: handleModalSave
|
|
1845
|
+
}), /*#__PURE__*/_jsx(EditLocationModal, {
|
|
1846
|
+
visible: showEditLocationModal,
|
|
1847
|
+
onClose: () => setShowEditLocationModal(false),
|
|
1848
|
+
initialLocations: locations,
|
|
1849
|
+
theme: normalizedTheme,
|
|
1850
|
+
onSave: handleModalSave
|
|
1851
|
+
}), /*#__PURE__*/_jsx(EditLinksModal, {
|
|
1852
|
+
visible: showEditLinksModal,
|
|
1853
|
+
onClose: () => setShowEditLinksModal(false),
|
|
1854
|
+
initialLinks: linksMetadata,
|
|
1855
|
+
theme: normalizedTheme,
|
|
1856
|
+
onSave: handleModalSave
|
|
1857
|
+
}), /*#__PURE__*/_jsx(TwoFactorSetupModal, {
|
|
1858
|
+
visible: showTwoFactorModal,
|
|
1859
|
+
onClose: () => setShowTwoFactorModal(false),
|
|
1860
|
+
isEnabled: !!user?.privacySettings?.twoFactorEnabled,
|
|
1861
|
+
theme: normalizedTheme
|
|
1806
1862
|
})]
|
|
1807
1863
|
});
|
|
1808
1864
|
};
|
|
1809
1865
|
const styles = StyleSheet.create({
|
|
1810
1866
|
container: {
|
|
1811
|
-
|
|
1867
|
+
flexShrink: 1,
|
|
1868
|
+
width: '100%'
|
|
1812
1869
|
},
|
|
1813
1870
|
content: {
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1871
|
+
flexShrink: 1
|
|
1872
|
+
},
|
|
1873
|
+
scrollView: {
|
|
1874
|
+
flexShrink: 1
|
|
1817
1875
|
},
|
|
1818
1876
|
contentEditing: {
|
|
1819
1877
|
flex: 1,
|
|
1820
1878
|
padding: 0
|
|
1821
1879
|
},
|
|
1880
|
+
scrollContent: createScreenContentStyle(HEADER_PADDING_TOP_SETTINGS),
|
|
1881
|
+
headerContainer: {
|
|
1882
|
+
width: '100%',
|
|
1883
|
+
maxWidth: 420,
|
|
1884
|
+
alignSelf: 'center',
|
|
1885
|
+
marginBottom: SECTION_GAP_LARGE
|
|
1886
|
+
},
|
|
1887
|
+
headerSection: {
|
|
1888
|
+
alignItems: 'flex-start',
|
|
1889
|
+
width: '100%',
|
|
1890
|
+
gap: COMPONENT_GAP
|
|
1891
|
+
},
|
|
1892
|
+
modernTitle: {
|
|
1893
|
+
fontFamily: fontFamilies.phuduBold,
|
|
1894
|
+
fontWeight: Platform.OS === 'web' ? 'bold' : undefined,
|
|
1895
|
+
fontSize: 42,
|
|
1896
|
+
lineHeight: 50.4,
|
|
1897
|
+
// 42 * 1.2
|
|
1898
|
+
textAlign: 'left',
|
|
1899
|
+
letterSpacing: -0.5
|
|
1900
|
+
},
|
|
1901
|
+
modernSubtitle: {
|
|
1902
|
+
fontSize: 18,
|
|
1903
|
+
lineHeight: 24,
|
|
1904
|
+
textAlign: 'left',
|
|
1905
|
+
maxWidth: 320,
|
|
1906
|
+
alignSelf: 'flex-start',
|
|
1907
|
+
opacity: 0.8
|
|
1908
|
+
},
|
|
1822
1909
|
section: {
|
|
1823
|
-
marginBottom:
|
|
1910
|
+
marginBottom: SECTION_GAP_LARGE
|
|
1824
1911
|
},
|
|
1825
1912
|
sectionTitle: {
|
|
1826
1913
|
fontSize: 13,
|
|
@@ -1828,13 +1915,11 @@ const styles = StyleSheet.create({
|
|
|
1828
1915
|
color: '#8E8E93',
|
|
1829
1916
|
marginBottom: 8,
|
|
1830
1917
|
marginTop: 4,
|
|
1831
|
-
marginHorizontal: 16,
|
|
1832
1918
|
textTransform: 'uppercase',
|
|
1833
1919
|
letterSpacing: 0.5,
|
|
1834
1920
|
fontFamily: fontFamilies.phuduSemiBold
|
|
1835
1921
|
},
|
|
1836
1922
|
groupedSectionWrapper: {
|
|
1837
|
-
marginHorizontal: 16,
|
|
1838
1923
|
backgroundColor: 'transparent'
|
|
1839
1924
|
},
|
|
1840
1925
|
userIcon: {
|
|
@@ -1899,7 +1984,7 @@ const styles = StyleSheet.create({
|
|
|
1899
1984
|
alignItems: 'center',
|
|
1900
1985
|
justifyContent: 'center',
|
|
1901
1986
|
gap: 8,
|
|
1902
|
-
backgroundColor
|
|
1987
|
+
// backgroundColor should be applied inline using colors.iconSecurity
|
|
1903
1988
|
paddingVertical: 12,
|
|
1904
1989
|
paddingHorizontal: 16,
|
|
1905
1990
|
borderRadius: 10
|
|
@@ -2046,7 +2131,7 @@ const styles = StyleSheet.create({
|
|
|
2046
2131
|
color: '#6C757D'
|
|
2047
2132
|
},
|
|
2048
2133
|
addButton: {
|
|
2049
|
-
backgroundColor
|
|
2134
|
+
// backgroundColor should be applied inline using colors.iconSecurity
|
|
2050
2135
|
},
|
|
2051
2136
|
addButtonText: {
|
|
2052
2137
|
fontSize: 14,
|
|
@@ -2067,7 +2152,7 @@ const styles = StyleSheet.create({
|
|
|
2067
2152
|
addLinkTriggerText: {
|
|
2068
2153
|
fontSize: 14,
|
|
2069
2154
|
fontWeight: '600',
|
|
2070
|
-
color
|
|
2155
|
+
// color should be applied inline using colors.iconSecurity
|
|
2071
2156
|
marginLeft: 6
|
|
2072
2157
|
},
|
|
2073
2158
|
linksList: {
|
|
@@ -2164,7 +2249,7 @@ const styles = StyleSheet.create({
|
|
|
2164
2249
|
width: 32,
|
|
2165
2250
|
height: 32,
|
|
2166
2251
|
borderRadius: 16,
|
|
2167
|
-
backgroundColor
|
|
2252
|
+
// backgroundColor should be applied inline using colors.iconSecurity
|
|
2168
2253
|
alignItems: 'center',
|
|
2169
2254
|
justifyContent: 'center',
|
|
2170
2255
|
marginRight: 8
|
|
@@ -2176,7 +2261,7 @@ const styles = StyleSheet.create({
|
|
|
2176
2261
|
},
|
|
2177
2262
|
fetchingText: {
|
|
2178
2263
|
fontSize: 12,
|
|
2179
|
-
color
|
|
2264
|
+
// color should be applied inline using colors.iconSecurity
|
|
2180
2265
|
fontStyle: 'italic'
|
|
2181
2266
|
},
|
|
2182
2267
|
linksFieldContent: {
|
|
@@ -2201,7 +2286,7 @@ const styles = StyleSheet.create({
|
|
|
2201
2286
|
width: 20,
|
|
2202
2287
|
height: 20,
|
|
2203
2288
|
borderRadius: 10,
|
|
2204
|
-
backgroundColor
|
|
2289
|
+
// backgroundColor should be applied inline using colors.iconSecurity
|
|
2205
2290
|
alignItems: 'center',
|
|
2206
2291
|
justifyContent: 'center',
|
|
2207
2292
|
marginRight: 6
|
|
@@ -2242,7 +2327,7 @@ const styles = StyleSheet.create({
|
|
|
2242
2327
|
},
|
|
2243
2328
|
searchingText: {
|
|
2244
2329
|
fontSize: 12,
|
|
2245
|
-
color
|
|
2330
|
+
// color should be applied inline using colors.iconSecurity
|
|
2246
2331
|
fontStyle: 'italic'
|
|
2247
2332
|
},
|
|
2248
2333
|
addLocationInputContainer: {
|
|
@@ -2283,7 +2368,7 @@ const styles = StyleSheet.create({
|
|
|
2283
2368
|
addLocationTriggerText: {
|
|
2284
2369
|
marginLeft: 8,
|
|
2285
2370
|
fontSize: 16,
|
|
2286
|
-
color
|
|
2371
|
+
// color should be applied inline using colors.iconSecurity
|
|
2287
2372
|
fontWeight: '500'
|
|
2288
2373
|
},
|
|
2289
2374
|
searchResults: {
|
|
@@ -2347,7 +2432,7 @@ const styles = StyleSheet.create({
|
|
|
2347
2432
|
flex: 1
|
|
2348
2433
|
},
|
|
2349
2434
|
locationLabel: {
|
|
2350
|
-
backgroundColor
|
|
2435
|
+
// backgroundColor should be applied inline using colors.iconSecurity
|
|
2351
2436
|
paddingHorizontal: 6,
|
|
2352
2437
|
paddingVertical: 2,
|
|
2353
2438
|
borderRadius: 4,
|