@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
|
@@ -12,20 +12,44 @@ import {
|
|
|
12
12
|
Platform,
|
|
13
13
|
Image,
|
|
14
14
|
} from 'react-native';
|
|
15
|
-
import type { BaseScreenProps } from '../navigation
|
|
16
|
-
import { useOxy } from '../context/OxyContext';
|
|
15
|
+
import type { BaseScreenProps } from '../types/navigation';
|
|
17
16
|
import Avatar from '../components/Avatar';
|
|
18
17
|
import type { FileMetadata } from '../../models/interfaces';
|
|
19
18
|
import OxyIcon from '../components/icon/OxyIcon';
|
|
20
19
|
import { Ionicons } from '@expo/vector-icons';
|
|
20
|
+
// @ts-ignore - MaterialCommunityIcons is available at runtime
|
|
21
|
+
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
21
22
|
import { toast } from '../../lib/sonner';
|
|
22
23
|
import { fontFamilies } from '../styles/fonts';
|
|
23
24
|
import { confirmAction } from '../utils/confirmAction';
|
|
24
25
|
import { useAuthStore } from '../stores/authStore';
|
|
25
|
-
import { Header, GroupedSection } from '../components';
|
|
26
|
+
import { Header, GroupedSection, Section } from '../components';
|
|
26
27
|
import { useI18n } from '../hooks/useI18n';
|
|
27
|
-
import
|
|
28
|
+
import { useThemeStyles } from '../hooks/useThemeStyles';
|
|
29
|
+
import { useColorScheme } from '../hooks/use-color-scheme';
|
|
30
|
+
import { Colors } from '../constants/theme';
|
|
31
|
+
import { normalizeColorScheme, normalizeTheme } from '../utils/themeUtils';
|
|
32
|
+
import { useHapticPress } from '../hooks/use-haptic-press';
|
|
33
|
+
import { EditDisplayNameModal } from '../components/profile/EditDisplayNameModal';
|
|
34
|
+
import { EditUsernameModal } from '../components/profile/EditUsernameModal';
|
|
35
|
+
import { EditEmailModal } from '../components/profile/EditEmailModal';
|
|
36
|
+
import { EditBioModal } from '../components/profile/EditBioModal';
|
|
37
|
+
import { EditLocationModal } from '../components/profile/EditLocationModal';
|
|
38
|
+
import { EditLinksModal } from '../components/profile/EditLinksModal';
|
|
39
|
+
import { TwoFactorSetupModal } from '../components/profile/TwoFactorSetupModal';
|
|
40
|
+
import { getDisplayName } from '../utils/user-utils';
|
|
28
41
|
import { TTLCache, registerCacheForCleanup } from '../../utils/cache';
|
|
42
|
+
import QRCode from 'react-native-qrcode-svg';
|
|
43
|
+
import { useOxy } from '../context/OxyContext';
|
|
44
|
+
import {
|
|
45
|
+
SCREEN_PADDING_HORIZONTAL,
|
|
46
|
+
SCREEN_PADDING_VERTICAL,
|
|
47
|
+
SECTION_GAP,
|
|
48
|
+
SECTION_GAP_LARGE,
|
|
49
|
+
COMPONENT_GAP,
|
|
50
|
+
HEADER_PADDING_TOP_SETTINGS,
|
|
51
|
+
createScreenContentStyle,
|
|
52
|
+
} from '../constants/spacing';
|
|
29
53
|
|
|
30
54
|
// Caches for link metadata and location searches
|
|
31
55
|
const linkMetadataCache = new TTLCache<any>(30 * 60 * 1000); // 30 minutes cache for link metadata
|
|
@@ -33,6 +57,7 @@ const locationSearchCache = new TTLCache<any[]>(60 * 60 * 1000); // 1 hour cache
|
|
|
33
57
|
registerCacheForCleanup(linkMetadataCache);
|
|
34
58
|
registerCacheForCleanup(locationSearchCache);
|
|
35
59
|
|
|
60
|
+
|
|
36
61
|
const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string; initialSection?: string }> = ({
|
|
37
62
|
onClose,
|
|
38
63
|
theme,
|
|
@@ -40,9 +65,18 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
40
65
|
navigate,
|
|
41
66
|
initialField,
|
|
42
67
|
initialSection,
|
|
68
|
+
scrollTo,
|
|
43
69
|
}) => {
|
|
44
|
-
|
|
70
|
+
// Use useOxy() hook for OxyContext values
|
|
71
|
+
const {
|
|
72
|
+
user: userFromContext,
|
|
73
|
+
oxyServices,
|
|
74
|
+
isLoading: authLoading,
|
|
75
|
+
isAuthenticated,
|
|
76
|
+
activeSessionId,
|
|
77
|
+
} = useOxy();
|
|
45
78
|
const { t } = useI18n();
|
|
79
|
+
const normalizedTheme = normalizeTheme(theme);
|
|
46
80
|
const updateUser = useAuthStore((state) => state.updateUser);
|
|
47
81
|
// Get user directly from store to ensure reactivity to avatar changes
|
|
48
82
|
const user = useAuthStore((state) => state.user) || userFromContext;
|
|
@@ -53,14 +87,14 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
53
87
|
const scrollViewRef = useRef<ScrollView>(null);
|
|
54
88
|
const avatarSectionRef = useRef<View>(null);
|
|
55
89
|
const [avatarSectionY, setAvatarSectionY] = useState<number | null>(null);
|
|
56
|
-
|
|
90
|
+
|
|
57
91
|
// Section refs for navigation
|
|
58
92
|
const profilePictureSectionRef = useRef<View>(null);
|
|
59
93
|
const basicInfoSectionRef = useRef<View>(null);
|
|
60
94
|
const aboutSectionRef = useRef<View>(null);
|
|
61
95
|
const quickActionsSectionRef = useRef<View>(null);
|
|
62
96
|
const securitySectionRef = useRef<View>(null);
|
|
63
|
-
|
|
97
|
+
|
|
64
98
|
// Section Y positions for scrolling
|
|
65
99
|
const [profilePictureSectionY, setProfilePictureSectionY] = useState<number | null>(null);
|
|
66
100
|
const [basicInfoSectionY, setBasicInfoSectionY] = useState<number | null>(null);
|
|
@@ -89,9 +123,32 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
89
123
|
const [links, setLinks] = useState<string[]>([]);
|
|
90
124
|
const [avatarFileId, setAvatarFileId] = useState('');
|
|
91
125
|
|
|
92
|
-
//
|
|
93
|
-
const [
|
|
126
|
+
// Modal visibility states
|
|
127
|
+
const [showEditDisplayNameModal, setShowEditDisplayNameModal] = useState(false);
|
|
128
|
+
const [showEditUsernameModal, setShowEditUsernameModal] = useState(false);
|
|
129
|
+
const [showEditEmailModal, setShowEditEmailModal] = useState(false);
|
|
130
|
+
const [showEditBioModal, setShowEditBioModal] = useState(false);
|
|
131
|
+
const [showEditLocationModal, setShowEditLocationModal] = useState(false);
|
|
132
|
+
const [showEditLinksModal, setShowEditLinksModal] = useState(false);
|
|
133
|
+
const [showTwoFactorModal, setShowTwoFactorModal] = useState(false);
|
|
134
|
+
|
|
135
|
+
// Location and links state (for display only - modals handle editing)
|
|
136
|
+
const [locations, setLocations] = useState<Array<{
|
|
137
|
+
id: string;
|
|
138
|
+
name: string;
|
|
139
|
+
label?: string;
|
|
140
|
+
coordinates?: { lat: number; lon: number };
|
|
141
|
+
}>>([]);
|
|
142
|
+
const [linksMetadata, setLinksMetadata] = useState<Array<{
|
|
143
|
+
url: string;
|
|
144
|
+
title?: string;
|
|
145
|
+
description?: string;
|
|
146
|
+
image?: string;
|
|
147
|
+
id: string;
|
|
148
|
+
}>>([]);
|
|
94
149
|
|
|
150
|
+
// State for inline editing (used by old renderEditingField code)
|
|
151
|
+
const [editingField, setEditingField] = useState<string | null>(null);
|
|
95
152
|
const [tempDisplayName, setTempDisplayName] = useState('');
|
|
96
153
|
const [tempLastName, setTempLastName] = useState('');
|
|
97
154
|
const [tempUsername, setTempUsername] = useState('');
|
|
@@ -99,6 +156,12 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
99
156
|
const [tempBio, setTempBio] = useState('');
|
|
100
157
|
const [tempLocation, setTempLocation] = useState('');
|
|
101
158
|
const [tempLinks, setTempLinks] = useState<string[]>([]);
|
|
159
|
+
const [tempLocations, setTempLocations] = useState<Array<{
|
|
160
|
+
id: string;
|
|
161
|
+
name: string;
|
|
162
|
+
label?: string;
|
|
163
|
+
coordinates?: { lat: number; lon: number };
|
|
164
|
+
}>>([]);
|
|
102
165
|
const [tempLinksWithMetadata, setTempLinksWithMetadata] = useState<Array<{
|
|
103
166
|
url: string;
|
|
104
167
|
title?: string;
|
|
@@ -106,37 +169,27 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
106
169
|
image?: string;
|
|
107
170
|
id: string;
|
|
108
171
|
}>>([]);
|
|
172
|
+
const [isAddingLocation, setIsAddingLocation] = useState(false);
|
|
173
|
+
const [isSearchingLocations, setIsSearchingLocations] = useState(false);
|
|
174
|
+
const [locationSearchResults, setLocationSearchResults] = useState<any[]>([]);
|
|
175
|
+
const [newLocationQuery, setNewLocationQuery] = useState('');
|
|
109
176
|
const [isAddingLink, setIsAddingLink] = useState(false);
|
|
110
|
-
const [newLinkUrl, setNewLinkUrl] = useState('');
|
|
111
177
|
const [isFetchingMetadata, setIsFetchingMetadata] = useState(false);
|
|
178
|
+
const [newLinkUrl, setNewLinkUrl] = useState('');
|
|
112
179
|
|
|
113
|
-
//
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
label?: string;
|
|
118
|
-
coordinates?: { lat: number; lon: number };
|
|
119
|
-
}>>([]);
|
|
120
|
-
const [isAddingLocation, setIsAddingLocation] = useState(false);
|
|
121
|
-
const [newLocationQuery, setNewLocationQuery] = useState('');
|
|
122
|
-
const [locationSearchResults, setLocationSearchResults] = useState<Array<{
|
|
123
|
-
place_id: number;
|
|
124
|
-
display_name: string;
|
|
125
|
-
lat: string;
|
|
126
|
-
lon: string;
|
|
127
|
-
type: string;
|
|
128
|
-
}>>([]);
|
|
129
|
-
const [isSearchingLocations, setIsSearchingLocations] = useState(false);
|
|
180
|
+
// Get theme colors using centralized hook
|
|
181
|
+
const colorScheme = useColorScheme();
|
|
182
|
+
const themeStyles = useThemeStyles(theme || 'light', colorScheme);
|
|
183
|
+
const handlePressIn = useHapticPress();
|
|
130
184
|
|
|
131
|
-
//
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}, [theme]);
|
|
185
|
+
// Extract colors for convenience - ensure it's always defined
|
|
186
|
+
// useThemeStyles always returns colors, but add safety check for edge cases
|
|
187
|
+
const colors = themeStyles.colors || Colors[normalizeColorScheme(colorScheme, theme || 'light')];
|
|
188
|
+
|
|
189
|
+
// Memoize onBack handler to provide stable reference for Reanimated
|
|
190
|
+
const handleBack = useMemo(() => {
|
|
191
|
+
return goBack || onClose || undefined;
|
|
192
|
+
}, [goBack, onClose]);
|
|
140
193
|
|
|
141
194
|
// Memoize animation function to prevent recreation on every render
|
|
142
195
|
const animateSaveButton = useCallback((toValue: number, onComplete?: () => void) => {
|
|
@@ -184,7 +237,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
184
237
|
|
|
185
238
|
// Handle locations - convert single location to array format
|
|
186
239
|
if (user.locations && Array.isArray(user.locations)) {
|
|
187
|
-
|
|
240
|
+
setLocations(user.locations.map((loc, index) => ({
|
|
188
241
|
id: loc.id || `existing-${index}`,
|
|
189
242
|
name: loc.name,
|
|
190
243
|
label: loc.label,
|
|
@@ -192,13 +245,13 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
192
245
|
})));
|
|
193
246
|
} else if (user.location) {
|
|
194
247
|
// Convert single location string to array format
|
|
195
|
-
|
|
248
|
+
setLocations([{
|
|
196
249
|
id: 'existing-0',
|
|
197
250
|
name: user.location,
|
|
198
251
|
label: 'Location'
|
|
199
252
|
}]);
|
|
200
253
|
} else {
|
|
201
|
-
|
|
254
|
+
setLocations([]);
|
|
202
255
|
}
|
|
203
256
|
|
|
204
257
|
// Handle links - simple and direct like other fields
|
|
@@ -209,7 +262,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
209
262
|
...link,
|
|
210
263
|
id: link.id || `existing-${index}`
|
|
211
264
|
}));
|
|
212
|
-
|
|
265
|
+
setLinksMetadata(metadataWithIds);
|
|
213
266
|
} else if (Array.isArray(user.links)) {
|
|
214
267
|
const simpleLinks = user.links.map(l => typeof l === 'string' ? l : l.link).filter(Boolean);
|
|
215
268
|
setLinks(simpleLinks);
|
|
@@ -220,10 +273,10 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
220
273
|
image: undefined,
|
|
221
274
|
id: `existing-${index}`
|
|
222
275
|
}));
|
|
223
|
-
|
|
276
|
+
setLinksMetadata(linksWithMetadata);
|
|
224
277
|
} else if (user.website) {
|
|
225
278
|
setLinks([user.website]);
|
|
226
|
-
|
|
279
|
+
setLinksMetadata([{
|
|
227
280
|
url: user.website,
|
|
228
281
|
title: user.website.replace(/^https?:\/\//, '').replace(/\/$/, ''),
|
|
229
282
|
description: `Link to ${user.website}`,
|
|
@@ -232,7 +285,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
232
285
|
}]);
|
|
233
286
|
} else {
|
|
234
287
|
setLinks([]);
|
|
235
|
-
|
|
288
|
+
setLinksMetadata([]);
|
|
236
289
|
}
|
|
237
290
|
isInitializedRef.current = true;
|
|
238
291
|
}
|
|
@@ -262,10 +315,101 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
262
315
|
const hasSetInitialFieldRef = useRef(false);
|
|
263
316
|
const previousInitialFieldRef = useRef<string | undefined>(undefined);
|
|
264
317
|
const initialFieldTimeoutRef = useRef<NodeJS.Timeout | null>(null);
|
|
265
|
-
|
|
318
|
+
|
|
266
319
|
// Delay constant for scroll completion
|
|
267
320
|
const SCROLL_DELAY_MS = 600;
|
|
268
|
-
|
|
321
|
+
|
|
322
|
+
// Helper functions for inline editing (legacy support)
|
|
323
|
+
const startEditing = useCallback((field: string, initialValue: string) => {
|
|
324
|
+
setEditingField(field);
|
|
325
|
+
switch (field) {
|
|
326
|
+
case 'displayName':
|
|
327
|
+
setTempDisplayName(initialValue || displayName);
|
|
328
|
+
setTempLastName(lastName);
|
|
329
|
+
break;
|
|
330
|
+
case 'username':
|
|
331
|
+
setTempUsername(initialValue || username);
|
|
332
|
+
break;
|
|
333
|
+
case 'email':
|
|
334
|
+
setTempEmail(initialValue || email);
|
|
335
|
+
break;
|
|
336
|
+
case 'bio':
|
|
337
|
+
setTempBio(initialValue || bio);
|
|
338
|
+
break;
|
|
339
|
+
case 'location':
|
|
340
|
+
setTempLocations([...locations]);
|
|
341
|
+
break;
|
|
342
|
+
case 'links':
|
|
343
|
+
setTempLinksWithMetadata([...linksMetadata]);
|
|
344
|
+
break;
|
|
345
|
+
case 'twoFactor':
|
|
346
|
+
// No temp state needed for twoFactor
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
}, [displayName, lastName, username, email, bio, locations, linksMetadata]);
|
|
350
|
+
|
|
351
|
+
const cancelEditing = useCallback(() => {
|
|
352
|
+
setEditingField(null);
|
|
353
|
+
setTempDisplayName('');
|
|
354
|
+
setTempLastName('');
|
|
355
|
+
setTempUsername('');
|
|
356
|
+
setTempEmail('');
|
|
357
|
+
setTempBio('');
|
|
358
|
+
setTempLocation('');
|
|
359
|
+
setTempLinks([]);
|
|
360
|
+
setTempLocations([]);
|
|
361
|
+
setTempLinksWithMetadata([]);
|
|
362
|
+
setIsAddingLocation(false);
|
|
363
|
+
setIsSearchingLocations(false);
|
|
364
|
+
setLocationSearchResults([]);
|
|
365
|
+
setNewLocationQuery('');
|
|
366
|
+
setIsAddingLink(false);
|
|
367
|
+
setIsFetchingMetadata(false);
|
|
368
|
+
setNewLinkUrl('');
|
|
369
|
+
}, []);
|
|
370
|
+
|
|
371
|
+
const saveField = useCallback(async (field: string | null) => {
|
|
372
|
+
if (!field) return;
|
|
373
|
+
|
|
374
|
+
setIsSaving(true);
|
|
375
|
+
try {
|
|
376
|
+
switch (field) {
|
|
377
|
+
case 'displayName':
|
|
378
|
+
await updateUser({ name: { first: tempDisplayName, last: tempLastName } }, oxyServices);
|
|
379
|
+
setDisplayName(tempDisplayName);
|
|
380
|
+
setLastName(tempLastName);
|
|
381
|
+
break;
|
|
382
|
+
case 'username':
|
|
383
|
+
await updateUser({ username: tempUsername }, oxyServices);
|
|
384
|
+
setUsername(tempUsername);
|
|
385
|
+
break;
|
|
386
|
+
case 'email':
|
|
387
|
+
await updateUser({ email: tempEmail }, oxyServices);
|
|
388
|
+
setEmail(tempEmail);
|
|
389
|
+
break;
|
|
390
|
+
case 'bio':
|
|
391
|
+
await updateUser({ bio: tempBio }, oxyServices);
|
|
392
|
+
setBio(tempBio);
|
|
393
|
+
break;
|
|
394
|
+
case 'location':
|
|
395
|
+
await updateUser({ locations: tempLocations }, oxyServices);
|
|
396
|
+
setLocations(tempLocations);
|
|
397
|
+
break;
|
|
398
|
+
case 'links':
|
|
399
|
+
await updateUser({ linksMetadata: tempLinksWithMetadata }, oxyServices);
|
|
400
|
+
setLinksMetadata(tempLinksWithMetadata);
|
|
401
|
+
setLinks(tempLinksWithMetadata.map(l => l.url));
|
|
402
|
+
break;
|
|
403
|
+
}
|
|
404
|
+
setEditingField(null);
|
|
405
|
+
toast.success(t('editProfile.toasts.saved') || 'Saved');
|
|
406
|
+
} catch (error: any) {
|
|
407
|
+
toast.error(error?.message || (t('editProfile.toasts.saveFailed') || 'Failed to save'));
|
|
408
|
+
} finally {
|
|
409
|
+
setIsSaving(false);
|
|
410
|
+
}
|
|
411
|
+
}, [tempDisplayName, tempLastName, tempUsername, tempEmail, tempBio, tempLocations, tempLinksWithMetadata, updateUser, oxyServices, t]);
|
|
412
|
+
|
|
269
413
|
// Helper to get current value for a field
|
|
270
414
|
const getFieldCurrentValue = useCallback((field: string): string => {
|
|
271
415
|
switch (field) {
|
|
@@ -290,7 +434,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
290
434
|
const hasScrolledToSectionRef = useRef(false);
|
|
291
435
|
const previousInitialSectionRef = useRef<string | undefined>(undefined);
|
|
292
436
|
const SCROLL_OFFSET = 100; // Offset to show section near top of viewport
|
|
293
|
-
|
|
437
|
+
|
|
294
438
|
// Map section names to their Y positions
|
|
295
439
|
const sectionYPositions = useMemo(() => ({
|
|
296
440
|
profilePicture: profilePictureSectionY,
|
|
@@ -299,7 +443,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
299
443
|
quickActions: quickActionsSectionY,
|
|
300
444
|
security: securitySectionY,
|
|
301
445
|
}), [profilePictureSectionY, basicInfoSectionY, aboutSectionY, quickActionsSectionY, securitySectionY]);
|
|
302
|
-
|
|
446
|
+
|
|
303
447
|
useEffect(() => {
|
|
304
448
|
// If initialSection changed, reset the flag
|
|
305
449
|
if (previousInitialSectionRef.current !== initialSection) {
|
|
@@ -310,14 +454,11 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
310
454
|
// Scroll to the specified section if initialSection is provided and we haven't scrolled yet
|
|
311
455
|
if (initialSection && !hasScrolledToSectionRef.current) {
|
|
312
456
|
const sectionY = sectionYPositions[initialSection as keyof typeof sectionYPositions];
|
|
313
|
-
|
|
314
|
-
if (sectionY !== null && sectionY !== undefined &&
|
|
457
|
+
|
|
458
|
+
if (sectionY !== null && sectionY !== undefined && scrollTo) {
|
|
315
459
|
requestAnimationFrame(() => {
|
|
316
460
|
requestAnimationFrame(() => {
|
|
317
|
-
|
|
318
|
-
y: Math.max(0, sectionY - SCROLL_OFFSET),
|
|
319
|
-
animated: true,
|
|
320
|
-
});
|
|
461
|
+
scrollTo(Math.max(0, sectionY - SCROLL_OFFSET), true);
|
|
321
462
|
hasScrolledToSectionRef.current = true;
|
|
322
463
|
});
|
|
323
464
|
});
|
|
@@ -336,10 +477,10 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
336
477
|
username,
|
|
337
478
|
email,
|
|
338
479
|
bio,
|
|
339
|
-
location:
|
|
340
|
-
locations:
|
|
480
|
+
location: locations.length > 0 ? locations[0].name : '', // Keep backward compatibility
|
|
481
|
+
locations: locations.length > 0 ? locations : undefined,
|
|
341
482
|
links,
|
|
342
|
-
linksMetadata:
|
|
483
|
+
linksMetadata: linksMetadata.length > 0 ? linksMetadata : undefined,
|
|
343
484
|
};
|
|
344
485
|
|
|
345
486
|
// Handle name field
|
|
@@ -378,208 +519,112 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
378
519
|
};
|
|
379
520
|
|
|
380
521
|
const openAvatarPicker = useCallback(() => {
|
|
381
|
-
|
|
382
|
-
|
|
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
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
// This ensures the avatar displays correctly
|
|
431
|
-
setAvatarFileId(file.id);
|
|
432
|
-
|
|
433
|
-
toast.success(t('editProfile.toasts.avatarUpdated') || 'Avatar updated');
|
|
434
|
-
|
|
435
|
-
// Scroll to avatar section after a brief delay to ensure UI is updated
|
|
436
|
-
requestAnimationFrame(() => {
|
|
437
|
-
requestAnimationFrame(() => {
|
|
438
|
-
if (avatarSectionY !== null) {
|
|
439
|
-
scrollViewRef.current?.scrollTo({
|
|
440
|
-
y: Math.max(0, avatarSectionY - 100), // Offset to show section near top
|
|
441
|
-
animated: true,
|
|
442
|
-
});
|
|
443
|
-
} else {
|
|
444
|
-
// Fallback: scroll to approximate position
|
|
445
|
-
scrollViewRef.current?.scrollTo({
|
|
446
|
-
y: 200, // Approximate position of avatar section
|
|
447
|
-
animated: true,
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
});
|
|
451
|
-
});
|
|
452
|
-
} catch (e: any) {
|
|
453
|
-
// Revert optimistic update on error
|
|
454
|
-
setAvatarFileId(typeof user?.avatar === 'string' ? user.avatar : '');
|
|
455
|
-
setOptimisticAvatarId(null);
|
|
456
|
-
toast.error(e.message || t('editProfile.toasts.updateAvatarFailed') || 'Failed to update avatar');
|
|
457
|
-
} finally {
|
|
458
|
-
setIsUpdatingAvatar(false);
|
|
459
|
-
}
|
|
460
|
-
})();
|
|
461
|
-
},
|
|
462
|
-
// Limit to images client-side by using photos view if later exposed
|
|
463
|
-
disabledMimeTypes: ['video/', 'audio/', 'application/pdf']
|
|
522
|
+
toast.info?.(t('editProfile.toasts.avatarPickerUnavailable') || 'Avatar picker is not available in this build.');
|
|
523
|
+
}, [t]);
|
|
524
|
+
|
|
525
|
+
// Handlers to open modals
|
|
526
|
+
const handleOpenDisplayNameModal = useCallback(() => setShowEditDisplayNameModal(true), []);
|
|
527
|
+
const handleOpenUsernameModal = useCallback(() => setShowEditUsernameModal(true), []);
|
|
528
|
+
const handleOpenEmailModal = useCallback(() => setShowEditEmailModal(true), []);
|
|
529
|
+
const handleOpenBioModal = useCallback(() => setShowEditBioModal(true), []);
|
|
530
|
+
const handleOpenLocationModal = useCallback(() => setShowEditLocationModal(true), []);
|
|
531
|
+
const handleOpenLinksModal = useCallback(() => setShowEditLinksModal(true), []);
|
|
532
|
+
const handleOpenTwoFactorModal = useCallback(() => setShowTwoFactorModal(true), []);
|
|
533
|
+
|
|
534
|
+
// Handler to refresh data after modal saves
|
|
535
|
+
// Note: Access user directly from store when invoked to get latest value,
|
|
536
|
+
// not from closure which may be stale after modal saves update the backend
|
|
537
|
+
const handleModalSave = useCallback(() => {
|
|
538
|
+
// Get fresh user data from store to ensure we have the latest values
|
|
539
|
+
// after the modal's save operation updates the backend
|
|
540
|
+
// Read from store directly (not from closure) to avoid stale data
|
|
541
|
+
const currentUser = useAuthStore.getState().user;
|
|
542
|
+
|
|
543
|
+
// Reload user data to reflect changes
|
|
544
|
+
if (currentUser) {
|
|
545
|
+
const userDisplayName = typeof currentUser.name === 'string'
|
|
546
|
+
? currentUser.name
|
|
547
|
+
: currentUser.name?.first || currentUser.name?.full || '';
|
|
548
|
+
const userLastName = typeof currentUser.name === 'object' ? currentUser.name?.last || '' : '';
|
|
549
|
+
setDisplayName(userDisplayName);
|
|
550
|
+
setLastName(userLastName);
|
|
551
|
+
setUsername(currentUser.username || '');
|
|
552
|
+
setEmail(currentUser.email || '');
|
|
553
|
+
setBio(currentUser.bio || '');
|
|
554
|
+
|
|
555
|
+
// Reload locations and links
|
|
556
|
+
if (currentUser.locations && Array.isArray(currentUser.locations)) {
|
|
557
|
+
setLocations(currentUser.locations.map((loc, index) => ({
|
|
558
|
+
id: loc.id || `existing-${index}`,
|
|
559
|
+
name: loc.name,
|
|
560
|
+
label: loc.label,
|
|
561
|
+
coordinates: loc.coordinates
|
|
562
|
+
})));
|
|
563
|
+
} else if (currentUser.location) {
|
|
564
|
+
setLocations([{
|
|
565
|
+
id: 'existing-0',
|
|
566
|
+
name: currentUser.location,
|
|
567
|
+
label: 'Location'
|
|
568
|
+
}]);
|
|
569
|
+
} else {
|
|
570
|
+
setLocations([]);
|
|
464
571
|
}
|
|
465
|
-
});
|
|
466
|
-
}, [showBottomSheet, oxyServices, avatarFileId, updateUser, user]);
|
|
467
572
|
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
break;
|
|
477
|
-
case 'email':
|
|
478
|
-
setTempEmail(currentValue);
|
|
479
|
-
break;
|
|
480
|
-
case 'bio':
|
|
481
|
-
setTempBio(currentValue);
|
|
482
|
-
break;
|
|
483
|
-
case 'location':
|
|
484
|
-
// Don't reset the locations - keep the existing data
|
|
485
|
-
break;
|
|
486
|
-
case 'links':
|
|
487
|
-
// Don't reset the metadata - keep the existing rich metadata
|
|
488
|
-
// The tempLinksWithMetadata should already contain the rich data from the database
|
|
489
|
-
break;
|
|
490
|
-
case 'twoFactor':
|
|
491
|
-
// Reset TOTP temp state
|
|
492
|
-
setTotpSetupUrl(null);
|
|
493
|
-
setTotpCode('');
|
|
494
|
-
break;
|
|
573
|
+
if (currentUser.linksMetadata && Array.isArray(currentUser.linksMetadata)) {
|
|
574
|
+
setLinksMetadata(currentUser.linksMetadata.map((link, index) => ({
|
|
575
|
+
...link,
|
|
576
|
+
id: link.id || `existing-${index}`
|
|
577
|
+
})));
|
|
578
|
+
} else {
|
|
579
|
+
setLinksMetadata([]);
|
|
580
|
+
}
|
|
495
581
|
}
|
|
496
|
-
|
|
497
|
-
}, [displayName, lastName]);
|
|
582
|
+
}, []); // Empty dependency array - callback reads fresh data from store at call time
|
|
498
583
|
|
|
499
|
-
// Handle initialField prop -
|
|
584
|
+
// Handle initialField prop - open appropriate modal
|
|
500
585
|
useEffect(() => {
|
|
501
|
-
|
|
502
|
-
if (initialFieldTimeoutRef.current) {
|
|
503
|
-
clearTimeout(initialFieldTimeoutRef.current);
|
|
504
|
-
initialFieldTimeoutRef.current = null;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
// If initialField changed, reset the flag
|
|
508
|
-
if (previousInitialFieldRef.current !== initialField) {
|
|
509
|
-
hasSetInitialFieldRef.current = false;
|
|
510
|
-
previousInitialFieldRef.current = initialField;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
// Set the editing field if initialField is provided and we haven't set it yet
|
|
514
|
-
if (initialField && !hasSetInitialFieldRef.current) {
|
|
586
|
+
if (initialField) {
|
|
515
587
|
// Special handling for avatar - open avatar picker directly
|
|
516
588
|
if (initialField === 'avatar') {
|
|
517
|
-
|
|
518
|
-
initialFieldTimeoutRef.current = setTimeout(() => {
|
|
589
|
+
setTimeout(() => {
|
|
519
590
|
openAvatarPicker();
|
|
520
|
-
|
|
521
|
-
}, SCROLL_DELAY_MS);
|
|
591
|
+
}, 300);
|
|
522
592
|
} else {
|
|
523
|
-
//
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
593
|
+
// Open appropriate modal
|
|
594
|
+
setTimeout(() => {
|
|
595
|
+
switch (initialField) {
|
|
596
|
+
case 'displayName':
|
|
597
|
+
setShowEditDisplayNameModal(true);
|
|
598
|
+
break;
|
|
599
|
+
case 'username':
|
|
600
|
+
setShowEditUsernameModal(true);
|
|
601
|
+
break;
|
|
602
|
+
case 'email':
|
|
603
|
+
setShowEditEmailModal(true);
|
|
604
|
+
break;
|
|
605
|
+
case 'bio':
|
|
606
|
+
setShowEditBioModal(true);
|
|
607
|
+
break;
|
|
608
|
+
case 'location':
|
|
609
|
+
setShowEditLocationModal(true);
|
|
610
|
+
break;
|
|
611
|
+
case 'links':
|
|
612
|
+
setShowEditLinksModal(true);
|
|
613
|
+
break;
|
|
614
|
+
case 'twoFactor':
|
|
615
|
+
setShowTwoFactorModal(true);
|
|
616
|
+
break;
|
|
617
|
+
}
|
|
618
|
+
}, 300);
|
|
531
619
|
}
|
|
532
620
|
}
|
|
533
|
-
|
|
534
|
-
return () => {
|
|
535
|
-
if (initialFieldTimeoutRef.current) {
|
|
536
|
-
clearTimeout(initialFieldTimeoutRef.current);
|
|
537
|
-
initialFieldTimeoutRef.current = null;
|
|
538
|
-
}
|
|
539
|
-
};
|
|
540
|
-
}, [initialField, getFieldCurrentValue, startEditing, openAvatarPicker]);
|
|
621
|
+
}, [initialField, openAvatarPicker]);
|
|
541
622
|
|
|
542
|
-
const saveField = (type: string) => {
|
|
543
|
-
animateSaveButton(0.95); // Scale down slightly for animation
|
|
544
|
-
|
|
545
|
-
switch (type) {
|
|
546
|
-
case 'displayName':
|
|
547
|
-
setDisplayName(tempDisplayName);
|
|
548
|
-
setLastName(tempLastName);
|
|
549
|
-
break;
|
|
550
|
-
case 'username':
|
|
551
|
-
setUsername(tempUsername);
|
|
552
|
-
break;
|
|
553
|
-
case 'email':
|
|
554
|
-
setEmail(tempEmail);
|
|
555
|
-
break;
|
|
556
|
-
case 'bio':
|
|
557
|
-
setBio(tempBio);
|
|
558
|
-
break;
|
|
559
|
-
case 'location':
|
|
560
|
-
// Locations are handled in the main save function
|
|
561
|
-
break;
|
|
562
|
-
case 'links':
|
|
563
|
-
// Save both URLs and metadata
|
|
564
|
-
setLinks(tempLinksWithMetadata.map(link => link.url));
|
|
565
|
-
// Store full metadata for database
|
|
566
|
-
setTempLinksWithMetadata(tempLinksWithMetadata);
|
|
567
|
-
break;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
// Complete animation, then reset and close editing
|
|
571
|
-
animateSaveButton(1, () => {
|
|
572
|
-
setEditingField(null);
|
|
573
|
-
});
|
|
574
|
-
};
|
|
575
|
-
|
|
576
|
-
const cancelEditing = () => {
|
|
577
|
-
setEditingField(null);
|
|
578
|
-
};
|
|
579
623
|
|
|
580
624
|
|
|
581
625
|
|
|
582
|
-
|
|
626
|
+
// Removed fetchLinkMetadata - now handled by EditLinksModal
|
|
627
|
+
const _fetchLinkMetadata = async (url: string) => {
|
|
583
628
|
// Check cache first
|
|
584
629
|
const cacheKey = url.toLowerCase().trim();
|
|
585
630
|
const cached = linkMetadataCache.get(cacheKey);
|
|
@@ -618,6 +663,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
618
663
|
}
|
|
619
664
|
};
|
|
620
665
|
|
|
666
|
+
// Helper functions for inline editing (legacy support - still used by renderEditingField)
|
|
621
667
|
const searchLocations = async (query: string) => {
|
|
622
668
|
if (!query.trim() || query.length < 3) {
|
|
623
669
|
setLocationSearchResults([]);
|
|
@@ -691,7 +737,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
691
737
|
if (!newLinkUrl.trim()) return;
|
|
692
738
|
|
|
693
739
|
const url = newLinkUrl.trim();
|
|
694
|
-
const metadata = await
|
|
740
|
+
const metadata = await _fetchLinkMetadata(url);
|
|
695
741
|
|
|
696
742
|
setTempLinksWithMetadata(prev => [...prev, metadata]);
|
|
697
743
|
setNewLinkUrl('');
|
|
@@ -711,15 +757,21 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
711
757
|
});
|
|
712
758
|
};
|
|
713
759
|
|
|
714
|
-
|
|
760
|
+
// Memoize display name for avatar
|
|
761
|
+
const displayNameForAvatar = useMemo(() => getDisplayName(user), [user]);
|
|
762
|
+
|
|
763
|
+
// Legacy renderEditingField function (still used for twoFactor and fallback)
|
|
764
|
+
const renderEditingField = (type: string | null) => {
|
|
765
|
+
if (!type) return null;
|
|
766
|
+
|
|
715
767
|
if (type === 'twoFactor') {
|
|
716
768
|
const enabled = !!user?.privacySettings?.twoFactorEnabled;
|
|
717
769
|
return (
|
|
718
|
-
<View style={[styles.editingFieldContainer, { backgroundColor:
|
|
770
|
+
<View style={[styles.editingFieldContainer, { backgroundColor: colors.background }]}>
|
|
719
771
|
<View style={styles.editingFieldContent}>
|
|
720
772
|
<View style={styles.newValueSection}>
|
|
721
773
|
<View style={styles.editingFieldHeader}>
|
|
722
|
-
<Text style={[styles.editingFieldLabel, { color:
|
|
774
|
+
<Text style={[styles.editingFieldLabel, { color: colors.text }]}>Two‑Factor Authentication (TOTP)</Text>
|
|
723
775
|
</View>
|
|
724
776
|
|
|
725
777
|
{!enabled ? (
|
|
@@ -729,7 +781,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
729
781
|
</Text>
|
|
730
782
|
{!totpSetupUrl ? (
|
|
731
783
|
<TouchableOpacity
|
|
732
|
-
style={styles.primaryButton}
|
|
784
|
+
style={[styles.primaryButton, { backgroundColor: colors.iconSecurity }]}
|
|
733
785
|
disabled={isTotpBusy}
|
|
734
786
|
onPress={async () => {
|
|
735
787
|
if (!activeSessionId) { toast.error(t('editProfile.toasts.noActiveSession') || 'No active session'); return; }
|
|
@@ -764,7 +816,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
764
816
|
/>
|
|
765
817
|
</View>
|
|
766
818
|
<TouchableOpacity
|
|
767
|
-
style={styles.primaryButton}
|
|
819
|
+
style={[styles.primaryButton, { backgroundColor: colors.iconSecurity }]}
|
|
768
820
|
disabled={isTotpBusy || totpCode.length !== 6}
|
|
769
821
|
onPress={async () => {
|
|
770
822
|
if (!activeSessionId) { toast.error(t('editProfile.toasts.noActiveSession') || 'No active session'); return; }
|
|
@@ -810,7 +862,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
810
862
|
/>
|
|
811
863
|
</View>
|
|
812
864
|
<TouchableOpacity
|
|
813
|
-
style={[styles.primaryButton, { backgroundColor:
|
|
865
|
+
style={[styles.primaryButton, { backgroundColor: colors.sidebarIconSharing }]}
|
|
814
866
|
disabled={isTotpBusy || totpCode.length !== 6}
|
|
815
867
|
onPress={async () => {
|
|
816
868
|
if (!activeSessionId) { toast.error(t('editProfile.toasts.noActiveSession') || 'No active session'); return; }
|
|
@@ -839,11 +891,11 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
839
891
|
}
|
|
840
892
|
if (type === 'displayName') {
|
|
841
893
|
return (
|
|
842
|
-
<View style={[styles.editingFieldContainer, { backgroundColor:
|
|
894
|
+
<View style={[styles.editingFieldContainer, { backgroundColor: colors.background }]}>
|
|
843
895
|
<View style={styles.editingFieldContent}>
|
|
844
896
|
<View style={styles.newValueSection}>
|
|
845
897
|
<View style={styles.editingFieldHeader}>
|
|
846
|
-
<Text style={[styles.editingFieldLabel, { color:
|
|
898
|
+
<Text style={[styles.editingFieldLabel, { color: colors.text }]}>Edit Full Name</Text>
|
|
847
899
|
</View>
|
|
848
900
|
<View style={{ flexDirection: 'row', gap: 12 }}>
|
|
849
901
|
<View style={{ flex: 1 }}>
|
|
@@ -853,7 +905,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
853
905
|
value={tempDisplayName}
|
|
854
906
|
onChangeText={setTempDisplayName}
|
|
855
907
|
placeholder="Enter your first name"
|
|
856
|
-
placeholderTextColor={
|
|
908
|
+
placeholderTextColor={colors.secondaryText}
|
|
857
909
|
autoFocus
|
|
858
910
|
selectionColor={themeStyles.primaryColor}
|
|
859
911
|
/>
|
|
@@ -865,7 +917,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
865
917
|
value={tempLastName}
|
|
866
918
|
onChangeText={setTempLastName}
|
|
867
919
|
placeholder="Enter your last name"
|
|
868
|
-
placeholderTextColor={
|
|
920
|
+
placeholderTextColor={colors.secondaryText}
|
|
869
921
|
selectionColor={themeStyles.primaryColor}
|
|
870
922
|
/>
|
|
871
923
|
</View>
|
|
@@ -878,11 +930,11 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
878
930
|
|
|
879
931
|
if (type === 'location') {
|
|
880
932
|
return (
|
|
881
|
-
<View style={[styles.editingFieldContainer, { backgroundColor:
|
|
933
|
+
<View style={[styles.editingFieldContainer, { backgroundColor: colors.background }]}>
|
|
882
934
|
<View style={styles.editingFieldContent}>
|
|
883
935
|
<View style={styles.newValueSection}>
|
|
884
936
|
<View style={styles.editingFieldHeader}>
|
|
885
|
-
<Text style={[styles.editingFieldLabel, { color:
|
|
937
|
+
<Text style={[styles.editingFieldLabel, { color: colors.text }]}>Manage Your Locations</Text>
|
|
886
938
|
</View>
|
|
887
939
|
|
|
888
940
|
{/* Add new location section */}
|
|
@@ -891,7 +943,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
891
943
|
<Text style={styles.addLocationLabel}>
|
|
892
944
|
Add New Location
|
|
893
945
|
{isSearchingLocations && (
|
|
894
|
-
<Text style={styles.searchingText}> • Searching...</Text>
|
|
946
|
+
<Text style={[styles.searchingText, { color: colors.iconSecurity }]}> • Searching...</Text>
|
|
895
947
|
)}
|
|
896
948
|
</Text>
|
|
897
949
|
<View style={styles.addLocationInputContainer}>
|
|
@@ -903,7 +955,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
903
955
|
searchLocations(text);
|
|
904
956
|
}}
|
|
905
957
|
placeholder="Search for a location..."
|
|
906
|
-
placeholderTextColor={
|
|
958
|
+
placeholderTextColor={colors.secondaryText}
|
|
907
959
|
autoFocus
|
|
908
960
|
selectionColor={themeStyles.primaryColor}
|
|
909
961
|
/>
|
|
@@ -947,7 +999,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
947
999
|
onPress={() => setIsAddingLocation(true)}
|
|
948
1000
|
>
|
|
949
1001
|
<OxyIcon name="add" size={20} color={themeStyles.primaryColor} />
|
|
950
|
-
<Text style={styles.addLocationTriggerText}>Add a new location</Text>
|
|
1002
|
+
<Text style={[styles.addLocationTriggerText, { color: colors.iconSecurity }]}>Add a new location</Text>
|
|
951
1003
|
</TouchableOpacity>
|
|
952
1004
|
)}
|
|
953
1005
|
|
|
@@ -982,7 +1034,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
982
1034
|
{location.name}
|
|
983
1035
|
</Text>
|
|
984
1036
|
{location.label && (
|
|
985
|
-
<View style={styles.locationLabel}>
|
|
1037
|
+
<View style={[styles.locationLabel, { backgroundColor: colors.iconSecurity }]}>
|
|
986
1038
|
<Text style={styles.locationLabelText}>
|
|
987
1039
|
{location.label}
|
|
988
1040
|
</Text>
|
|
@@ -1022,11 +1074,11 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1022
1074
|
|
|
1023
1075
|
if (type === 'links') {
|
|
1024
1076
|
return (
|
|
1025
|
-
<View style={[styles.editingFieldContainer, { backgroundColor:
|
|
1077
|
+
<View style={[styles.editingFieldContainer, { backgroundColor: colors.background }]}>
|
|
1026
1078
|
<View style={styles.editingFieldContent}>
|
|
1027
1079
|
<View style={styles.newValueSection}>
|
|
1028
1080
|
<View style={styles.editingFieldHeader}>
|
|
1029
|
-
<Text style={[styles.editingFieldLabel, { color:
|
|
1081
|
+
<Text style={[styles.editingFieldLabel, { color: colors.text }]}>Manage Your Links</Text>
|
|
1030
1082
|
</View>
|
|
1031
1083
|
|
|
1032
1084
|
<GroupedSection
|
|
@@ -1034,11 +1086,10 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1034
1086
|
// Add new link item
|
|
1035
1087
|
...(isAddingLink ? [{
|
|
1036
1088
|
id: 'add-link-input',
|
|
1037
|
-
icon: '
|
|
1038
|
-
iconColor:
|
|
1089
|
+
icon: 'plus',
|
|
1090
|
+
iconColor: colors.sidebarIconSharing,
|
|
1039
1091
|
title: 'Add New Link',
|
|
1040
1092
|
subtitle: isFetchingMetadata ? 'Fetching metadata...' : 'Enter URL to add a new link',
|
|
1041
|
-
multiRow: true,
|
|
1042
1093
|
customContent: (
|
|
1043
1094
|
<View style={styles.addLinkInputContainer}>
|
|
1044
1095
|
<TextInput
|
|
@@ -1046,7 +1097,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1046
1097
|
value={newLinkUrl}
|
|
1047
1098
|
onChangeText={setNewLinkUrl}
|
|
1048
1099
|
placeholder="Enter URL (e.g., https://example.com)"
|
|
1049
|
-
placeholderTextColor={
|
|
1100
|
+
placeholderTextColor={colors.secondaryText}
|
|
1050
1101
|
keyboardType="url"
|
|
1051
1102
|
autoFocus
|
|
1052
1103
|
selectionColor={themeStyles.primaryColor}
|
|
@@ -1062,7 +1113,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1062
1113
|
<Text style={styles.cancelButtonText}>Cancel</Text>
|
|
1063
1114
|
</TouchableOpacity>
|
|
1064
1115
|
<TouchableOpacity
|
|
1065
|
-
style={[styles.addLinkButton, styles.addButton, { opacity: isFetchingMetadata ? 0.5 : 1 }]}
|
|
1116
|
+
style={[styles.addLinkButton, styles.addButton, { backgroundColor: colors.iconSecurity, opacity: isFetchingMetadata ? 0.5 : 1 }]}
|
|
1066
1117
|
onPress={addLink}
|
|
1067
1118
|
disabled={isFetchingMetadata}
|
|
1068
1119
|
>
|
|
@@ -1077,8 +1128,8 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1077
1128
|
),
|
|
1078
1129
|
}] : [{
|
|
1079
1130
|
id: 'add-link-trigger',
|
|
1080
|
-
icon: '
|
|
1081
|
-
iconColor:
|
|
1131
|
+
icon: 'plus',
|
|
1132
|
+
iconColor: colors.sidebarIconSharing,
|
|
1082
1133
|
title: 'Add a new link',
|
|
1083
1134
|
subtitle: 'Tap to add a new link to your profile',
|
|
1084
1135
|
onPress: () => setIsAddingLink(true),
|
|
@@ -1086,13 +1137,13 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1086
1137
|
// Existing links
|
|
1087
1138
|
...tempLinksWithMetadata.map((link, index) => ({
|
|
1088
1139
|
id: link.id,
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1140
|
+
customIcon: link.image ? (
|
|
1141
|
+
<Image source={{ uri: link.image }} style={{ width: 36, height: 36, borderRadius: 18 }} />
|
|
1142
|
+
) : undefined,
|
|
1143
|
+
icon: !link.image ? 'link-variant' : undefined,
|
|
1144
|
+
iconColor: colors.sidebarIconSharing,
|
|
1093
1145
|
title: link.title || link.url,
|
|
1094
1146
|
subtitle: link.description && link.description !== link.title ? link.description : link.url,
|
|
1095
|
-
multiRow: true,
|
|
1096
1147
|
customContent: (
|
|
1097
1148
|
<View style={styles.linkItemActions}>
|
|
1098
1149
|
<View style={styles.reorderButtons}>
|
|
@@ -1121,7 +1172,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1121
1172
|
),
|
|
1122
1173
|
})),
|
|
1123
1174
|
]}
|
|
1124
|
-
|
|
1175
|
+
|
|
1125
1176
|
/>
|
|
1126
1177
|
{tempLinksWithMetadata.length > 0 && (
|
|
1127
1178
|
<View style={styles.reorderHint}>
|
|
@@ -1134,12 +1185,12 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1134
1185
|
);
|
|
1135
1186
|
}
|
|
1136
1187
|
const fieldConfig = {
|
|
1137
|
-
displayName: { label: 'Display Name', value: displayName, placeholder: 'Enter your display name', icon: 'person', color:
|
|
1138
|
-
username: { label: 'Username', value: username, placeholder: 'Choose a username', icon: 'at', color:
|
|
1139
|
-
email: { label: 'Email', value: email, placeholder: 'Enter your email address', icon: 'mail', color:
|
|
1140
|
-
bio: { label: 'Bio', value: bio, placeholder: 'Tell people about yourself...', icon: 'document-text', color:
|
|
1141
|
-
location: { label: 'Location', value: location, placeholder: 'Enter your location', icon: 'location', color:
|
|
1142
|
-
links: { label: 'Links', value: links.join(', '), placeholder: 'Enter your links (comma separated)', icon: 'link', color:
|
|
1188
|
+
displayName: { label: 'Display Name', value: displayName, placeholder: 'Enter your display name', icon: 'person', color: colors.iconPersonalInfo, multiline: false, keyboardType: 'default' as const },
|
|
1189
|
+
username: { label: 'Username', value: username, placeholder: 'Choose a username', icon: 'at', color: colors.iconData, multiline: false, keyboardType: 'default' as const },
|
|
1190
|
+
email: { label: 'Email', value: email, placeholder: 'Enter your email address', icon: 'mail', color: colors.iconStorage, multiline: false, keyboardType: 'email-address' as const },
|
|
1191
|
+
bio: { label: 'Bio', value: bio, placeholder: 'Tell people about yourself...', icon: 'document-text', color: colors.iconPersonalInfo, multiline: true, keyboardType: 'default' as const },
|
|
1192
|
+
location: { label: 'Location', value: location, placeholder: 'Enter your location', icon: 'location', color: colors.iconSharing, multiline: false, keyboardType: 'default' as const },
|
|
1193
|
+
links: { label: 'Links', value: links.join(', '), placeholder: 'Enter your links (comma separated)', icon: 'link', color: colors.iconPersonalInfo, multiline: false, keyboardType: 'url' as const }
|
|
1143
1194
|
};
|
|
1144
1195
|
|
|
1145
1196
|
const config = fieldConfig[type as keyof typeof fieldConfig];
|
|
@@ -1169,11 +1220,11 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1169
1220
|
};
|
|
1170
1221
|
|
|
1171
1222
|
return (
|
|
1172
|
-
<View style={[styles.editingFieldContainer, { backgroundColor:
|
|
1223
|
+
<View style={[styles.editingFieldContainer, { backgroundColor: colors.background }]}>
|
|
1173
1224
|
<View style={styles.editingFieldContent}>
|
|
1174
1225
|
<View style={styles.newValueSection}>
|
|
1175
1226
|
<View style={styles.editingFieldHeader}>
|
|
1176
|
-
<Text style={[styles.editingFieldLabel, { color:
|
|
1227
|
+
<Text style={[styles.editingFieldLabel, { color: colors.text }]}>
|
|
1177
1228
|
{config.label}
|
|
1178
1229
|
</Text>
|
|
1179
1230
|
</View>
|
|
@@ -1204,10 +1255,10 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1204
1255
|
|
|
1205
1256
|
|
|
1206
1257
|
|
|
1207
|
-
if (
|
|
1258
|
+
if (isLoading || !isAuthenticated) {
|
|
1208
1259
|
return (
|
|
1209
1260
|
<View style={[styles.container, {
|
|
1210
|
-
backgroundColor: themeStyles.
|
|
1261
|
+
backgroundColor: themeStyles.backgroundColor,
|
|
1211
1262
|
justifyContent: 'center'
|
|
1212
1263
|
}]}>
|
|
1213
1264
|
<ActivityIndicator size="large" color={themeStyles.primaryColor} />
|
|
@@ -1216,21 +1267,21 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1216
1267
|
}
|
|
1217
1268
|
|
|
1218
1269
|
return (
|
|
1219
|
-
<View style={[styles.container, { backgroundColor: themeStyles.
|
|
1270
|
+
<View style={[styles.container, { backgroundColor: themeStyles.backgroundColor }]}>
|
|
1220
1271
|
{/* Header */}
|
|
1221
1272
|
{editingField ? (
|
|
1222
1273
|
<View style={[styles.editingHeader, {
|
|
1223
|
-
backgroundColor:
|
|
1224
|
-
borderBottomColor:
|
|
1274
|
+
backgroundColor: colors.background,
|
|
1275
|
+
borderBottomColor: colors.border
|
|
1225
1276
|
}]}>
|
|
1226
1277
|
<View style={styles.editingHeaderContent}>
|
|
1227
1278
|
<TouchableOpacity
|
|
1228
1279
|
style={[styles.editingBackButton, {
|
|
1229
|
-
backgroundColor:
|
|
1280
|
+
backgroundColor: colors.card
|
|
1230
1281
|
}]}
|
|
1231
1282
|
onPress={cancelEditing}
|
|
1232
1283
|
>
|
|
1233
|
-
<Ionicons name="chevron-back" size={20} color={
|
|
1284
|
+
<Ionicons name="chevron-back" size={20} color={colors.tint} />
|
|
1234
1285
|
</TouchableOpacity>
|
|
1235
1286
|
<View style={styles.editingTitleContainer}>
|
|
1236
1287
|
</View>
|
|
@@ -1239,49 +1290,49 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1239
1290
|
styles.editingSaveButton,
|
|
1240
1291
|
{
|
|
1241
1292
|
opacity: isSaving ? 0.5 : 1,
|
|
1242
|
-
backgroundColor:
|
|
1293
|
+
backgroundColor: colors.card
|
|
1243
1294
|
}
|
|
1244
1295
|
]}
|
|
1245
1296
|
onPress={() => saveField(editingField)}
|
|
1246
1297
|
disabled={isSaving}
|
|
1247
1298
|
>
|
|
1248
1299
|
{isSaving ? (
|
|
1249
|
-
<ActivityIndicator size="small" color={
|
|
1300
|
+
<ActivityIndicator size="small" color={colors.tint} />
|
|
1250
1301
|
) : (
|
|
1251
|
-
<Text style={[styles.editingSaveButtonText, { color:
|
|
1302
|
+
<Text style={[styles.editingSaveButtonText, { color: colors.tint }]}>Save</Text>
|
|
1252
1303
|
)}
|
|
1253
1304
|
</TouchableOpacity>
|
|
1254
1305
|
</View>
|
|
1255
1306
|
<View style={styles.editingHeaderBottom}>
|
|
1256
1307
|
<View style={[styles.editingIconContainer, {
|
|
1257
|
-
backgroundColor: editingField === 'displayName' ?
|
|
1258
|
-
editingField === 'username' ?
|
|
1259
|
-
editingField === 'email' ?
|
|
1260
|
-
editingField === 'bio' ?
|
|
1261
|
-
editingField === 'location' ?
|
|
1262
|
-
editingField === 'links' ?
|
|
1308
|
+
backgroundColor: editingField === 'displayName' ? `${colors.sidebarIconPersonalInfo}20` :
|
|
1309
|
+
editingField === 'username' ? `${colors.sidebarIconData}20` :
|
|
1310
|
+
editingField === 'email' ? `${colors.sidebarIconSecurity}20` :
|
|
1311
|
+
editingField === 'bio' ? `${colors.sidebarIconPersonalInfo}20` :
|
|
1312
|
+
editingField === 'location' ? `${colors.sidebarIconSharing}20` :
|
|
1313
|
+
editingField === 'links' ? `${colors.sidebarIconPersonalInfo}20` : `${colors.tint}20`
|
|
1263
1314
|
}]}>
|
|
1264
|
-
<
|
|
1315
|
+
<MaterialCommunityIcons
|
|
1265
1316
|
name={
|
|
1266
|
-
editingField === 'displayName' ? '
|
|
1317
|
+
editingField === 'displayName' ? 'account-outline' as any :
|
|
1267
1318
|
editingField === 'username' ? 'at' as any :
|
|
1268
|
-
editingField === 'email' ? '
|
|
1269
|
-
editingField === 'bio' ? '
|
|
1270
|
-
editingField === 'location' ? '
|
|
1271
|
-
editingField === 'links' ? 'link' as any : '
|
|
1319
|
+
editingField === 'email' ? 'email-outline' as any :
|
|
1320
|
+
editingField === 'bio' ? 'text-box-outline' as any :
|
|
1321
|
+
editingField === 'location' ? 'map-marker-outline' as any :
|
|
1322
|
+
editingField === 'links' ? 'link-variant' as any : 'account-outline' as any
|
|
1272
1323
|
}
|
|
1273
1324
|
size={28}
|
|
1274
1325
|
color={
|
|
1275
|
-
editingField === 'displayName' ?
|
|
1276
|
-
editingField === 'username' ?
|
|
1277
|
-
editingField === 'email' ?
|
|
1278
|
-
editingField === 'bio' ?
|
|
1279
|
-
editingField === 'location' ?
|
|
1280
|
-
editingField === 'links' ?
|
|
1326
|
+
editingField === 'displayName' ? colors.sidebarIconPersonalInfo :
|
|
1327
|
+
editingField === 'username' ? colors.sidebarIconData :
|
|
1328
|
+
editingField === 'email' ? colors.sidebarIconSecurity :
|
|
1329
|
+
editingField === 'bio' ? colors.sidebarIconPersonalInfo :
|
|
1330
|
+
editingField === 'location' ? colors.sidebarIconSharing :
|
|
1331
|
+
editingField === 'links' ? colors.sidebarIconPersonalInfo : colors.tint
|
|
1281
1332
|
}
|
|
1282
1333
|
/>
|
|
1283
1334
|
</View>
|
|
1284
|
-
<Text style={[styles.editingBottomTitle, { color:
|
|
1335
|
+
<Text style={[styles.editingBottomTitle, { color: colors.text }]}>
|
|
1285
1336
|
{editingField === 'displayName' ? (t('editProfile.items.displayName.title') || 'Display Name') :
|
|
1286
1337
|
editingField === 'username' ? (t('editProfile.items.username.title') || 'Username') :
|
|
1287
1338
|
editingField === 'email' ? (t('editProfile.items.email.title') || 'Email') :
|
|
@@ -1291,24 +1342,13 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1291
1342
|
</Text>
|
|
1292
1343
|
</View>
|
|
1293
1344
|
</View>
|
|
1294
|
-
) :
|
|
1295
|
-
<Header
|
|
1296
|
-
title={t('editProfile.title') || 'Edit Profile'}
|
|
1297
|
-
theme={theme}
|
|
1298
|
-
onBack={goBack || onClose}
|
|
1299
|
-
rightAction={{
|
|
1300
|
-
icon: 'checkmark',
|
|
1301
|
-
onPress: handleSave,
|
|
1302
|
-
loading: isSaving,
|
|
1303
|
-
disabled: isSaving,
|
|
1304
|
-
}}
|
|
1305
|
-
elevation="subtle"
|
|
1306
|
-
/>
|
|
1307
|
-
)}
|
|
1345
|
+
) : null}
|
|
1308
1346
|
|
|
1309
1347
|
<ScrollView
|
|
1310
1348
|
ref={scrollViewRef}
|
|
1311
1349
|
style={editingField ? styles.contentEditing : styles.content}
|
|
1350
|
+
contentContainerStyle={styles.scrollContent}
|
|
1351
|
+
showsVerticalScrollIndicator={false}
|
|
1312
1352
|
>
|
|
1313
1353
|
{editingField ? (
|
|
1314
1354
|
// Show only the editing interface when editing
|
|
@@ -1318,6 +1358,16 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1318
1358
|
) : (
|
|
1319
1359
|
// Show all settings when not editing
|
|
1320
1360
|
<>
|
|
1361
|
+
{/* Title and Subtitle Header */}
|
|
1362
|
+
<View style={[styles.headerContainer, styles.headerSection]}>
|
|
1363
|
+
<Text style={[styles.modernTitle, { color: themeStyles.textColor, marginBottom: 0, marginTop: 0 }]}>
|
|
1364
|
+
{t('accountOverview.items.editProfile.title') || t('editProfile.title') || 'Edit Profile'}
|
|
1365
|
+
</Text>
|
|
1366
|
+
<Text style={[styles.modernSubtitle, { color: colors.secondaryText, marginBottom: 0, marginTop: 0 }]}>
|
|
1367
|
+
{t('accountOverview.items.editProfile.subtitle') || t('editProfile.subtitle') || 'Manage your profile and preferences'}
|
|
1368
|
+
</Text>
|
|
1369
|
+
</View>
|
|
1370
|
+
|
|
1321
1371
|
{showRecoveryModal && (
|
|
1322
1372
|
<View style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0, backgroundColor: 'rgba(0,0,0,0.6)', zIndex: 50, padding: 16, justifyContent: 'center' }}>
|
|
1323
1373
|
<View style={{ backgroundColor: '#fff', borderRadius: 20, padding: 20, maxHeight: '80%' }}>
|
|
@@ -1344,7 +1394,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1344
1394
|
</View>
|
|
1345
1395
|
)}
|
|
1346
1396
|
<TouchableOpacity
|
|
1347
|
-
style={[styles.primaryButton, { alignSelf: 'flex-end', marginTop: 8 }]}
|
|
1397
|
+
style={[styles.primaryButton, { backgroundColor: colors.iconSecurity, alignSelf: 'flex-end', marginTop: 8 }]}
|
|
1348
1398
|
onPress={() => { setShowRecoveryModal(false); setEditingField(null); toast.success(t('editProfile.toasts.twoFactorEnabled') || 'Two‑Factor Authentication enabled'); }}
|
|
1349
1399
|
>
|
|
1350
1400
|
<Ionicons name="checkmark" size={18} color="#fff" />
|
|
@@ -1366,7 +1416,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1366
1416
|
setProfilePictureSectionY(y);
|
|
1367
1417
|
}}
|
|
1368
1418
|
>
|
|
1369
|
-
<Text style={[styles.sectionTitle, { color:
|
|
1419
|
+
<Text style={[styles.sectionTitle, { color: colors.secondaryText }]}>
|
|
1370
1420
|
{t('editProfile.sections.profilePicture') || 'PROFILE PICTURE'}
|
|
1371
1421
|
</Text>
|
|
1372
1422
|
<View style={styles.groupedSectionWrapper}>
|
|
@@ -1374,58 +1424,59 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1374
1424
|
items={[
|
|
1375
1425
|
{
|
|
1376
1426
|
id: 'profile-photo',
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
image: (optimisticAvatarId || avatarFileId) ? oxyServices.getFileDownloadUrl(optimisticAvatarId || avatarFileId, 'thumb') : undefined,
|
|
1381
|
-
imageSize: 40,
|
|
1382
|
-
title: 'Profile Photo',
|
|
1383
|
-
subtitle: isUpdatingAvatar
|
|
1384
|
-
? 'Updating profile picture...'
|
|
1385
|
-
: (avatarFileId ? 'Tap to change your profile picture' : 'Tap to add a profile picture'),
|
|
1386
|
-
onPress: isUpdatingAvatar ? undefined : openAvatarPicker,
|
|
1387
|
-
disabled: isUpdatingAvatar,
|
|
1388
|
-
customIcon: isUpdatingAvatar ? (
|
|
1389
|
-
<Animated.View style={{ position: 'relative', width: 40, height: 40 }}>
|
|
1390
|
-
{(optimisticAvatarId || avatarFileId) && (
|
|
1427
|
+
customIcon: (optimisticAvatarId || avatarFileId) ? (
|
|
1428
|
+
isUpdatingAvatar ? (
|
|
1429
|
+
<Animated.View style={{ position: 'relative', width: 36, height: 36 }}>
|
|
1391
1430
|
<Animated.Image
|
|
1392
1431
|
source={{ uri: oxyServices.getFileDownloadUrl(optimisticAvatarId || avatarFileId, 'thumb') }}
|
|
1393
1432
|
style={{
|
|
1394
|
-
width:
|
|
1395
|
-
height:
|
|
1396
|
-
borderRadius:
|
|
1433
|
+
width: 36,
|
|
1434
|
+
height: 36,
|
|
1435
|
+
borderRadius: 18,
|
|
1397
1436
|
opacity: 0.6
|
|
1398
1437
|
}}
|
|
1399
1438
|
/>
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
</View>
|
|
1414
|
-
|
|
1439
|
+
<View style={{
|
|
1440
|
+
position: 'absolute',
|
|
1441
|
+
top: 0,
|
|
1442
|
+
left: 0,
|
|
1443
|
+
right: 0,
|
|
1444
|
+
bottom: 0,
|
|
1445
|
+
justifyContent: 'center',
|
|
1446
|
+
alignItems: 'center',
|
|
1447
|
+
backgroundColor: colorScheme === 'dark' ? 'rgba(0, 0, 0, 0.4)' : 'rgba(255, 255, 255, 0.7)',
|
|
1448
|
+
borderRadius: 18,
|
|
1449
|
+
}}>
|
|
1450
|
+
<ActivityIndicator size="small" color={colors.tint} />
|
|
1451
|
+
</View>
|
|
1452
|
+
</Animated.View>
|
|
1453
|
+
) : (
|
|
1454
|
+
<Image
|
|
1455
|
+
source={{ uri: oxyServices.getFileDownloadUrl(optimisticAvatarId || avatarFileId, 'thumb') }}
|
|
1456
|
+
style={{ width: 36, height: 36, borderRadius: 18 }}
|
|
1457
|
+
/>
|
|
1458
|
+
)
|
|
1415
1459
|
) : undefined,
|
|
1460
|
+
icon: !(optimisticAvatarId || avatarFileId) ? 'account-outline' : undefined,
|
|
1461
|
+
iconColor: colors.sidebarIconPersonalInfo,
|
|
1462
|
+
title: 'Profile Photo',
|
|
1463
|
+
subtitle: isUpdatingAvatar
|
|
1464
|
+
? 'Updating profile picture...'
|
|
1465
|
+
: (avatarFileId ? 'Tap to change your profile picture' : 'Tap to add a profile picture'),
|
|
1466
|
+
onPress: isUpdatingAvatar ? undefined : openAvatarPicker,
|
|
1467
|
+
disabled: isUpdatingAvatar,
|
|
1416
1468
|
},
|
|
1417
1469
|
...(avatarFileId && !isUpdatingAvatar ? [
|
|
1418
1470
|
{
|
|
1419
1471
|
id: 'remove-profile-photo',
|
|
1420
|
-
icon: '
|
|
1421
|
-
iconColor:
|
|
1472
|
+
icon: 'delete-outline',
|
|
1473
|
+
iconColor: colors.sidebarIconSharing,
|
|
1422
1474
|
title: 'Remove Photo',
|
|
1423
1475
|
subtitle: 'Delete current profile picture',
|
|
1424
1476
|
onPress: handleAvatarRemove,
|
|
1425
1477
|
}
|
|
1426
1478
|
] : []),
|
|
1427
1479
|
]}
|
|
1428
|
-
theme={theme}
|
|
1429
1480
|
/>
|
|
1430
1481
|
</View>
|
|
1431
1482
|
</View>
|
|
@@ -1439,7 +1490,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1439
1490
|
setBasicInfoSectionY(y);
|
|
1440
1491
|
}}
|
|
1441
1492
|
>
|
|
1442
|
-
<Text style={[styles.sectionTitle, { color:
|
|
1493
|
+
<Text style={[styles.sectionTitle, { color: colors.secondaryText }]}>
|
|
1443
1494
|
{t('editProfile.sections.basicInfo') || 'BASIC INFORMATION'}
|
|
1444
1495
|
</Text>
|
|
1445
1496
|
<View style={styles.groupedSectionWrapper}>
|
|
@@ -1447,30 +1498,29 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1447
1498
|
items={[
|
|
1448
1499
|
{
|
|
1449
1500
|
id: 'display-name',
|
|
1450
|
-
icon: '
|
|
1451
|
-
iconColor:
|
|
1501
|
+
icon: 'account-outline',
|
|
1502
|
+
iconColor: colors.sidebarIconPersonalInfo,
|
|
1452
1503
|
title: t('editProfile.items.displayName.title') || 'Display Name',
|
|
1453
1504
|
subtitle: [displayName, lastName].filter(Boolean).join(' ') || (t('editProfile.items.displayName.add') || 'Add your display name'),
|
|
1454
|
-
onPress:
|
|
1505
|
+
onPress: handleOpenDisplayNameModal,
|
|
1455
1506
|
},
|
|
1456
1507
|
{
|
|
1457
1508
|
id: 'username',
|
|
1458
1509
|
icon: 'at',
|
|
1459
|
-
iconColor:
|
|
1510
|
+
iconColor: colors.sidebarIconData,
|
|
1460
1511
|
title: t('editProfile.items.username.title') || 'Username',
|
|
1461
1512
|
subtitle: username || (t('editProfile.items.username.choose') || 'Choose a username'),
|
|
1462
|
-
onPress:
|
|
1513
|
+
onPress: handleOpenUsernameModal,
|
|
1463
1514
|
},
|
|
1464
1515
|
{
|
|
1465
1516
|
id: 'email',
|
|
1466
|
-
icon: '
|
|
1467
|
-
iconColor:
|
|
1517
|
+
icon: 'email-outline',
|
|
1518
|
+
iconColor: colors.sidebarIconSecurity,
|
|
1468
1519
|
title: t('editProfile.items.email.title') || 'Email',
|
|
1469
1520
|
subtitle: email || (t('editProfile.items.email.add') || 'Add your email address'),
|
|
1470
|
-
onPress:
|
|
1521
|
+
onPress: handleOpenEmailModal,
|
|
1471
1522
|
},
|
|
1472
1523
|
]}
|
|
1473
|
-
theme={theme}
|
|
1474
1524
|
/>
|
|
1475
1525
|
</View>
|
|
1476
1526
|
</View>
|
|
@@ -1484,7 +1534,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1484
1534
|
setAboutSectionY(y);
|
|
1485
1535
|
}}
|
|
1486
1536
|
>
|
|
1487
|
-
<Text style={[styles.sectionTitle, { color:
|
|
1537
|
+
<Text style={[styles.sectionTitle, { color: colors.secondaryText }]}>
|
|
1488
1538
|
{t('editProfile.sections.about') || 'ABOUT YOU'}
|
|
1489
1539
|
</Text>
|
|
1490
1540
|
<View style={styles.groupedSectionWrapper}>
|
|
@@ -1492,92 +1542,37 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1492
1542
|
items={[
|
|
1493
1543
|
{
|
|
1494
1544
|
id: 'bio',
|
|
1495
|
-
icon: '
|
|
1496
|
-
iconColor:
|
|
1545
|
+
icon: 'text-box-outline',
|
|
1546
|
+
iconColor: colors.sidebarIconPersonalInfo,
|
|
1497
1547
|
title: t('editProfile.items.bio.title') || 'Bio',
|
|
1498
1548
|
subtitle: bio || (t('editProfile.items.bio.placeholder') || 'Tell people about yourself'),
|
|
1499
|
-
onPress:
|
|
1549
|
+
onPress: handleOpenBioModal,
|
|
1500
1550
|
},
|
|
1501
1551
|
{
|
|
1502
1552
|
id: 'locations',
|
|
1503
|
-
icon: '
|
|
1504
|
-
iconColor:
|
|
1553
|
+
icon: 'map-marker-outline',
|
|
1554
|
+
iconColor: colors.sidebarIconSharing,
|
|
1505
1555
|
title: t('editProfile.items.locations.title') || 'Locations',
|
|
1506
|
-
subtitle:
|
|
1507
|
-
? (
|
|
1508
|
-
? (t('editProfile.items.locations.count', { count:
|
|
1509
|
-
: (t('editProfile.items.locations.count_plural', { count:
|
|
1556
|
+
subtitle: locations.length > 0
|
|
1557
|
+
? (locations.length === 1
|
|
1558
|
+
? (t('editProfile.items.locations.count', { count: locations.length }) || `${locations.length} location added`)
|
|
1559
|
+
: (t('editProfile.items.locations.count_plural', { count: locations.length }) || `${locations.length} locations added`))
|
|
1510
1560
|
: (t('editProfile.items.locations.add') || 'Add your locations'),
|
|
1511
|
-
onPress:
|
|
1512
|
-
customContentBelow: tempLocations.length > 0 && (
|
|
1513
|
-
<View style={styles.linksPreviewContainer}>
|
|
1514
|
-
{tempLocations.slice(0, 2).map((location, index) => (
|
|
1515
|
-
<View key={location.id || index} style={styles.linkPreviewItem}>
|
|
1516
|
-
<View style={styles.linkPreviewImage}>
|
|
1517
|
-
<Text style={styles.linkPreviewImageText}>
|
|
1518
|
-
{location.name.charAt(0).toUpperCase()}
|
|
1519
|
-
</Text>
|
|
1520
|
-
</View>
|
|
1521
|
-
<View style={styles.linkPreviewContent}>
|
|
1522
|
-
<Text style={styles.linkPreviewTitle} numberOfLines={1}>
|
|
1523
|
-
{location.name}
|
|
1524
|
-
</Text>
|
|
1525
|
-
{location.label && (
|
|
1526
|
-
<Text style={styles.linkPreviewSubtitle}>
|
|
1527
|
-
{location.label}
|
|
1528
|
-
</Text>
|
|
1529
|
-
)}
|
|
1530
|
-
</View>
|
|
1531
|
-
</View>
|
|
1532
|
-
))}
|
|
1533
|
-
{tempLocations.length > 2 && (
|
|
1534
|
-
<Text style={styles.linkPreviewMore}>
|
|
1535
|
-
+{tempLocations.length - 2} more
|
|
1536
|
-
</Text>
|
|
1537
|
-
)}
|
|
1538
|
-
</View>
|
|
1539
|
-
),
|
|
1561
|
+
onPress: handleOpenLocationModal,
|
|
1540
1562
|
},
|
|
1541
1563
|
{
|
|
1542
1564
|
id: 'links',
|
|
1543
|
-
icon: 'link',
|
|
1544
|
-
iconColor:
|
|
1565
|
+
icon: 'link-variant',
|
|
1566
|
+
iconColor: colors.sidebarIconSharing,
|
|
1545
1567
|
title: t('editProfile.items.links.title') || 'Links',
|
|
1546
|
-
subtitle:
|
|
1547
|
-
? (
|
|
1548
|
-
? (t('editProfile.items.links.count', { count:
|
|
1549
|
-
: (t('editProfile.items.links.count_plural', { count:
|
|
1568
|
+
subtitle: linksMetadata.length > 0
|
|
1569
|
+
? (linksMetadata.length === 1
|
|
1570
|
+
? (t('editProfile.items.links.count', { count: linksMetadata.length }) || `${linksMetadata.length} link added`)
|
|
1571
|
+
: (t('editProfile.items.links.count_plural', { count: linksMetadata.length }) || `${linksMetadata.length} links added`))
|
|
1550
1572
|
: (t('editProfile.items.links.add') || 'Add your links'),
|
|
1551
|
-
onPress:
|
|
1552
|
-
multiRow: true,
|
|
1553
|
-
customContentBelow: tempLinksWithMetadata.length > 0 && (
|
|
1554
|
-
<View style={styles.linksPreviewContainer}>
|
|
1555
|
-
{tempLinksWithMetadata.slice(0, 2).map((link, index) => (
|
|
1556
|
-
<View key={link.id || index} style={styles.linkPreviewItem}>
|
|
1557
|
-
{link.image ? (
|
|
1558
|
-
<Image source={{ uri: link.image }} style={styles.linkPreviewImage} />
|
|
1559
|
-
) : (
|
|
1560
|
-
<View style={styles.linkPreviewImage}>
|
|
1561
|
-
<Text style={styles.linkPreviewImageText}>
|
|
1562
|
-
{link.title?.charAt(0).toUpperCase() || link.url.charAt(0).toUpperCase()}
|
|
1563
|
-
</Text>
|
|
1564
|
-
</View>
|
|
1565
|
-
)}
|
|
1566
|
-
<Text style={styles.linkPreviewTitle} numberOfLines={1}>
|
|
1567
|
-
{link.title || link.url}
|
|
1568
|
-
</Text>
|
|
1569
|
-
</View>
|
|
1570
|
-
))}
|
|
1571
|
-
{tempLinksWithMetadata.length > 2 && (
|
|
1572
|
-
<Text style={styles.linkPreviewMore}>
|
|
1573
|
-
+{tempLinksWithMetadata.length - 2} more
|
|
1574
|
-
</Text>
|
|
1575
|
-
)}
|
|
1576
|
-
</View>
|
|
1577
|
-
),
|
|
1573
|
+
onPress: handleOpenLinksModal,
|
|
1578
1574
|
},
|
|
1579
1575
|
]}
|
|
1580
|
-
theme={theme}
|
|
1581
1576
|
/>
|
|
1582
1577
|
</View>
|
|
1583
1578
|
</View>
|
|
@@ -1591,7 +1586,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1591
1586
|
setQuickActionsSectionY(y);
|
|
1592
1587
|
}}
|
|
1593
1588
|
>
|
|
1594
|
-
<Text style={[styles.sectionTitle, { color:
|
|
1589
|
+
<Text style={[styles.sectionTitle, { color: colors.secondaryText }]}>
|
|
1595
1590
|
{t('editProfile.sections.quickActions') || 'QUICK ACTIONS'}
|
|
1596
1591
|
</Text>
|
|
1597
1592
|
<View style={styles.groupedSectionWrapper}>
|
|
@@ -1600,29 +1595,28 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1600
1595
|
{
|
|
1601
1596
|
id: 'preview-profile',
|
|
1602
1597
|
icon: 'eye',
|
|
1603
|
-
iconColor:
|
|
1598
|
+
iconColor: colors.sidebarIconHome,
|
|
1604
1599
|
title: t('editProfile.items.previewProfile.title') || 'Preview Profile',
|
|
1605
1600
|
subtitle: t('editProfile.items.previewProfile.subtitle') || 'See how your profile looks to others',
|
|
1606
1601
|
onPress: () => navigate?.('Profile', { userId: user?.id }),
|
|
1607
1602
|
},
|
|
1608
1603
|
{
|
|
1609
1604
|
id: 'privacy-settings',
|
|
1610
|
-
icon: 'shield-
|
|
1611
|
-
iconColor:
|
|
1605
|
+
icon: 'shield-check',
|
|
1606
|
+
iconColor: colors.sidebarIconSecurity,
|
|
1612
1607
|
title: t('editProfile.items.privacySettings.title') || 'Privacy Settings',
|
|
1613
1608
|
subtitle: t('editProfile.items.privacySettings.subtitle') || 'Control who can see your profile',
|
|
1614
1609
|
onPress: () => navigate?.('PrivacySettings'),
|
|
1615
1610
|
},
|
|
1616
1611
|
{
|
|
1617
1612
|
id: 'verify-account',
|
|
1618
|
-
icon: '
|
|
1619
|
-
iconColor:
|
|
1613
|
+
icon: 'check-circle',
|
|
1614
|
+
iconColor: colors.sidebarIconPersonalInfo,
|
|
1620
1615
|
title: t('editProfile.items.verifyAccount.title') || 'Verify Account',
|
|
1621
1616
|
subtitle: t('editProfile.items.verifyAccount.subtitle') || 'Get a verified badge',
|
|
1622
1617
|
onPress: () => navigate?.('AccountVerification'),
|
|
1623
1618
|
},
|
|
1624
1619
|
]}
|
|
1625
|
-
theme={theme}
|
|
1626
1620
|
/>
|
|
1627
1621
|
</View>
|
|
1628
1622
|
</View>
|
|
@@ -1636,7 +1630,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1636
1630
|
setSecuritySectionY(y);
|
|
1637
1631
|
}}
|
|
1638
1632
|
>
|
|
1639
|
-
<Text style={[styles.sectionTitle, { color:
|
|
1633
|
+
<Text style={[styles.sectionTitle, { color: colors.secondaryText }]}>
|
|
1640
1634
|
{t('editProfile.sections.security') || 'SECURITY'}
|
|
1641
1635
|
</Text>
|
|
1642
1636
|
<View style={styles.groupedSectionWrapper}>
|
|
@@ -1644,41 +1638,121 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1644
1638
|
items={[
|
|
1645
1639
|
{
|
|
1646
1640
|
id: 'two-factor',
|
|
1647
|
-
icon: 'shield-
|
|
1648
|
-
iconColor:
|
|
1641
|
+
icon: 'shield-lock',
|
|
1642
|
+
iconColor: colors.sidebarIconSecurity,
|
|
1649
1643
|
title: t('editProfile.items.twoFactor.title') || 'Two‑Factor Authentication',
|
|
1650
1644
|
subtitle: user?.privacySettings?.twoFactorEnabled
|
|
1651
1645
|
? (t('editProfile.items.twoFactor.enabled') || 'Enabled')
|
|
1652
1646
|
: (t('editProfile.items.twoFactor.disabled') || 'Disabled (recommended)'),
|
|
1653
|
-
onPress:
|
|
1647
|
+
onPress: handleOpenTwoFactorModal,
|
|
1654
1648
|
},
|
|
1655
1649
|
]}
|
|
1656
|
-
theme={theme}
|
|
1657
1650
|
/>
|
|
1658
1651
|
</View>
|
|
1659
1652
|
</View>
|
|
1660
1653
|
</>
|
|
1661
1654
|
)}
|
|
1662
1655
|
</ScrollView>
|
|
1656
|
+
|
|
1657
|
+
{/* Modal Components */}
|
|
1658
|
+
<EditDisplayNameModal
|
|
1659
|
+
visible={showEditDisplayNameModal}
|
|
1660
|
+
onClose={() => setShowEditDisplayNameModal(false)}
|
|
1661
|
+
initialDisplayName={displayName}
|
|
1662
|
+
initialLastName={lastName}
|
|
1663
|
+
theme={normalizedTheme}
|
|
1664
|
+
onSave={handleModalSave}
|
|
1665
|
+
/>
|
|
1666
|
+
<EditUsernameModal
|
|
1667
|
+
visible={showEditUsernameModal}
|
|
1668
|
+
onClose={() => setShowEditUsernameModal(false)}
|
|
1669
|
+
initialValue={username}
|
|
1670
|
+
theme={normalizedTheme}
|
|
1671
|
+
onSave={handleModalSave}
|
|
1672
|
+
/>
|
|
1673
|
+
<EditEmailModal
|
|
1674
|
+
visible={showEditEmailModal}
|
|
1675
|
+
onClose={() => setShowEditEmailModal(false)}
|
|
1676
|
+
initialValue={email}
|
|
1677
|
+
theme={normalizedTheme}
|
|
1678
|
+
onSave={handleModalSave}
|
|
1679
|
+
/>
|
|
1680
|
+
<EditBioModal
|
|
1681
|
+
visible={showEditBioModal}
|
|
1682
|
+
onClose={() => setShowEditBioModal(false)}
|
|
1683
|
+
initialValue={bio}
|
|
1684
|
+
theme={normalizedTheme}
|
|
1685
|
+
onSave={handleModalSave}
|
|
1686
|
+
/>
|
|
1687
|
+
<EditLocationModal
|
|
1688
|
+
visible={showEditLocationModal}
|
|
1689
|
+
onClose={() => setShowEditLocationModal(false)}
|
|
1690
|
+
initialLocations={locations}
|
|
1691
|
+
theme={normalizedTheme}
|
|
1692
|
+
onSave={handleModalSave}
|
|
1693
|
+
/>
|
|
1694
|
+
<EditLinksModal
|
|
1695
|
+
visible={showEditLinksModal}
|
|
1696
|
+
onClose={() => setShowEditLinksModal(false)}
|
|
1697
|
+
initialLinks={linksMetadata}
|
|
1698
|
+
theme={normalizedTheme}
|
|
1699
|
+
onSave={handleModalSave}
|
|
1700
|
+
/>
|
|
1701
|
+
<TwoFactorSetupModal
|
|
1702
|
+
visible={showTwoFactorModal}
|
|
1703
|
+
onClose={() => setShowTwoFactorModal(false)}
|
|
1704
|
+
isEnabled={!!user?.privacySettings?.twoFactorEnabled}
|
|
1705
|
+
theme={normalizedTheme}
|
|
1706
|
+
/>
|
|
1663
1707
|
</View>
|
|
1664
1708
|
);
|
|
1665
1709
|
};
|
|
1666
1710
|
|
|
1667
1711
|
const styles = StyleSheet.create({
|
|
1668
1712
|
container: {
|
|
1669
|
-
|
|
1713
|
+
flexShrink: 1,
|
|
1714
|
+
width: '100%',
|
|
1670
1715
|
},
|
|
1671
1716
|
content: {
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1717
|
+
flexShrink: 1,
|
|
1718
|
+
},
|
|
1719
|
+
scrollView: {
|
|
1720
|
+
flexShrink: 1,
|
|
1675
1721
|
},
|
|
1676
1722
|
contentEditing: {
|
|
1677
1723
|
flex: 1,
|
|
1678
1724
|
padding: 0,
|
|
1679
1725
|
},
|
|
1726
|
+
scrollContent: createScreenContentStyle(HEADER_PADDING_TOP_SETTINGS),
|
|
1727
|
+
headerContainer: {
|
|
1728
|
+
width: '100%',
|
|
1729
|
+
maxWidth: 420,
|
|
1730
|
+
alignSelf: 'center',
|
|
1731
|
+
marginBottom: SECTION_GAP_LARGE,
|
|
1732
|
+
},
|
|
1733
|
+
headerSection: {
|
|
1734
|
+
alignItems: 'flex-start',
|
|
1735
|
+
width: '100%',
|
|
1736
|
+
gap: COMPONENT_GAP,
|
|
1737
|
+
},
|
|
1738
|
+
modernTitle: {
|
|
1739
|
+
fontFamily: fontFamilies.phuduBold,
|
|
1740
|
+
fontWeight: Platform.OS === 'web' ? 'bold' : undefined,
|
|
1741
|
+
fontSize: 42,
|
|
1742
|
+
lineHeight: 50.4, // 42 * 1.2
|
|
1743
|
+
textAlign: 'left',
|
|
1744
|
+
letterSpacing: -0.5,
|
|
1745
|
+
},
|
|
1746
|
+
modernSubtitle: {
|
|
1747
|
+
fontSize: 18,
|
|
1748
|
+
lineHeight: 24,
|
|
1749
|
+
textAlign: 'left',
|
|
1750
|
+
maxWidth: 320,
|
|
1751
|
+
alignSelf: 'flex-start',
|
|
1752
|
+
opacity: 0.8,
|
|
1753
|
+
},
|
|
1680
1754
|
section: {
|
|
1681
|
-
marginBottom:
|
|
1755
|
+
marginBottom: SECTION_GAP_LARGE,
|
|
1682
1756
|
},
|
|
1683
1757
|
sectionTitle: {
|
|
1684
1758
|
fontSize: 13,
|
|
@@ -1686,13 +1760,11 @@ const styles = StyleSheet.create({
|
|
|
1686
1760
|
color: '#8E8E93',
|
|
1687
1761
|
marginBottom: 8,
|
|
1688
1762
|
marginTop: 4,
|
|
1689
|
-
marginHorizontal: 16,
|
|
1690
1763
|
textTransform: 'uppercase',
|
|
1691
1764
|
letterSpacing: 0.5,
|
|
1692
1765
|
fontFamily: fontFamilies.phuduSemiBold,
|
|
1693
1766
|
},
|
|
1694
1767
|
groupedSectionWrapper: {
|
|
1695
|
-
marginHorizontal: 16,
|
|
1696
1768
|
backgroundColor: 'transparent',
|
|
1697
1769
|
},
|
|
1698
1770
|
|
|
@@ -1759,7 +1831,7 @@ const styles = StyleSheet.create({
|
|
|
1759
1831
|
alignItems: 'center',
|
|
1760
1832
|
justifyContent: 'center',
|
|
1761
1833
|
gap: 8,
|
|
1762
|
-
backgroundColor
|
|
1834
|
+
// backgroundColor should be applied inline using colors.iconSecurity
|
|
1763
1835
|
paddingVertical: 12,
|
|
1764
1836
|
paddingHorizontal: 16,
|
|
1765
1837
|
borderRadius: 10,
|
|
@@ -1906,7 +1978,7 @@ const styles = StyleSheet.create({
|
|
|
1906
1978
|
color: '#6C757D',
|
|
1907
1979
|
},
|
|
1908
1980
|
addButton: {
|
|
1909
|
-
backgroundColor
|
|
1981
|
+
// backgroundColor should be applied inline using colors.iconSecurity
|
|
1910
1982
|
},
|
|
1911
1983
|
addButtonText: {
|
|
1912
1984
|
fontSize: 14,
|
|
@@ -1927,7 +1999,7 @@ const styles = StyleSheet.create({
|
|
|
1927
1999
|
addLinkTriggerText: {
|
|
1928
2000
|
fontSize: 14,
|
|
1929
2001
|
fontWeight: '600',
|
|
1930
|
-
color
|
|
2002
|
+
// color should be applied inline using colors.iconSecurity
|
|
1931
2003
|
marginLeft: 6,
|
|
1932
2004
|
},
|
|
1933
2005
|
linksList: {
|
|
@@ -2024,7 +2096,7 @@ const styles = StyleSheet.create({
|
|
|
2024
2096
|
width: 32,
|
|
2025
2097
|
height: 32,
|
|
2026
2098
|
borderRadius: 16,
|
|
2027
|
-
backgroundColor
|
|
2099
|
+
// backgroundColor should be applied inline using colors.iconSecurity
|
|
2028
2100
|
alignItems: 'center',
|
|
2029
2101
|
justifyContent: 'center',
|
|
2030
2102
|
marginRight: 8,
|
|
@@ -2036,7 +2108,7 @@ const styles = StyleSheet.create({
|
|
|
2036
2108
|
},
|
|
2037
2109
|
fetchingText: {
|
|
2038
2110
|
fontSize: 12,
|
|
2039
|
-
color
|
|
2111
|
+
// color should be applied inline using colors.iconSecurity
|
|
2040
2112
|
fontStyle: 'italic',
|
|
2041
2113
|
},
|
|
2042
2114
|
linksFieldContent: {
|
|
@@ -2061,7 +2133,7 @@ const styles = StyleSheet.create({
|
|
|
2061
2133
|
width: 20,
|
|
2062
2134
|
height: 20,
|
|
2063
2135
|
borderRadius: 10,
|
|
2064
|
-
backgroundColor
|
|
2136
|
+
// backgroundColor should be applied inline using colors.iconSecurity
|
|
2065
2137
|
alignItems: 'center',
|
|
2066
2138
|
justifyContent: 'center',
|
|
2067
2139
|
marginRight: 6,
|
|
@@ -2102,7 +2174,7 @@ const styles = StyleSheet.create({
|
|
|
2102
2174
|
},
|
|
2103
2175
|
searchingText: {
|
|
2104
2176
|
fontSize: 12,
|
|
2105
|
-
color
|
|
2177
|
+
// color should be applied inline using colors.iconSecurity
|
|
2106
2178
|
fontStyle: 'italic',
|
|
2107
2179
|
},
|
|
2108
2180
|
addLocationInputContainer: {
|
|
@@ -2143,7 +2215,7 @@ const styles = StyleSheet.create({
|
|
|
2143
2215
|
addLocationTriggerText: {
|
|
2144
2216
|
marginLeft: 8,
|
|
2145
2217
|
fontSize: 16,
|
|
2146
|
-
color
|
|
2218
|
+
// color should be applied inline using colors.iconSecurity
|
|
2147
2219
|
fontWeight: '500',
|
|
2148
2220
|
},
|
|
2149
2221
|
searchResults: {
|
|
@@ -2207,7 +2279,7 @@ const styles = StyleSheet.create({
|
|
|
2207
2279
|
flex: 1,
|
|
2208
2280
|
},
|
|
2209
2281
|
locationLabel: {
|
|
2210
|
-
backgroundColor
|
|
2282
|
+
// backgroundColor should be applied inline using colors.iconSecurity
|
|
2211
2283
|
paddingHorizontal: 6,
|
|
2212
2284
|
paddingVertical: 2,
|
|
2213
2285
|
borderRadius: 4,
|