@oxyhq/services 5.21.7 → 5.22.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 +201 -2
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/lib/commonjs/core/HttpService.js +87 -2
- package/lib/commonjs/core/HttpService.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.assets.js +3 -1
- package/lib/commonjs/core/mixins/OxyServices.assets.js.map +1 -1
- package/lib/commonjs/i18n/locales/en-US.json +3 -3
- package/lib/commonjs/i18n/locales/es-ES.json +240 -19
- package/lib/commonjs/ui/components/Avatar.js +1 -1
- package/lib/commonjs/ui/components/Avatar.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +1 -1
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/FontLoader.js +34 -34
- package/lib/commonjs/ui/components/FontLoader.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js +4 -4
- package/lib/commonjs/ui/components/Header.js.map +1 -1
- package/lib/commonjs/ui/components/OxyPayButton.js +1 -1
- package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +2 -1
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
- package/lib/commonjs/ui/components/SectionTitle.js +1 -1
- package/lib/commonjs/ui/components/SectionTitle.js.map +1 -1
- package/lib/commonjs/ui/components/StepBasedScreen.js +2 -1
- package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js +2 -1
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/styles.js +17 -17
- package/lib/commonjs/ui/components/fileManagement/styles.js.map +1 -1
- package/lib/commonjs/ui/components/payment/paymentStyles.js +7 -7
- package/lib/commonjs/ui/components/payment/paymentStyles.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +2 -0
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +4 -2
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +13 -5
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +273 -1820
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +3 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +2 -2
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +640 -0
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js +39 -21
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +9 -3
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +4 -2
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +3 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +11 -12
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +12 -4
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +3 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +15 -5
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +3 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +2 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +2 -4
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +3 -3
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +3 -3
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/styles/authStyles.js +5 -4
- package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
- package/lib/commonjs/ui/styles/fonts.js +27 -27
- package/lib/commonjs/ui/styles/fonts.js.map +1 -1
- package/lib/commonjs/ui/styles/theme.js +3 -3
- package/lib/commonjs/ui/styles/theme.js.map +1 -1
- package/lib/commonjs/web.js +682 -0
- package/lib/commonjs/web.js.map +1 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/lib/module/core/HttpService.js +87 -2
- package/lib/module/core/HttpService.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.assets.js +3 -1
- package/lib/module/core/mixins/OxyServices.assets.js.map +1 -1
- package/lib/module/i18n/locales/en-US.json +3 -3
- package/lib/module/i18n/locales/es-ES.json +240 -19
- package/lib/module/ui/components/Avatar.js +1 -1
- package/lib/module/ui/components/Avatar.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +1 -1
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/FontLoader.js +34 -34
- package/lib/module/ui/components/FontLoader.js.map +1 -1
- package/lib/module/ui/components/Header.js +4 -4
- package/lib/module/ui/components/Header.js.map +1 -1
- package/lib/module/ui/components/OxyPayButton.js +1 -1
- package/lib/module/ui/components/OxyPayButton.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +2 -1
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +1 -1
- package/lib/module/ui/components/ProfileCard.js.map +1 -1
- package/lib/module/ui/components/SectionTitle.js +1 -1
- package/lib/module/ui/components/SectionTitle.js.map +1 -1
- package/lib/module/ui/components/StepBasedScreen.js +2 -1
- package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/module/ui/components/feedback/feedbackStyles.js +2 -1
- package/lib/module/ui/components/feedback/feedbackStyles.js.map +1 -1
- package/lib/module/ui/components/fileManagement/styles.js +17 -17
- package/lib/module/ui/components/fileManagement/styles.js.map +1 -1
- package/lib/module/ui/components/payment/paymentStyles.js +7 -7
- package/lib/module/ui/components/payment/paymentStyles.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +2 -0
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +4 -2
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +13 -5
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +277 -1824
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +3 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +2 -2
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +635 -0
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -0
- package/lib/module/ui/screens/FileManagementScreen.js +39 -21
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +9 -3
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +4 -2
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +3 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +11 -12
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +12 -4
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +3 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +15 -5
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +3 -1
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +2 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +2 -4
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +3 -3
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +3 -3
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/styles/authStyles.js +5 -4
- package/lib/module/ui/styles/authStyles.js.map +1 -1
- package/lib/module/ui/styles/fonts.js +27 -27
- package/lib/module/ui/styles/fonts.js.map +1 -1
- package/lib/module/ui/styles/theme.js +3 -3
- package/lib/module/ui/styles/theme.js.map +1 -1
- package/lib/module/web.js +75 -0
- package/lib/module/web.js.map +1 -0
- package/lib/typescript/commonjs/core/HttpService.d.ts +5 -0
- package/lib/typescript/commonjs/core/HttpService.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/StepBasedScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts +13 -0
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/styles/fonts.d.ts +7 -7
- package/lib/typescript/commonjs/ui/styles/theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/web.d.ts +54 -0
- package/lib/typescript/commonjs/web.d.ts.map +1 -0
- package/lib/typescript/module/core/HttpService.d.ts +5 -0
- package/lib/typescript/module/core/HttpService.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/StepBasedScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/feedback/feedbackStyles.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts +13 -0
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/styles/fonts.d.ts +7 -7
- package/lib/typescript/module/ui/styles/theme.d.ts.map +1 -1
- package/lib/typescript/module/web.d.ts +54 -0
- package/lib/typescript/module/web.d.ts.map +1 -0
- package/package.json +27 -41
- package/src/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/src/core/HttpService.ts +91 -0
- package/src/core/mixins/OxyServices.assets.ts +1 -1
- package/src/i18n/locales/en-US.json +3 -3
- package/src/i18n/locales/es-ES.json +240 -19
- package/src/ui/components/Avatar.tsx +1 -1
- package/src/ui/components/FollowButton.tsx +1 -1
- package/src/ui/components/FontLoader.tsx +34 -34
- package/src/ui/components/Header.tsx +4 -4
- package/src/ui/components/OxyPayButton.tsx +1 -1
- package/src/ui/components/OxySignInButton.tsx +2 -1
- package/src/ui/components/ProfileCard.tsx +1 -1
- package/src/ui/components/SectionTitle.tsx +1 -1
- package/src/ui/components/StepBasedScreen.tsx +2 -1
- package/src/ui/components/feedback/feedbackStyles.ts +2 -1
- package/src/ui/components/fileManagement/styles.ts +17 -17
- package/src/ui/components/payment/paymentStyles.ts +7 -7
- package/src/ui/navigation/routes.ts +3 -0
- package/src/ui/screens/AccountCenterScreen.tsx +4 -2
- package/src/ui/screens/AccountOverviewScreen.tsx +13 -5
- package/src/ui/screens/AccountSettingsScreen.tsx +35 -1511
- package/src/ui/screens/AccountSwitcherScreen.tsx +1 -1
- package/src/ui/screens/AccountVerificationScreen.tsx +3 -1
- package/src/ui/screens/AppInfoScreen.tsx +2 -2
- package/src/ui/screens/EditProfileFieldScreen.tsx +685 -0
- package/src/ui/screens/FileManagementScreen.tsx +33 -15
- package/src/ui/screens/HistoryViewScreen.tsx +9 -3
- package/src/ui/screens/LanguageSelectorScreen.tsx +4 -2
- package/src/ui/screens/LegalDocumentsScreen.tsx +3 -1
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +11 -13
- package/src/ui/screens/PrivacySettingsScreen.tsx +12 -4
- package/src/ui/screens/SearchSettingsScreen.tsx +3 -1
- package/src/ui/screens/SessionManagementScreen.tsx +15 -5
- package/src/ui/screens/UserLinksScreen.tsx +3 -1
- package/src/ui/screens/WelcomeNewUserScreen.tsx +2 -1
- package/src/ui/screens/karma/KarmaAboutScreen.tsx +6 -8
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +3 -3
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +3 -3
- package/src/ui/styles/authStyles.ts +4 -4
- package/src/ui/styles/fonts.ts +26 -26
- package/src/ui/styles/theme.ts +3 -5
- package/src/web.ts +230 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
- package/lib/commonjs/ui/components/profile/EditBioModal.js +0 -49
- package/lib/commonjs/ui/components/profile/EditBioModal.js.map +0 -1
- package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js +0 -54
- package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js.map +0 -1
- package/lib/commonjs/ui/components/profile/EditEmailModal.js +0 -57
- package/lib/commonjs/ui/components/profile/EditEmailModal.js.map +0 -1
- package/lib/commonjs/ui/components/profile/EditFieldModal.js +0 -412
- package/lib/commonjs/ui/components/profile/EditFieldModal.js.map +0 -1
- package/lib/commonjs/ui/components/profile/EditLinksModal.js +0 -315
- package/lib/commonjs/ui/components/profile/EditLinksModal.js.map +0 -1
- package/lib/commonjs/ui/components/profile/EditLocationModal.js +0 -91
- package/lib/commonjs/ui/components/profile/EditLocationModal.js.map +0 -1
- package/lib/commonjs/ui/components/profile/EditUsernameModal.js +0 -55
- package/lib/commonjs/ui/components/profile/EditUsernameModal.js.map +0 -1
- package/lib/module/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
- package/lib/module/ui/components/profile/EditBioModal.js +0 -43
- package/lib/module/ui/components/profile/EditBioModal.js.map +0 -1
- package/lib/module/ui/components/profile/EditDisplayNameModal.js +0 -48
- package/lib/module/ui/components/profile/EditDisplayNameModal.js.map +0 -1
- package/lib/module/ui/components/profile/EditEmailModal.js +0 -51
- package/lib/module/ui/components/profile/EditEmailModal.js.map +0 -1
- package/lib/module/ui/components/profile/EditFieldModal.js +0 -406
- package/lib/module/ui/components/profile/EditFieldModal.js.map +0 -1
- package/lib/module/ui/components/profile/EditLinksModal.js +0 -309
- package/lib/module/ui/components/profile/EditLinksModal.js.map +0 -1
- package/lib/module/ui/components/profile/EditLocationModal.js +0 -85
- package/lib/module/ui/components/profile/EditLocationModal.js.map +0 -1
- package/lib/module/ui/components/profile/EditUsernameModal.js +0 -49
- package/lib/module/ui/components/profile/EditUsernameModal.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/profile/EditBioModal.d.ts +0 -11
- package/lib/typescript/commonjs/ui/components/profile/EditBioModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/profile/EditDisplayNameModal.d.ts +0 -12
- package/lib/typescript/commonjs/ui/components/profile/EditDisplayNameModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/profile/EditEmailModal.d.ts +0 -11
- package/lib/typescript/commonjs/ui/components/profile/EditEmailModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/profile/EditFieldModal.d.ts +0 -110
- package/lib/typescript/commonjs/ui/components/profile/EditFieldModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/profile/EditLinksModal.d.ts +0 -18
- package/lib/typescript/commonjs/ui/components/profile/EditLinksModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/profile/EditLocationModal.d.ts +0 -21
- package/lib/typescript/commonjs/ui/components/profile/EditLocationModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/profile/EditUsernameModal.d.ts +0 -11
- package/lib/typescript/commonjs/ui/components/profile/EditUsernameModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/profile/EditBioModal.d.ts +0 -11
- package/lib/typescript/module/ui/components/profile/EditBioModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/profile/EditDisplayNameModal.d.ts +0 -12
- package/lib/typescript/module/ui/components/profile/EditDisplayNameModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/profile/EditEmailModal.d.ts +0 -11
- package/lib/typescript/module/ui/components/profile/EditEmailModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/profile/EditFieldModal.d.ts +0 -110
- package/lib/typescript/module/ui/components/profile/EditFieldModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/profile/EditLinksModal.d.ts +0 -18
- package/lib/typescript/module/ui/components/profile/EditLinksModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/profile/EditLocationModal.d.ts +0 -21
- package/lib/typescript/module/ui/components/profile/EditLocationModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/profile/EditUsernameModal.d.ts +0 -11
- package/lib/typescript/module/ui/components/profile/EditUsernameModal.d.ts.map +0 -1
- package/src/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
- package/src/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
- package/src/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
- package/src/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
- package/src/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
- package/src/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
- package/src/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
- package/src/ui/components/profile/EditBioModal.tsx +0 -46
- package/src/ui/components/profile/EditDisplayNameModal.tsx +0 -56
- package/src/ui/components/profile/EditEmailModal.tsx +0 -57
- package/src/ui/components/profile/EditFieldModal.tsx +0 -465
- package/src/ui/components/profile/EditLinksModal.tsx +0 -316
- package/src/ui/components/profile/EditLocationModal.tsx +0 -91
- package/src/ui/components/profile/EditUsernameModal.tsx +0 -55
|
@@ -2,59 +2,36 @@ import React, { useState, useEffect, useRef, useMemo, useCallback } from 'react'
|
|
|
2
2
|
import {
|
|
3
3
|
View,
|
|
4
4
|
Text,
|
|
5
|
-
TouchableOpacity,
|
|
6
5
|
StyleSheet,
|
|
7
6
|
ActivityIndicator,
|
|
8
7
|
ScrollView,
|
|
9
|
-
Alert,
|
|
10
|
-
TextInput,
|
|
11
8
|
Animated,
|
|
12
9
|
Platform,
|
|
13
10
|
Image,
|
|
14
11
|
} from 'react-native';
|
|
15
12
|
import type { BaseScreenProps } from '../types/navigation';
|
|
16
|
-
import Avatar from '../components/Avatar';
|
|
17
|
-
import type { FileMetadata } from '../../models/interfaces';
|
|
18
|
-
import OxyIcon from '../components/icon/OxyIcon';
|
|
19
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
20
|
-
// @ts-ignore - MaterialCommunityIcons is available at runtime
|
|
21
|
-
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
22
13
|
import { toast } from '../../lib/sonner';
|
|
23
14
|
import { fontFamilies } from '../styles/fonts';
|
|
24
15
|
import { confirmAction } from '../utils/confirmAction';
|
|
25
16
|
import { useAuthStore } from '../stores/authStore';
|
|
26
|
-
import {
|
|
17
|
+
import { GroupedSection } from '../components';
|
|
27
18
|
import { useI18n } from '../hooks/useI18n';
|
|
28
19
|
import { useThemeStyles } from '../hooks/useThemeStyles';
|
|
29
20
|
import { useColorScheme } from '../hooks/use-color-scheme';
|
|
30
21
|
import { Colors } from '../constants/theme';
|
|
31
|
-
import { normalizeColorScheme
|
|
32
|
-
import {
|
|
33
|
-
import { EditUsernameModal } from '../components/profile/EditUsernameModal';
|
|
34
|
-
import { EditEmailModal } from '../components/profile/EditEmailModal';
|
|
35
|
-
import { EditBioModal } from '../components/profile/EditBioModal';
|
|
36
|
-
import { EditLocationModal } from '../components/profile/EditLocationModal';
|
|
37
|
-
import { EditLinksModal } from '../components/profile/EditLinksModal';
|
|
22
|
+
import { normalizeColorScheme } from '../utils/themeUtils';
|
|
23
|
+
import type { ProfileFieldType } from './EditProfileFieldScreen';
|
|
38
24
|
import { getDisplayName } from '../utils/user-utils';
|
|
39
|
-
import { TTLCache, registerCacheForCleanup } from '../../utils/cache';
|
|
40
25
|
import { useOxy } from '../context/OxyContext';
|
|
41
26
|
import { useCurrentUser } from '../hooks/queries/useAccountQueries';
|
|
42
|
-
import {
|
|
27
|
+
import { useUploadAvatar } from '../hooks/mutations/useAccountMutations';
|
|
43
28
|
import {
|
|
44
|
-
SCREEN_PADDING_HORIZONTAL,
|
|
45
|
-
SCREEN_PADDING_VERTICAL,
|
|
46
|
-
SECTION_GAP,
|
|
47
29
|
SECTION_GAP_LARGE,
|
|
48
30
|
COMPONENT_GAP,
|
|
49
31
|
HEADER_PADDING_TOP_SETTINGS,
|
|
50
32
|
createScreenContentStyle,
|
|
51
33
|
} from '../constants/spacing';
|
|
52
34
|
|
|
53
|
-
// Caches for link metadata and location searches
|
|
54
|
-
const linkMetadataCache = new TTLCache<any>(30 * 60 * 1000); // 30 minutes cache for link metadata
|
|
55
|
-
const locationSearchCache = new TTLCache<any[]>(60 * 60 * 1000); // 1 hour cache for location searches
|
|
56
|
-
registerCacheForCleanup(linkMetadataCache);
|
|
57
|
-
registerCacheForCleanup(locationSearchCache);
|
|
58
35
|
|
|
59
36
|
|
|
60
37
|
const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string; initialSection?: string }> = ({
|
|
@@ -70,26 +47,20 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
70
47
|
const {
|
|
71
48
|
oxyServices,
|
|
72
49
|
isAuthenticated,
|
|
73
|
-
activeSessionId,
|
|
74
50
|
} = useOxy();
|
|
75
51
|
const { t } = useI18n();
|
|
76
|
-
const normalizedTheme = normalizeTheme(theme);
|
|
77
52
|
|
|
78
53
|
// Use TanStack Query for user data
|
|
79
54
|
const { data: user, isLoading: userLoading } = useCurrentUser({ enabled: isAuthenticated });
|
|
80
|
-
const updateProfileMutation = useUpdateProfile();
|
|
81
55
|
const uploadAvatarMutation = useUploadAvatar();
|
|
82
56
|
|
|
83
57
|
// Fallback to store for backward compatibility
|
|
84
58
|
const userFromStore = useAuthStore((state) => state.user);
|
|
85
59
|
const finalUser = user || userFromStore;
|
|
86
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
87
|
-
const isSaving = updateProfileMutation.isPending;
|
|
88
60
|
const isUpdatingAvatar = uploadAvatarMutation.isPending;
|
|
89
61
|
const [optimisticAvatarId, setOptimisticAvatarId] = useState<string | null>(null);
|
|
90
62
|
const scrollViewRef = useRef<ScrollView>(null);
|
|
91
63
|
const avatarSectionRef = useRef<View>(null);
|
|
92
|
-
const [avatarSectionY, setAvatarSectionY] = useState<number | null>(null);
|
|
93
64
|
|
|
94
65
|
// Section refs for navigation
|
|
95
66
|
const profilePictureSectionRef = useRef<View>(null);
|
|
@@ -106,8 +77,6 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
106
77
|
const [securitySectionY, setSecuritySectionY] = useState<number | null>(null);
|
|
107
78
|
|
|
108
79
|
|
|
109
|
-
// Animation refs
|
|
110
|
-
const saveButtonScale = useRef(new Animated.Value(1)).current;
|
|
111
80
|
|
|
112
81
|
// Form state
|
|
113
82
|
const [displayName, setDisplayName] = useState('');
|
|
@@ -119,13 +88,10 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
119
88
|
const [links, setLinks] = useState<string[]>([]);
|
|
120
89
|
const [avatarFileId, setAvatarFileId] = useState('');
|
|
121
90
|
|
|
122
|
-
//
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const [showEditBioModal, setShowEditBioModal] = useState(false);
|
|
127
|
-
const [showEditLocationModal, setShowEditLocationModal] = useState(false);
|
|
128
|
-
const [showEditLinksModal, setShowEditLinksModal] = useState(false);
|
|
91
|
+
// Navigation helper for editing fields
|
|
92
|
+
const navigateToEditField = useCallback((fieldType: ProfileFieldType) => {
|
|
93
|
+
navigate?.('EditProfileField', { fieldType });
|
|
94
|
+
}, [navigate]);
|
|
129
95
|
|
|
130
96
|
// Location and links state (for display only - modals handle editing)
|
|
131
97
|
const [locations, setLocations] = useState<Array<{
|
|
@@ -142,35 +108,6 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
142
108
|
id: string;
|
|
143
109
|
}>>([]);
|
|
144
110
|
|
|
145
|
-
// State for inline editing (used by old renderEditingField code)
|
|
146
|
-
const [editingField, setEditingField] = useState<string | null>(null);
|
|
147
|
-
const [tempDisplayName, setTempDisplayName] = useState('');
|
|
148
|
-
const [tempLastName, setTempLastName] = useState('');
|
|
149
|
-
const [tempUsername, setTempUsername] = useState('');
|
|
150
|
-
const [tempEmail, setTempEmail] = useState('');
|
|
151
|
-
const [tempBio, setTempBio] = useState('');
|
|
152
|
-
const [tempLocation, setTempLocation] = useState('');
|
|
153
|
-
const [tempLinks, setTempLinks] = useState<string[]>([]);
|
|
154
|
-
const [tempLocations, setTempLocations] = useState<Array<{
|
|
155
|
-
id: string;
|
|
156
|
-
name: string;
|
|
157
|
-
label?: string;
|
|
158
|
-
coordinates?: { lat: number; lon: number };
|
|
159
|
-
}>>([]);
|
|
160
|
-
const [tempLinksWithMetadata, setTempLinksWithMetadata] = useState<Array<{
|
|
161
|
-
url: string;
|
|
162
|
-
title?: string;
|
|
163
|
-
description?: string;
|
|
164
|
-
image?: string;
|
|
165
|
-
id: string;
|
|
166
|
-
}>>([]);
|
|
167
|
-
const [isAddingLocation, setIsAddingLocation] = useState(false);
|
|
168
|
-
const [isSearchingLocations, setIsSearchingLocations] = useState(false);
|
|
169
|
-
const [locationSearchResults, setLocationSearchResults] = useState<any[]>([]);
|
|
170
|
-
const [newLocationQuery, setNewLocationQuery] = useState('');
|
|
171
|
-
const [isAddingLink, setIsAddingLink] = useState(false);
|
|
172
|
-
const [isFetchingMetadata, setIsFetchingMetadata] = useState(false);
|
|
173
|
-
const [newLinkUrl, setNewLinkUrl] = useState('');
|
|
174
111
|
|
|
175
112
|
// Get theme colors using centralized hook
|
|
176
113
|
const colorScheme = useColorScheme();
|
|
@@ -180,24 +117,6 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
180
117
|
// useThemeStyles always returns colors, but add safety check for edge cases
|
|
181
118
|
const colors = themeStyles.colors || Colors[normalizeColorScheme(colorScheme, theme || 'light')];
|
|
182
119
|
|
|
183
|
-
// Memoize onBack handler to provide stable reference for Reanimated
|
|
184
|
-
const handleBack = useMemo(() => {
|
|
185
|
-
return goBack || onClose || undefined;
|
|
186
|
-
}, [goBack, onClose]);
|
|
187
|
-
|
|
188
|
-
// Memoize animation function to prevent recreation on every render
|
|
189
|
-
const animateSaveButton = useCallback((toValue: number, onComplete?: () => void) => {
|
|
190
|
-
Animated.spring(saveButtonScale, {
|
|
191
|
-
toValue,
|
|
192
|
-
useNativeDriver: Platform.OS !== 'web',
|
|
193
|
-
tension: 150,
|
|
194
|
-
friction: 8,
|
|
195
|
-
}).start(onComplete ? (finished) => {
|
|
196
|
-
if (finished) {
|
|
197
|
-
onComplete();
|
|
198
|
-
}
|
|
199
|
-
} : undefined);
|
|
200
|
-
}, [saveButtonScale]);
|
|
201
120
|
|
|
202
121
|
// Track initialization to prevent unnecessary resets
|
|
203
122
|
const isInitializedRef = useRef(false);
|
|
@@ -305,117 +224,6 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
305
224
|
}, [finalUser, avatarFileId, isUpdatingAvatar, optimisticAvatarId]);
|
|
306
225
|
|
|
307
226
|
// Set initial editing field if provided via props (e.g., from navigation)
|
|
308
|
-
// Use a ref to track if we've already set the initial field to avoid loops
|
|
309
|
-
const hasSetInitialFieldRef = useRef(false);
|
|
310
|
-
const previousInitialFieldRef = useRef<string | undefined>(undefined);
|
|
311
|
-
const initialFieldTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
312
|
-
|
|
313
|
-
// Delay constant for scroll completion
|
|
314
|
-
const SCROLL_DELAY_MS = 600;
|
|
315
|
-
|
|
316
|
-
// Helper functions for inline editing (legacy support)
|
|
317
|
-
const startEditing = useCallback((field: string, initialValue: string) => {
|
|
318
|
-
setEditingField(field);
|
|
319
|
-
switch (field) {
|
|
320
|
-
case 'displayName':
|
|
321
|
-
setTempDisplayName(initialValue || displayName);
|
|
322
|
-
setTempLastName(lastName);
|
|
323
|
-
break;
|
|
324
|
-
case 'username':
|
|
325
|
-
setTempUsername(initialValue || username);
|
|
326
|
-
break;
|
|
327
|
-
case 'email':
|
|
328
|
-
setTempEmail(initialValue || email);
|
|
329
|
-
break;
|
|
330
|
-
case 'bio':
|
|
331
|
-
setTempBio(initialValue || bio);
|
|
332
|
-
break;
|
|
333
|
-
case 'location':
|
|
334
|
-
setTempLocations([...locations]);
|
|
335
|
-
break;
|
|
336
|
-
case 'links':
|
|
337
|
-
setTempLinksWithMetadata([...linksMetadata]);
|
|
338
|
-
break;
|
|
339
|
-
}
|
|
340
|
-
}, [displayName, lastName, username, email, bio, locations, linksMetadata]);
|
|
341
|
-
|
|
342
|
-
const cancelEditing = useCallback(() => {
|
|
343
|
-
setEditingField(null);
|
|
344
|
-
setTempDisplayName('');
|
|
345
|
-
setTempLastName('');
|
|
346
|
-
setTempUsername('');
|
|
347
|
-
setTempEmail('');
|
|
348
|
-
setTempBio('');
|
|
349
|
-
setTempLocation('');
|
|
350
|
-
setTempLinks([]);
|
|
351
|
-
setTempLocations([]);
|
|
352
|
-
setTempLinksWithMetadata([]);
|
|
353
|
-
setIsAddingLocation(false);
|
|
354
|
-
setIsSearchingLocations(false);
|
|
355
|
-
setLocationSearchResults([]);
|
|
356
|
-
setNewLocationQuery('');
|
|
357
|
-
setIsAddingLink(false);
|
|
358
|
-
setIsFetchingMetadata(false);
|
|
359
|
-
setNewLinkUrl('');
|
|
360
|
-
}, []);
|
|
361
|
-
|
|
362
|
-
const saveField = useCallback(async (field: string | null) => {
|
|
363
|
-
if (!field) return;
|
|
364
|
-
|
|
365
|
-
try {
|
|
366
|
-
switch (field) {
|
|
367
|
-
case 'displayName':
|
|
368
|
-
await updateProfileMutation.mutateAsync({ name: { first: tempDisplayName, last: tempLastName } });
|
|
369
|
-
setDisplayName(tempDisplayName);
|
|
370
|
-
setLastName(tempLastName);
|
|
371
|
-
break;
|
|
372
|
-
case 'username':
|
|
373
|
-
await updateProfileMutation.mutateAsync({ username: tempUsername });
|
|
374
|
-
setUsername(tempUsername);
|
|
375
|
-
break;
|
|
376
|
-
case 'email':
|
|
377
|
-
await updateProfileMutation.mutateAsync({ email: tempEmail });
|
|
378
|
-
setEmail(tempEmail);
|
|
379
|
-
break;
|
|
380
|
-
case 'bio':
|
|
381
|
-
await updateProfileMutation.mutateAsync({ bio: tempBio });
|
|
382
|
-
setBio(tempBio);
|
|
383
|
-
break;
|
|
384
|
-
case 'location':
|
|
385
|
-
await updateProfileMutation.mutateAsync({ locations: tempLocations });
|
|
386
|
-
setLocations(tempLocations);
|
|
387
|
-
break;
|
|
388
|
-
case 'links':
|
|
389
|
-
await updateProfileMutation.mutateAsync({ linksMetadata: tempLinksWithMetadata });
|
|
390
|
-
setLinksMetadata(tempLinksWithMetadata);
|
|
391
|
-
setLinks(tempLinksWithMetadata.map(l => l.url));
|
|
392
|
-
break;
|
|
393
|
-
}
|
|
394
|
-
setEditingField(null);
|
|
395
|
-
toast.success(t('editProfile.toasts.saved') || 'Saved');
|
|
396
|
-
} catch (error: any) {
|
|
397
|
-
// Error is already handled by mutation's onError
|
|
398
|
-
}
|
|
399
|
-
}, [tempDisplayName, tempLastName, tempUsername, tempEmail, tempBio, tempLocations, tempLinksWithMetadata, updateProfileMutation, t]);
|
|
400
|
-
|
|
401
|
-
// Helper to get current value for a field
|
|
402
|
-
const getFieldCurrentValue = useCallback((field: string): string => {
|
|
403
|
-
switch (field) {
|
|
404
|
-
case 'displayName':
|
|
405
|
-
return displayName;
|
|
406
|
-
case 'username':
|
|
407
|
-
return username;
|
|
408
|
-
case 'email':
|
|
409
|
-
return email;
|
|
410
|
-
case 'bio':
|
|
411
|
-
return bio;
|
|
412
|
-
case 'location':
|
|
413
|
-
case 'links':
|
|
414
|
-
default:
|
|
415
|
-
return '';
|
|
416
|
-
}
|
|
417
|
-
}, [displayName, username, email, bio]);
|
|
418
|
-
|
|
419
227
|
// Handle initialSection prop to scroll to specific section
|
|
420
228
|
const hasScrolledToSectionRef = useRef(false);
|
|
421
229
|
const previousInitialSectionRef = useRef<string | undefined>(undefined);
|
|
@@ -452,48 +260,6 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
452
260
|
}
|
|
453
261
|
}, [initialSection, sectionYPositions]);
|
|
454
262
|
|
|
455
|
-
const handleSave = async () => {
|
|
456
|
-
if (!finalUser) return;
|
|
457
|
-
|
|
458
|
-
try {
|
|
459
|
-
animateSaveButton(0.95); // Scale down slightly for animation
|
|
460
|
-
|
|
461
|
-
const updates: Record<string, any> = {
|
|
462
|
-
username,
|
|
463
|
-
email,
|
|
464
|
-
bio,
|
|
465
|
-
location: locations.length > 0 ? locations[0].name : '', // Keep backward compatibility
|
|
466
|
-
locations: locations.length > 0 ? locations : undefined,
|
|
467
|
-
links,
|
|
468
|
-
linksMetadata: linksMetadata.length > 0 ? linksMetadata : undefined,
|
|
469
|
-
};
|
|
470
|
-
|
|
471
|
-
// Handle name field
|
|
472
|
-
if (displayName || lastName) {
|
|
473
|
-
updates.name = { first: displayName, last: lastName };
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
// Handle avatar
|
|
477
|
-
if (avatarFileId !== (typeof finalUser.avatar === 'string' ? finalUser.avatar : '')) {
|
|
478
|
-
updates.avatar = avatarFileId;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
await updateProfileMutation.mutateAsync(updates);
|
|
482
|
-
toast.success(t('editProfile.toasts.profileUpdated') || 'Profile updated successfully');
|
|
483
|
-
|
|
484
|
-
animateSaveButton(1); // Scale back to normal
|
|
485
|
-
|
|
486
|
-
if (onClose) {
|
|
487
|
-
onClose();
|
|
488
|
-
} else if (goBack) {
|
|
489
|
-
goBack();
|
|
490
|
-
}
|
|
491
|
-
} catch (error: any) {
|
|
492
|
-
// Error is already handled by mutation's onError
|
|
493
|
-
animateSaveButton(1); // Scale back to normal on error
|
|
494
|
-
}
|
|
495
|
-
};
|
|
496
|
-
|
|
497
263
|
const handleAvatarRemove = () => {
|
|
498
264
|
confirmAction(t('editProfile.confirms.removeAvatar') || 'Remove your profile picture?', () => {
|
|
499
265
|
setAvatarFileId('');
|
|
@@ -503,65 +269,15 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
503
269
|
|
|
504
270
|
const { openAvatarPicker } = useOxy();
|
|
505
271
|
|
|
506
|
-
// Handlers to
|
|
507
|
-
const handleOpenDisplayNameModal = useCallback(() =>
|
|
508
|
-
const handleOpenUsernameModal = useCallback(() =>
|
|
509
|
-
const handleOpenEmailModal = useCallback(() =>
|
|
510
|
-
const handleOpenBioModal = useCallback(() =>
|
|
511
|
-
const handleOpenLocationModal = useCallback(() =>
|
|
512
|
-
const handleOpenLinksModal = useCallback(() =>
|
|
513
|
-
|
|
514
|
-
// Handler to refresh data after modal saves
|
|
515
|
-
// Note: Access user directly from store when invoked to get latest value,
|
|
516
|
-
// not from closure which may be stale after modal saves update the backend
|
|
517
|
-
const handleModalSave = useCallback(() => {
|
|
518
|
-
// Get fresh user data from store to ensure we have the latest values
|
|
519
|
-
// after the modal's save operation updates the backend
|
|
520
|
-
// Read from store directly (not from closure) to avoid stale data
|
|
521
|
-
const currentUser = useAuthStore.getState().user;
|
|
522
|
-
|
|
523
|
-
// Reload user data to reflect changes
|
|
524
|
-
if (currentUser) {
|
|
525
|
-
const userDisplayName = typeof currentUser.name === 'string'
|
|
526
|
-
? currentUser.name
|
|
527
|
-
: currentUser.name?.first || currentUser.name?.full || '';
|
|
528
|
-
const userLastName = typeof currentUser.name === 'object' ? currentUser.name?.last || '' : '';
|
|
529
|
-
setDisplayName(userDisplayName);
|
|
530
|
-
setLastName(userLastName);
|
|
531
|
-
setUsername(currentUser.username || '');
|
|
532
|
-
setEmail(currentUser.email || '');
|
|
533
|
-
setBio(currentUser.bio || '');
|
|
534
|
-
|
|
535
|
-
// Reload locations and links
|
|
536
|
-
if (currentUser.locations && Array.isArray(currentUser.locations)) {
|
|
537
|
-
setLocations(currentUser.locations.map((loc, index) => ({
|
|
538
|
-
id: loc.id || `existing-${index}`,
|
|
539
|
-
name: loc.name,
|
|
540
|
-
label: loc.label,
|
|
541
|
-
coordinates: loc.coordinates
|
|
542
|
-
})));
|
|
543
|
-
} else if (currentUser.location) {
|
|
544
|
-
setLocations([{
|
|
545
|
-
id: 'existing-0',
|
|
546
|
-
name: currentUser.location,
|
|
547
|
-
label: 'Location'
|
|
548
|
-
}]);
|
|
549
|
-
} else {
|
|
550
|
-
setLocations([]);
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
if (currentUser.linksMetadata && Array.isArray(currentUser.linksMetadata)) {
|
|
554
|
-
setLinksMetadata(currentUser.linksMetadata.map((link, index) => ({
|
|
555
|
-
...link,
|
|
556
|
-
id: link.id || `existing-${index}`
|
|
557
|
-
})));
|
|
558
|
-
} else {
|
|
559
|
-
setLinksMetadata([]);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
}, []); // Empty dependency array - callback reads fresh data from store at call time
|
|
272
|
+
// Handlers to navigate to edit screens
|
|
273
|
+
const handleOpenDisplayNameModal = useCallback(() => navigateToEditField('displayName'), [navigateToEditField]);
|
|
274
|
+
const handleOpenUsernameModal = useCallback(() => navigateToEditField('username'), [navigateToEditField]);
|
|
275
|
+
const handleOpenEmailModal = useCallback(() => navigateToEditField('email'), [navigateToEditField]);
|
|
276
|
+
const handleOpenBioModal = useCallback(() => navigateToEditField('bio'), [navigateToEditField]);
|
|
277
|
+
const handleOpenLocationModal = useCallback(() => navigateToEditField('locations'), [navigateToEditField]);
|
|
278
|
+
const handleOpenLinksModal = useCallback(() => navigateToEditField('links'), [navigateToEditField]);
|
|
563
279
|
|
|
564
|
-
// Handle initialField prop -
|
|
280
|
+
// Handle initialField prop - navigate to appropriate edit screen
|
|
565
281
|
useEffect(() => {
|
|
566
282
|
if (initialField) {
|
|
567
283
|
// Special handling for avatar - open avatar picker directly
|
|
@@ -570,539 +286,32 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
570
286
|
openAvatarPicker();
|
|
571
287
|
}, 300);
|
|
572
288
|
} else {
|
|
573
|
-
//
|
|
289
|
+
// Navigate to edit screen
|
|
574
290
|
setTimeout(() => {
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
break;
|
|
588
|
-
case 'location':
|
|
589
|
-
setShowEditLocationModal(true);
|
|
590
|
-
break;
|
|
591
|
-
case 'links':
|
|
592
|
-
setShowEditLinksModal(true);
|
|
593
|
-
break;
|
|
291
|
+
const fieldTypeMap: Record<string, ProfileFieldType> = {
|
|
292
|
+
displayName: 'displayName',
|
|
293
|
+
username: 'username',
|
|
294
|
+
email: 'email',
|
|
295
|
+
bio: 'bio',
|
|
296
|
+
location: 'locations',
|
|
297
|
+
locations: 'locations',
|
|
298
|
+
links: 'links',
|
|
299
|
+
};
|
|
300
|
+
const fieldType = fieldTypeMap[initialField];
|
|
301
|
+
if (fieldType) {
|
|
302
|
+
navigateToEditField(fieldType);
|
|
594
303
|
}
|
|
595
304
|
}, 300);
|
|
596
305
|
}
|
|
597
306
|
}
|
|
598
|
-
}, [initialField, openAvatarPicker]);
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
// Removed fetchLinkMetadata - now handled by EditLinksModal
|
|
604
|
-
const _fetchLinkMetadata = async (url: string) => {
|
|
605
|
-
// Check cache first
|
|
606
|
-
const cacheKey = url.toLowerCase().trim();
|
|
607
|
-
const cached = linkMetadataCache.get(cacheKey);
|
|
608
|
-
if (cached) {
|
|
609
|
-
return cached;
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
try {
|
|
613
|
-
setIsFetchingMetadata(true);
|
|
614
|
-
|
|
615
|
-
// Use the backend API to fetch metadata
|
|
616
|
-
const metadata = await oxyServices.fetchLinkMetadata(url);
|
|
617
|
-
|
|
618
|
-
const result = {
|
|
619
|
-
...metadata,
|
|
620
|
-
id: Date.now().toString()
|
|
621
|
-
};
|
|
622
|
-
|
|
623
|
-
// Cache the result
|
|
624
|
-
linkMetadataCache.set(cacheKey, result);
|
|
625
|
-
return result;
|
|
626
|
-
} catch (error) {
|
|
627
|
-
// Fallback to basic metadata
|
|
628
|
-
const fallback = {
|
|
629
|
-
url: url.startsWith('http') ? url : 'https://' + url,
|
|
630
|
-
title: url.replace(/^https?:\/\//, '').replace(/\/$/, ''),
|
|
631
|
-
description: 'Link',
|
|
632
|
-
image: undefined,
|
|
633
|
-
id: Date.now().toString()
|
|
634
|
-
};
|
|
635
|
-
// Cache fallback too (shorter TTL)
|
|
636
|
-
linkMetadataCache.set(cacheKey, fallback, 5 * 60 * 1000); // 5 minutes for fallbacks
|
|
637
|
-
return fallback;
|
|
638
|
-
} finally {
|
|
639
|
-
setIsFetchingMetadata(false);
|
|
640
|
-
}
|
|
641
|
-
};
|
|
642
|
-
|
|
643
|
-
// Helper functions for inline editing (legacy support - still used by renderEditingField)
|
|
644
|
-
const searchLocations = async (query: string) => {
|
|
645
|
-
if (!query.trim() || query.length < 3) {
|
|
646
|
-
setLocationSearchResults([]);
|
|
647
|
-
return;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
// Check cache first
|
|
651
|
-
const cacheKey = query.toLowerCase().trim();
|
|
652
|
-
const cached = locationSearchCache.get(cacheKey);
|
|
653
|
-
if (cached) {
|
|
654
|
-
setLocationSearchResults(cached);
|
|
655
|
-
return;
|
|
656
|
-
}
|
|
307
|
+
}, [initialField, openAvatarPicker, navigateToEditField]);
|
|
657
308
|
|
|
658
|
-
try {
|
|
659
|
-
setIsSearchingLocations(true);
|
|
660
|
-
const response = await fetch(
|
|
661
|
-
`https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(query)}&limit=5&addressdetails=1`
|
|
662
|
-
);
|
|
663
|
-
const data = await response.json();
|
|
664
309
|
|
|
665
|
-
// Cache the results
|
|
666
|
-
locationSearchCache.set(cacheKey, data);
|
|
667
|
-
setLocationSearchResults(data);
|
|
668
|
-
} catch (error) {
|
|
669
|
-
setLocationSearchResults([]);
|
|
670
|
-
} finally {
|
|
671
|
-
setIsSearchingLocations(false);
|
|
672
|
-
}
|
|
673
|
-
};
|
|
674
310
|
|
|
675
|
-
const addLocation = (locationData: {
|
|
676
|
-
place_id: number;
|
|
677
|
-
display_name: string;
|
|
678
|
-
lat: string;
|
|
679
|
-
lon: string;
|
|
680
|
-
type: string;
|
|
681
|
-
}) => {
|
|
682
|
-
const newLocation = {
|
|
683
|
-
id: Date.now().toString(),
|
|
684
|
-
name: locationData.display_name,
|
|
685
|
-
label: locationData.type === 'city' ? 'City' :
|
|
686
|
-
locationData.type === 'country' ? 'Country' :
|
|
687
|
-
locationData.type === 'state' ? 'State' : 'Location',
|
|
688
|
-
coordinates: {
|
|
689
|
-
lat: Number.parseFloat(locationData.lat),
|
|
690
|
-
lon: Number.parseFloat(locationData.lon)
|
|
691
|
-
}
|
|
692
|
-
};
|
|
693
|
-
|
|
694
|
-
setTempLocations(prev => [...prev, newLocation]);
|
|
695
|
-
setNewLocationQuery('');
|
|
696
|
-
setLocationSearchResults([]);
|
|
697
|
-
setIsAddingLocation(false);
|
|
698
|
-
};
|
|
699
|
-
|
|
700
|
-
const removeLocation = (id: string) => {
|
|
701
|
-
setTempLocations(prev => prev.filter(loc => loc.id !== id));
|
|
702
|
-
};
|
|
703
|
-
|
|
704
|
-
const moveLocation = (fromIndex: number, toIndex: number) => {
|
|
705
|
-
setTempLocations(prev => {
|
|
706
|
-
const newLocations = [...prev];
|
|
707
|
-
const [movedLocation] = newLocations.splice(fromIndex, 1);
|
|
708
|
-
newLocations.splice(toIndex, 0, movedLocation);
|
|
709
|
-
return newLocations;
|
|
710
|
-
});
|
|
711
|
-
};
|
|
712
|
-
|
|
713
|
-
const addLink = async () => {
|
|
714
|
-
if (!newLinkUrl.trim()) return;
|
|
715
|
-
|
|
716
|
-
const url = newLinkUrl.trim();
|
|
717
|
-
const metadata = await _fetchLinkMetadata(url);
|
|
718
|
-
|
|
719
|
-
setTempLinksWithMetadata(prev => [...prev, metadata]);
|
|
720
|
-
setNewLinkUrl('');
|
|
721
|
-
setIsAddingLink(false);
|
|
722
|
-
};
|
|
723
|
-
|
|
724
|
-
const removeLink = (id: string) => {
|
|
725
|
-
setTempLinksWithMetadata(prev => prev.filter(link => link.id !== id));
|
|
726
|
-
};
|
|
727
|
-
|
|
728
|
-
const moveLink = (fromIndex: number, toIndex: number) => {
|
|
729
|
-
setTempLinksWithMetadata(prev => {
|
|
730
|
-
const newLinks = [...prev];
|
|
731
|
-
const [movedLink] = newLinks.splice(fromIndex, 1);
|
|
732
|
-
newLinks.splice(toIndex, 0, movedLink);
|
|
733
|
-
return newLinks;
|
|
734
|
-
});
|
|
735
|
-
};
|
|
736
311
|
|
|
737
312
|
// Memoize display name for avatar
|
|
738
313
|
const displayNameForAvatar = useMemo(() => getDisplayName(finalUser), [finalUser]);
|
|
739
314
|
|
|
740
|
-
// Legacy renderEditingField function (fallback)
|
|
741
|
-
const renderEditingField = (type: string | null) => {
|
|
742
|
-
if (!type) return null;
|
|
743
|
-
if (type === 'displayName') {
|
|
744
|
-
return (
|
|
745
|
-
<View style={[styles.editingFieldContainer, { backgroundColor: colors.background }]}>
|
|
746
|
-
<View style={styles.editingFieldContent}>
|
|
747
|
-
<View style={styles.newValueSection}>
|
|
748
|
-
<View style={styles.editingFieldHeader}>
|
|
749
|
-
<Text style={[styles.editingFieldLabel, { color: colors.text }]}>Edit Full Name</Text>
|
|
750
|
-
</View>
|
|
751
|
-
<View style={{ flexDirection: 'row', gap: 12 }}>
|
|
752
|
-
<View style={{ flex: 1 }}>
|
|
753
|
-
<Text style={styles.editingFieldLabel}>First Name</Text>
|
|
754
|
-
<TextInput
|
|
755
|
-
style={styles.editingFieldInput}
|
|
756
|
-
value={tempDisplayName}
|
|
757
|
-
onChangeText={setTempDisplayName}
|
|
758
|
-
placeholder="Enter your first name"
|
|
759
|
-
placeholderTextColor={colors.secondaryText}
|
|
760
|
-
autoFocus
|
|
761
|
-
selectionColor={themeStyles.primaryColor}
|
|
762
|
-
/>
|
|
763
|
-
</View>
|
|
764
|
-
<View style={{ flex: 1 }}>
|
|
765
|
-
<Text style={styles.editingFieldLabel}>Last Name</Text>
|
|
766
|
-
<TextInput
|
|
767
|
-
style={styles.editingFieldInput}
|
|
768
|
-
value={tempLastName}
|
|
769
|
-
onChangeText={setTempLastName}
|
|
770
|
-
placeholder="Enter your last name"
|
|
771
|
-
placeholderTextColor={colors.secondaryText}
|
|
772
|
-
selectionColor={themeStyles.primaryColor}
|
|
773
|
-
/>
|
|
774
|
-
</View>
|
|
775
|
-
</View>
|
|
776
|
-
</View>
|
|
777
|
-
</View>
|
|
778
|
-
</View>
|
|
779
|
-
);
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
if (type === 'location') {
|
|
783
|
-
return (
|
|
784
|
-
<View style={[styles.editingFieldContainer, { backgroundColor: colors.background }]}>
|
|
785
|
-
<View style={styles.editingFieldContent}>
|
|
786
|
-
<View style={styles.newValueSection}>
|
|
787
|
-
<View style={styles.editingFieldHeader}>
|
|
788
|
-
<Text style={[styles.editingFieldLabel, { color: colors.text }]}>Manage Your Locations</Text>
|
|
789
|
-
</View>
|
|
790
|
-
|
|
791
|
-
{/* Add new location section */}
|
|
792
|
-
{isAddingLocation ? (
|
|
793
|
-
<View style={styles.addLocationSection}>
|
|
794
|
-
<Text style={styles.addLocationLabel}>
|
|
795
|
-
Add New Location
|
|
796
|
-
{isSearchingLocations && (
|
|
797
|
-
<Text style={[styles.searchingText, { color: colors.iconSecurity }]}> • Searching...</Text>
|
|
798
|
-
)}
|
|
799
|
-
</Text>
|
|
800
|
-
<View style={styles.addLocationInputContainer}>
|
|
801
|
-
<TextInput
|
|
802
|
-
style={styles.addLocationInput}
|
|
803
|
-
value={newLocationQuery}
|
|
804
|
-
onChangeText={(text) => {
|
|
805
|
-
setNewLocationQuery(text);
|
|
806
|
-
searchLocations(text);
|
|
807
|
-
}}
|
|
808
|
-
placeholder="Search for a location..."
|
|
809
|
-
placeholderTextColor={colors.secondaryText}
|
|
810
|
-
autoFocus
|
|
811
|
-
selectionColor={themeStyles.primaryColor}
|
|
812
|
-
/>
|
|
813
|
-
<View style={styles.addLocationButtons}>
|
|
814
|
-
<TouchableOpacity
|
|
815
|
-
style={[styles.addLocationButton, styles.cancelButton]}
|
|
816
|
-
onPress={() => {
|
|
817
|
-
setIsAddingLocation(false);
|
|
818
|
-
setNewLocationQuery('');
|
|
819
|
-
setLocationSearchResults([]);
|
|
820
|
-
}}
|
|
821
|
-
>
|
|
822
|
-
<Text style={styles.cancelButtonText}>Cancel</Text>
|
|
823
|
-
</TouchableOpacity>
|
|
824
|
-
</View>
|
|
825
|
-
</View>
|
|
826
|
-
|
|
827
|
-
{/* Search results */}
|
|
828
|
-
{locationSearchResults.length > 0 && (
|
|
829
|
-
<View style={styles.searchResults}>
|
|
830
|
-
{locationSearchResults.map((result) => (
|
|
831
|
-
<TouchableOpacity
|
|
832
|
-
key={result.place_id}
|
|
833
|
-
style={styles.searchResultItem}
|
|
834
|
-
onPress={() => addLocation(result)}
|
|
835
|
-
>
|
|
836
|
-
<Text style={styles.searchResultName} numberOfLines={2}>
|
|
837
|
-
{result.display_name}
|
|
838
|
-
</Text>
|
|
839
|
-
<Text style={styles.searchResultType}>
|
|
840
|
-
{result.type}
|
|
841
|
-
</Text>
|
|
842
|
-
</TouchableOpacity>
|
|
843
|
-
))}
|
|
844
|
-
</View>
|
|
845
|
-
)}
|
|
846
|
-
</View>
|
|
847
|
-
) : (
|
|
848
|
-
<TouchableOpacity
|
|
849
|
-
style={styles.addLocationTrigger}
|
|
850
|
-
onPress={() => setIsAddingLocation(true)}
|
|
851
|
-
>
|
|
852
|
-
<OxyIcon name="add" size={20} color={themeStyles.primaryColor} />
|
|
853
|
-
<Text style={[styles.addLocationTriggerText, { color: colors.iconSecurity }]}>Add a new location</Text>
|
|
854
|
-
</TouchableOpacity>
|
|
855
|
-
)}
|
|
856
|
-
|
|
857
|
-
{/* Existing locations list */}
|
|
858
|
-
{tempLocations.length > 0 && (
|
|
859
|
-
<View style={styles.locationsList}>
|
|
860
|
-
<Text style={styles.locationsListTitle}>Your Locations ({tempLocations.length})</Text>
|
|
861
|
-
{tempLocations.map((location, index) => (
|
|
862
|
-
<View key={location.id} style={styles.locationItem}>
|
|
863
|
-
<View style={styles.locationItemContent}>
|
|
864
|
-
<View style={styles.locationItemDragHandle}>
|
|
865
|
-
<View style={styles.reorderButtons}>
|
|
866
|
-
<TouchableOpacity
|
|
867
|
-
style={[styles.reorderButton, index === 0 && styles.reorderButtonDisabled]}
|
|
868
|
-
onPress={() => index > 0 && moveLocation(index, index - 1)}
|
|
869
|
-
disabled={index === 0}
|
|
870
|
-
>
|
|
871
|
-
<OxyIcon name="chevron-up" size={12} color={index === 0 ? "#ccc" : "#666"} />
|
|
872
|
-
</TouchableOpacity>
|
|
873
|
-
<TouchableOpacity
|
|
874
|
-
style={[styles.reorderButton, index === tempLocations.length - 1 && styles.reorderButtonDisabled]}
|
|
875
|
-
onPress={() => index < tempLocations.length - 1 && moveLocation(index, index + 1)}
|
|
876
|
-
disabled={index === tempLocations.length - 1}
|
|
877
|
-
>
|
|
878
|
-
<OxyIcon name="chevron-down" size={12} color={index === tempLocations.length - 1 ? "#ccc" : "#666"} />
|
|
879
|
-
</TouchableOpacity>
|
|
880
|
-
</View>
|
|
881
|
-
</View>
|
|
882
|
-
<View style={styles.locationItemInfo}>
|
|
883
|
-
<View style={styles.locationItemHeader}>
|
|
884
|
-
<Text style={styles.locationItemName} numberOfLines={1}>
|
|
885
|
-
{location.name}
|
|
886
|
-
</Text>
|
|
887
|
-
{location.label && (
|
|
888
|
-
<View style={[styles.locationLabel, { backgroundColor: colors.iconSecurity }]}>
|
|
889
|
-
<Text style={styles.locationLabelText}>
|
|
890
|
-
{location.label}
|
|
891
|
-
</Text>
|
|
892
|
-
</View>
|
|
893
|
-
)}
|
|
894
|
-
</View>
|
|
895
|
-
{location.coordinates && (
|
|
896
|
-
<Text style={styles.locationCoordinates}>
|
|
897
|
-
{location.coordinates.lat.toFixed(4)}, {location.coordinates.lon.toFixed(4)}
|
|
898
|
-
</Text>
|
|
899
|
-
)}
|
|
900
|
-
</View>
|
|
901
|
-
<View style={styles.locationItemActions}>
|
|
902
|
-
<TouchableOpacity
|
|
903
|
-
style={styles.locationItemButton}
|
|
904
|
-
onPress={() => removeLocation(location.id)}
|
|
905
|
-
>
|
|
906
|
-
<OxyIcon name="trash" size={14} color="#FF3B30" />
|
|
907
|
-
</TouchableOpacity>
|
|
908
|
-
</View>
|
|
909
|
-
</View>
|
|
910
|
-
{index < tempLocations.length - 1 && (
|
|
911
|
-
<View style={styles.locationItemDivider} />
|
|
912
|
-
)}
|
|
913
|
-
</View>
|
|
914
|
-
))}
|
|
915
|
-
<View style={styles.reorderHint}>
|
|
916
|
-
<Text style={styles.reorderHintText}>Use ↑↓ buttons to reorder your locations</Text>
|
|
917
|
-
</View>
|
|
918
|
-
</View>
|
|
919
|
-
)}
|
|
920
|
-
</View>
|
|
921
|
-
</View>
|
|
922
|
-
</View>
|
|
923
|
-
);
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
if (type === 'links') {
|
|
927
|
-
return (
|
|
928
|
-
<View style={[styles.editingFieldContainer, { backgroundColor: colors.background }]}>
|
|
929
|
-
<View style={styles.editingFieldContent}>
|
|
930
|
-
<View style={styles.newValueSection}>
|
|
931
|
-
<View style={styles.editingFieldHeader}>
|
|
932
|
-
<Text style={[styles.editingFieldLabel, { color: colors.text }]}>Manage Your Links</Text>
|
|
933
|
-
</View>
|
|
934
|
-
|
|
935
|
-
<GroupedSection
|
|
936
|
-
items={[
|
|
937
|
-
// Add new link item
|
|
938
|
-
...(isAddingLink ? [{
|
|
939
|
-
id: 'add-link-input',
|
|
940
|
-
icon: 'plus',
|
|
941
|
-
iconColor: colors.sidebarIconSharing,
|
|
942
|
-
title: 'Add New Link',
|
|
943
|
-
subtitle: isFetchingMetadata ? 'Fetching metadata...' : 'Enter URL to add a new link',
|
|
944
|
-
customContent: (
|
|
945
|
-
<View style={styles.addLinkInputContainer}>
|
|
946
|
-
<TextInput
|
|
947
|
-
style={styles.addLinkInput}
|
|
948
|
-
value={newLinkUrl}
|
|
949
|
-
onChangeText={setNewLinkUrl}
|
|
950
|
-
placeholder="Enter URL (e.g., https://example.com)"
|
|
951
|
-
placeholderTextColor={colors.secondaryText}
|
|
952
|
-
keyboardType="url"
|
|
953
|
-
autoFocus
|
|
954
|
-
selectionColor={themeStyles.primaryColor}
|
|
955
|
-
/>
|
|
956
|
-
<View style={styles.addLinkButtons}>
|
|
957
|
-
<TouchableOpacity
|
|
958
|
-
style={[styles.addLinkButton, styles.cancelButton]}
|
|
959
|
-
onPress={() => {
|
|
960
|
-
setIsAddingLink(false);
|
|
961
|
-
setNewLinkUrl('');
|
|
962
|
-
}}
|
|
963
|
-
>
|
|
964
|
-
<Text style={styles.cancelButtonText}>Cancel</Text>
|
|
965
|
-
</TouchableOpacity>
|
|
966
|
-
<TouchableOpacity
|
|
967
|
-
style={[styles.addLinkButton, styles.addButton, { backgroundColor: colors.iconSecurity, opacity: isFetchingMetadata ? 0.5 : 1 }]}
|
|
968
|
-
onPress={addLink}
|
|
969
|
-
disabled={isFetchingMetadata}
|
|
970
|
-
>
|
|
971
|
-
{isFetchingMetadata ? (
|
|
972
|
-
<ActivityIndicator size="small" color="#fff" />
|
|
973
|
-
) : (
|
|
974
|
-
<Text style={styles.addButtonText}>Add</Text>
|
|
975
|
-
)}
|
|
976
|
-
</TouchableOpacity>
|
|
977
|
-
</View>
|
|
978
|
-
</View>
|
|
979
|
-
),
|
|
980
|
-
}] : [{
|
|
981
|
-
id: 'add-link-trigger',
|
|
982
|
-
icon: 'plus',
|
|
983
|
-
iconColor: colors.sidebarIconSharing,
|
|
984
|
-
title: 'Add a new link',
|
|
985
|
-
subtitle: 'Tap to add a new link to your profile',
|
|
986
|
-
onPress: () => setIsAddingLink(true),
|
|
987
|
-
}]),
|
|
988
|
-
// Existing links
|
|
989
|
-
...tempLinksWithMetadata.map((link, index) => ({
|
|
990
|
-
id: link.id,
|
|
991
|
-
customIcon: link.image ? (
|
|
992
|
-
<Image source={{ uri: link.image }} style={{ width: 36, height: 36, borderRadius: 18 }} />
|
|
993
|
-
) : undefined,
|
|
994
|
-
icon: !link.image ? 'link-variant' : undefined,
|
|
995
|
-
iconColor: colors.sidebarIconSharing,
|
|
996
|
-
title: link.title || link.url,
|
|
997
|
-
subtitle: link.description && link.description !== link.title ? link.description : link.url,
|
|
998
|
-
customContent: (
|
|
999
|
-
<View style={styles.linkItemActions}>
|
|
1000
|
-
<View style={styles.reorderButtons}>
|
|
1001
|
-
<TouchableOpacity
|
|
1002
|
-
style={[styles.reorderButton, index === 0 && styles.reorderButtonDisabled]}
|
|
1003
|
-
onPress={() => index > 0 && moveLink(index, index - 1)}
|
|
1004
|
-
disabled={index === 0}
|
|
1005
|
-
>
|
|
1006
|
-
<OxyIcon name="chevron-up" size={12} color={index === 0 ? "#ccc" : "#666"} />
|
|
1007
|
-
</TouchableOpacity>
|
|
1008
|
-
<TouchableOpacity
|
|
1009
|
-
style={[styles.reorderButton, index === tempLinksWithMetadata.length - 1 && styles.reorderButtonDisabled]}
|
|
1010
|
-
onPress={() => index < tempLinksWithMetadata.length - 1 && moveLink(index, index + 1)}
|
|
1011
|
-
disabled={index === tempLinksWithMetadata.length - 1}
|
|
1012
|
-
>
|
|
1013
|
-
<OxyIcon name="chevron-down" size={12} color={index === tempLinksWithMetadata.length - 1 ? "#ccc" : "#666"} />
|
|
1014
|
-
</TouchableOpacity>
|
|
1015
|
-
</View>
|
|
1016
|
-
<TouchableOpacity
|
|
1017
|
-
style={styles.linkItemButton}
|
|
1018
|
-
onPress={() => removeLink(link.id)}
|
|
1019
|
-
>
|
|
1020
|
-
<OxyIcon name="trash" size={14} color="#FF3B30" />
|
|
1021
|
-
</TouchableOpacity>
|
|
1022
|
-
</View>
|
|
1023
|
-
),
|
|
1024
|
-
})),
|
|
1025
|
-
]}
|
|
1026
|
-
|
|
1027
|
-
/>
|
|
1028
|
-
{tempLinksWithMetadata.length > 0 && (
|
|
1029
|
-
<View style={styles.reorderHint}>
|
|
1030
|
-
<Text style={styles.reorderHintText}>Use ↑↓ buttons to reorder your links</Text>
|
|
1031
|
-
</View>
|
|
1032
|
-
)}
|
|
1033
|
-
</View>
|
|
1034
|
-
</View>
|
|
1035
|
-
</View>
|
|
1036
|
-
);
|
|
1037
|
-
}
|
|
1038
|
-
const fieldConfig = {
|
|
1039
|
-
displayName: { label: 'Display Name', value: displayName, placeholder: 'Enter your display name', icon: 'account', color: colors.iconPersonalInfo, multiline: false, keyboardType: 'default' as const },
|
|
1040
|
-
username: { label: 'Username', value: username, placeholder: 'Choose a username', icon: 'at', color: colors.iconData, multiline: false, keyboardType: 'default' as const },
|
|
1041
|
-
email: { label: 'Email', value: email, placeholder: 'Enter your email address', icon: 'mail', color: colors.iconStorage, multiline: false, keyboardType: 'email-address' as const },
|
|
1042
|
-
bio: { label: 'Bio', value: bio, placeholder: 'Tell people about yourself...', icon: 'file-document', color: colors.iconPersonalInfo, multiline: true, keyboardType: 'default' as const },
|
|
1043
|
-
location: { label: 'Location', value: location, placeholder: 'Enter your location', icon: 'location', color: colors.iconSharing, multiline: false, keyboardType: 'default' as const },
|
|
1044
|
-
links: { label: 'Links', value: links.join(', '), placeholder: 'Enter your links (comma separated)', icon: 'link', color: colors.iconPersonalInfo, multiline: false, keyboardType: 'url' as const }
|
|
1045
|
-
};
|
|
1046
|
-
|
|
1047
|
-
const config = fieldConfig[type as keyof typeof fieldConfig];
|
|
1048
|
-
if (!config) return null;
|
|
1049
|
-
|
|
1050
|
-
const tempValue = (() => {
|
|
1051
|
-
switch (type) {
|
|
1052
|
-
case 'displayName': return tempDisplayName;
|
|
1053
|
-
case 'username': return tempUsername;
|
|
1054
|
-
case 'email': return tempEmail;
|
|
1055
|
-
case 'bio': return tempBio;
|
|
1056
|
-
case 'location': return tempLocation;
|
|
1057
|
-
case 'links': return tempLinks.join(', ');
|
|
1058
|
-
default: return '';
|
|
1059
|
-
}
|
|
1060
|
-
})();
|
|
1061
|
-
|
|
1062
|
-
const setTempValue = (text: string) => {
|
|
1063
|
-
switch (type) {
|
|
1064
|
-
case 'displayName': setTempDisplayName(text); break;
|
|
1065
|
-
case 'username': setTempUsername(text); break;
|
|
1066
|
-
case 'email': setTempEmail(text); break;
|
|
1067
|
-
case 'bio': setTempBio(text); break;
|
|
1068
|
-
case 'location': setTempLocation(text); break;
|
|
1069
|
-
case 'links': setTempLinks(text.split(',').map(s => s.trim()).filter(Boolean)); break;
|
|
1070
|
-
}
|
|
1071
|
-
};
|
|
1072
|
-
|
|
1073
|
-
return (
|
|
1074
|
-
<View style={[styles.editingFieldContainer, { backgroundColor: colors.background }]}>
|
|
1075
|
-
<View style={styles.editingFieldContent}>
|
|
1076
|
-
<View style={styles.newValueSection}>
|
|
1077
|
-
<View style={styles.editingFieldHeader}>
|
|
1078
|
-
<Text style={[styles.editingFieldLabel, { color: colors.text }]}>
|
|
1079
|
-
{config.label}
|
|
1080
|
-
</Text>
|
|
1081
|
-
</View>
|
|
1082
|
-
<TextInput
|
|
1083
|
-
style={[
|
|
1084
|
-
config.multiline ? styles.editingFieldTextArea : styles.editingFieldInput,
|
|
1085
|
-
{
|
|
1086
|
-
backgroundColor: themeStyles.isDarkTheme ? '#1C1C1E' : '#F2F2F7',
|
|
1087
|
-
color: themeStyles.isDarkTheme ? '#FFFFFF' : '#000000',
|
|
1088
|
-
borderColor: themeStyles.isDarkTheme ? '#38383A' : '#E5E5EA',
|
|
1089
|
-
}
|
|
1090
|
-
]}
|
|
1091
|
-
value={tempValue}
|
|
1092
|
-
onChangeText={setTempValue}
|
|
1093
|
-
placeholder={config.placeholder}
|
|
1094
|
-
placeholderTextColor={themeStyles.isDarkTheme ? '#636366' : '#8E8E93'}
|
|
1095
|
-
multiline={config.multiline}
|
|
1096
|
-
numberOfLines={config.multiline ? 6 : 1}
|
|
1097
|
-
keyboardType={config.keyboardType}
|
|
1098
|
-
autoFocus
|
|
1099
|
-
selectionColor={themeStyles.primaryColor}
|
|
1100
|
-
/>
|
|
1101
|
-
</View>
|
|
1102
|
-
</View>
|
|
1103
|
-
</View>
|
|
1104
|
-
);
|
|
1105
|
-
};
|
|
1106
315
|
|
|
1107
316
|
|
|
1108
317
|
|
|
@@ -1119,98 +328,14 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1119
328
|
|
|
1120
329
|
return (
|
|
1121
330
|
<View style={[styles.container, { backgroundColor: themeStyles.backgroundColor }]}>
|
|
1122
|
-
{/* Header */}
|
|
1123
|
-
{editingField ? (
|
|
1124
|
-
<View style={[styles.editingHeader, {
|
|
1125
|
-
backgroundColor: colors.background,
|
|
1126
|
-
borderBottomColor: colors.border
|
|
1127
|
-
}]}>
|
|
1128
|
-
<View style={styles.editingHeaderContent}>
|
|
1129
|
-
<TouchableOpacity
|
|
1130
|
-
style={[styles.editingBackButton, {
|
|
1131
|
-
backgroundColor: colors.card
|
|
1132
|
-
}]}
|
|
1133
|
-
onPress={cancelEditing}
|
|
1134
|
-
>
|
|
1135
|
-
<Ionicons name="chevron-back" size={20} color={colors.tint} />
|
|
1136
|
-
</TouchableOpacity>
|
|
1137
|
-
<View style={styles.editingTitleContainer}>
|
|
1138
|
-
</View>
|
|
1139
|
-
<TouchableOpacity
|
|
1140
|
-
style={[
|
|
1141
|
-
styles.editingSaveButton,
|
|
1142
|
-
{
|
|
1143
|
-
opacity: isSaving ? 0.5 : 1,
|
|
1144
|
-
backgroundColor: colors.card
|
|
1145
|
-
}
|
|
1146
|
-
]}
|
|
1147
|
-
onPress={() => saveField(editingField)}
|
|
1148
|
-
disabled={isSaving}
|
|
1149
|
-
>
|
|
1150
|
-
{isSaving ? (
|
|
1151
|
-
<ActivityIndicator size="small" color={colors.tint} />
|
|
1152
|
-
) : (
|
|
1153
|
-
<Text style={[styles.editingSaveButtonText, { color: colors.tint }]}>Save</Text>
|
|
1154
|
-
)}
|
|
1155
|
-
</TouchableOpacity>
|
|
1156
|
-
</View>
|
|
1157
|
-
<View style={styles.editingHeaderBottom}>
|
|
1158
|
-
<View style={[styles.editingIconContainer, {
|
|
1159
|
-
backgroundColor: editingField === 'displayName' ? `${colors.sidebarIconPersonalInfo}20` :
|
|
1160
|
-
editingField === 'username' ? `${colors.sidebarIconData}20` :
|
|
1161
|
-
editingField === 'email' ? `${colors.sidebarIconSecurity}20` :
|
|
1162
|
-
editingField === 'bio' ? `${colors.sidebarIconPersonalInfo}20` :
|
|
1163
|
-
editingField === 'location' ? `${colors.sidebarIconSharing}20` :
|
|
1164
|
-
editingField === 'links' ? `${colors.sidebarIconPersonalInfo}20` : `${colors.tint}20`
|
|
1165
|
-
}]}>
|
|
1166
|
-
<MaterialCommunityIcons
|
|
1167
|
-
name={
|
|
1168
|
-
editingField === 'displayName' ? 'account-outline' as any :
|
|
1169
|
-
editingField === 'username' ? 'at' as any :
|
|
1170
|
-
editingField === 'email' ? 'email-outline' as any :
|
|
1171
|
-
editingField === 'bio' ? 'text-box-outline' as any :
|
|
1172
|
-
editingField === 'location' ? 'map-marker-outline' as any :
|
|
1173
|
-
editingField === 'links' ? 'link-variant' as any : 'account-outline' as any
|
|
1174
|
-
}
|
|
1175
|
-
size={28}
|
|
1176
|
-
color={
|
|
1177
|
-
editingField === 'displayName' ? colors.sidebarIconPersonalInfo :
|
|
1178
|
-
editingField === 'username' ? colors.sidebarIconData :
|
|
1179
|
-
editingField === 'email' ? colors.sidebarIconSecurity :
|
|
1180
|
-
editingField === 'bio' ? colors.sidebarIconPersonalInfo :
|
|
1181
|
-
editingField === 'location' ? colors.sidebarIconSharing :
|
|
1182
|
-
editingField === 'links' ? colors.sidebarIconPersonalInfo : colors.tint
|
|
1183
|
-
}
|
|
1184
|
-
/>
|
|
1185
|
-
</View>
|
|
1186
|
-
<Text style={[styles.editingBottomTitle, { color: colors.text }]}>
|
|
1187
|
-
{editingField === 'displayName' ? (t('editProfile.items.displayName.title') || 'Display Name') :
|
|
1188
|
-
editingField === 'username' ? (t('editProfile.items.username.title') || 'Username') :
|
|
1189
|
-
editingField === 'email' ? (t('editProfile.items.email.title') || 'Email') :
|
|
1190
|
-
editingField === 'bio' ? (t('editProfile.items.bio.title') || 'Bio') :
|
|
1191
|
-
editingField === 'location' ? (t('editProfile.items.locations.title') || 'Location') :
|
|
1192
|
-
editingField === 'links' ? (t('editProfile.items.links.title') || 'Links') : 'Field'}
|
|
1193
|
-
</Text>
|
|
1194
|
-
</View>
|
|
1195
|
-
</View>
|
|
1196
|
-
) : null}
|
|
1197
|
-
|
|
1198
331
|
<ScrollView
|
|
1199
332
|
ref={scrollViewRef}
|
|
1200
|
-
style={
|
|
333
|
+
style={styles.content}
|
|
1201
334
|
contentContainerStyle={styles.scrollContent}
|
|
1202
335
|
showsVerticalScrollIndicator={false}
|
|
1203
336
|
>
|
|
1204
|
-
{
|
|
1205
|
-
|
|
1206
|
-
<View style={styles.editingOnlyContainer}>
|
|
1207
|
-
{renderEditingField(editingField)}
|
|
1208
|
-
</View>
|
|
1209
|
-
) : (
|
|
1210
|
-
// Show all settings when not editing
|
|
1211
|
-
<>
|
|
1212
|
-
{/* Title and Subtitle Header */}
|
|
1213
|
-
<View style={[styles.headerContainer, styles.headerSection]}>
|
|
337
|
+
{/* Title and Subtitle Header */}
|
|
338
|
+
<View style={[styles.headerContainer, styles.headerSection]}>
|
|
1214
339
|
<Text style={[styles.modernTitle, { color: themeStyles.textColor, marginBottom: 0, marginTop: 0 }]}>
|
|
1215
340
|
{t('accountOverview.items.editProfile.title') || t('editProfile.title') || 'Edit Profile'}
|
|
1216
341
|
</Text>
|
|
@@ -1228,7 +353,6 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1228
353
|
style={styles.section}
|
|
1229
354
|
onLayout={(event) => {
|
|
1230
355
|
const { y } = event.nativeEvent.layout;
|
|
1231
|
-
setAvatarSectionY(y);
|
|
1232
356
|
setProfilePictureSectionY(y);
|
|
1233
357
|
}}
|
|
1234
358
|
>
|
|
@@ -1452,54 +576,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps & { initialField?: string;
|
|
|
1452
576
|
<View style={styles.groupedSectionWrapper}>
|
|
1453
577
|
</View>
|
|
1454
578
|
</View>
|
|
1455
|
-
</>
|
|
1456
|
-
)}
|
|
1457
579
|
</ScrollView>
|
|
1458
|
-
|
|
1459
|
-
{/* Modal Components */}
|
|
1460
|
-
<EditDisplayNameModal
|
|
1461
|
-
visible={showEditDisplayNameModal}
|
|
1462
|
-
onClose={() => setShowEditDisplayNameModal(false)}
|
|
1463
|
-
initialDisplayName={displayName}
|
|
1464
|
-
initialLastName={lastName}
|
|
1465
|
-
theme={normalizedTheme}
|
|
1466
|
-
onSave={handleModalSave}
|
|
1467
|
-
/>
|
|
1468
|
-
<EditUsernameModal
|
|
1469
|
-
visible={showEditUsernameModal}
|
|
1470
|
-
onClose={() => setShowEditUsernameModal(false)}
|
|
1471
|
-
initialValue={username}
|
|
1472
|
-
theme={normalizedTheme}
|
|
1473
|
-
onSave={handleModalSave}
|
|
1474
|
-
/>
|
|
1475
|
-
<EditEmailModal
|
|
1476
|
-
visible={showEditEmailModal}
|
|
1477
|
-
onClose={() => setShowEditEmailModal(false)}
|
|
1478
|
-
initialValue={email}
|
|
1479
|
-
theme={normalizedTheme}
|
|
1480
|
-
onSave={handleModalSave}
|
|
1481
|
-
/>
|
|
1482
|
-
<EditBioModal
|
|
1483
|
-
visible={showEditBioModal}
|
|
1484
|
-
onClose={() => setShowEditBioModal(false)}
|
|
1485
|
-
initialValue={bio}
|
|
1486
|
-
theme={normalizedTheme}
|
|
1487
|
-
onSave={handleModalSave}
|
|
1488
|
-
/>
|
|
1489
|
-
<EditLocationModal
|
|
1490
|
-
visible={showEditLocationModal}
|
|
1491
|
-
onClose={() => setShowEditLocationModal(false)}
|
|
1492
|
-
initialLocations={locations}
|
|
1493
|
-
theme={normalizedTheme}
|
|
1494
|
-
onSave={handleModalSave}
|
|
1495
|
-
/>
|
|
1496
|
-
<EditLinksModal
|
|
1497
|
-
visible={showEditLinksModal}
|
|
1498
|
-
onClose={() => setShowEditLinksModal(false)}
|
|
1499
|
-
initialLinks={linksMetadata}
|
|
1500
|
-
theme={normalizedTheme}
|
|
1501
|
-
onSave={handleModalSave}
|
|
1502
|
-
/>
|
|
1503
580
|
</View>
|
|
1504
581
|
);
|
|
1505
582
|
};
|
|
@@ -1512,13 +589,6 @@ const styles = StyleSheet.create({
|
|
|
1512
589
|
content: {
|
|
1513
590
|
flexShrink: 1,
|
|
1514
591
|
},
|
|
1515
|
-
scrollView: {
|
|
1516
|
-
flexShrink: 1,
|
|
1517
|
-
},
|
|
1518
|
-
contentEditing: {
|
|
1519
|
-
flex: 1,
|
|
1520
|
-
padding: 0,
|
|
1521
|
-
},
|
|
1522
592
|
scrollContent: createScreenContentStyle(HEADER_PADDING_TOP_SETTINGS),
|
|
1523
593
|
headerContainer: {
|
|
1524
594
|
width: '100%',
|
|
@@ -1532,7 +602,7 @@ const styles = StyleSheet.create({
|
|
|
1532
602
|
gap: COMPONENT_GAP,
|
|
1533
603
|
},
|
|
1534
604
|
modernTitle: {
|
|
1535
|
-
fontFamily: fontFamilies.
|
|
605
|
+
fontFamily: fontFamilies.interBold,
|
|
1536
606
|
fontWeight: Platform.OS === 'web' ? 'bold' : undefined,
|
|
1537
607
|
fontSize: 42,
|
|
1538
608
|
lineHeight: 50.4, // 42 * 1.2
|
|
@@ -1553,561 +623,15 @@ const styles = StyleSheet.create({
|
|
|
1553
623
|
sectionTitle: {
|
|
1554
624
|
fontSize: 13,
|
|
1555
625
|
fontWeight: '600',
|
|
1556
|
-
color: '#8E8E93',
|
|
1557
626
|
marginBottom: 8,
|
|
1558
627
|
marginTop: 4,
|
|
1559
628
|
textTransform: 'uppercase',
|
|
1560
629
|
letterSpacing: 0.5,
|
|
1561
|
-
fontFamily: fontFamilies.
|
|
630
|
+
fontFamily: fontFamilies.interSemiBold,
|
|
1562
631
|
},
|
|
1563
632
|
groupedSectionWrapper: {
|
|
1564
633
|
backgroundColor: 'transparent',
|
|
1565
634
|
},
|
|
1566
|
-
|
|
1567
|
-
userIcon: {
|
|
1568
|
-
marginRight: 12,
|
|
1569
|
-
},
|
|
1570
|
-
|
|
1571
|
-
// Editing-only mode styles
|
|
1572
|
-
editingOnlyContainer: {
|
|
1573
|
-
flex: 1,
|
|
1574
|
-
},
|
|
1575
|
-
editingFieldContainer: {
|
|
1576
|
-
backgroundColor: '#fff',
|
|
1577
|
-
padding: 16,
|
|
1578
|
-
flex: 1,
|
|
1579
|
-
},
|
|
1580
|
-
editingFieldHeader: {
|
|
1581
|
-
marginBottom: 8,
|
|
1582
|
-
flexDirection: 'row',
|
|
1583
|
-
alignItems: 'center',
|
|
1584
|
-
},
|
|
1585
|
-
editingFieldTitleContainer: {
|
|
1586
|
-
flexDirection: 'row',
|
|
1587
|
-
alignItems: 'center',
|
|
1588
|
-
},
|
|
1589
|
-
editingFieldIcon: {
|
|
1590
|
-
marginRight: 12,
|
|
1591
|
-
},
|
|
1592
|
-
editingFieldTitle: {
|
|
1593
|
-
fontSize: 20,
|
|
1594
|
-
fontWeight: '600',
|
|
1595
|
-
color: '#000',
|
|
1596
|
-
},
|
|
1597
|
-
editingFieldContent: {
|
|
1598
|
-
flex: 1,
|
|
1599
|
-
},
|
|
1600
|
-
newValueSection: {
|
|
1601
|
-
flex: 1,
|
|
1602
|
-
},
|
|
1603
|
-
editingFieldLabel: {
|
|
1604
|
-
fontSize: 13,
|
|
1605
|
-
fontWeight: '600',
|
|
1606
|
-
marginBottom: 8,
|
|
1607
|
-
fontFamily: fontFamilies.phuduSemiBold,
|
|
1608
|
-
textTransform: 'uppercase',
|
|
1609
|
-
letterSpacing: 0.5,
|
|
1610
|
-
},
|
|
1611
|
-
editingFieldInput: {
|
|
1612
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
1613
|
-
borderRadius: 14,
|
|
1614
|
-
padding: 16,
|
|
1615
|
-
fontSize: 17,
|
|
1616
|
-
minHeight: 52,
|
|
1617
|
-
fontWeight: '400',
|
|
1618
|
-
letterSpacing: -0.2,
|
|
1619
|
-
},
|
|
1620
|
-
editingFieldDescription: {
|
|
1621
|
-
fontSize: 14,
|
|
1622
|
-
color: '#666',
|
|
1623
|
-
marginBottom: 16,
|
|
1624
|
-
},
|
|
1625
|
-
primaryButton: {
|
|
1626
|
-
flexDirection: 'row',
|
|
1627
|
-
alignItems: 'center',
|
|
1628
|
-
justifyContent: 'center',
|
|
1629
|
-
gap: 8,
|
|
1630
|
-
// backgroundColor should be applied inline using colors.iconSecurity
|
|
1631
|
-
paddingVertical: 12,
|
|
1632
|
-
paddingHorizontal: 16,
|
|
1633
|
-
borderRadius: 10,
|
|
1634
|
-
},
|
|
1635
|
-
primaryButtonText: {
|
|
1636
|
-
color: '#fff',
|
|
1637
|
-
fontSize: 16,
|
|
1638
|
-
fontWeight: '600',
|
|
1639
|
-
},
|
|
1640
|
-
editingFieldTextArea: {
|
|
1641
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
1642
|
-
borderRadius: 14,
|
|
1643
|
-
padding: 16,
|
|
1644
|
-
fontSize: 17,
|
|
1645
|
-
minHeight: 120,
|
|
1646
|
-
textAlignVertical: 'top',
|
|
1647
|
-
fontWeight: '400',
|
|
1648
|
-
letterSpacing: -0.2,
|
|
1649
|
-
},
|
|
1650
|
-
// Custom editing header styles
|
|
1651
|
-
editingHeader: {
|
|
1652
|
-
paddingTop: Platform.OS === 'ios' ? 50 : 16,
|
|
1653
|
-
paddingBottom: 0,
|
|
1654
|
-
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
1655
|
-
},
|
|
1656
|
-
editingHeaderContent: {
|
|
1657
|
-
flexDirection: 'row',
|
|
1658
|
-
alignItems: 'center',
|
|
1659
|
-
paddingHorizontal: 16,
|
|
1660
|
-
minHeight: 44,
|
|
1661
|
-
},
|
|
1662
|
-
editingBackButton: {
|
|
1663
|
-
width: 36,
|
|
1664
|
-
height: 36,
|
|
1665
|
-
borderRadius: 20,
|
|
1666
|
-
alignItems: 'center',
|
|
1667
|
-
justifyContent: 'center',
|
|
1668
|
-
marginRight: 12,
|
|
1669
|
-
},
|
|
1670
|
-
editingTitleContainer: {
|
|
1671
|
-
flex: 1,
|
|
1672
|
-
flexDirection: 'column',
|
|
1673
|
-
alignItems: 'flex-start',
|
|
1674
|
-
justifyContent: 'flex-end',
|
|
1675
|
-
paddingBottom: 8,
|
|
1676
|
-
},
|
|
1677
|
-
editingTitleIcon: {
|
|
1678
|
-
marginBottom: 4,
|
|
1679
|
-
alignSelf: 'flex-start',
|
|
1680
|
-
},
|
|
1681
|
-
editingTitle: {
|
|
1682
|
-
fontSize: 18,
|
|
1683
|
-
fontWeight: '700',
|
|
1684
|
-
fontFamily: fontFamilies.phuduBold,
|
|
1685
|
-
letterSpacing: -0.3,
|
|
1686
|
-
lineHeight: 22,
|
|
1687
|
-
textAlign: 'left',
|
|
1688
|
-
alignSelf: 'flex-start',
|
|
1689
|
-
},
|
|
1690
|
-
editingSaveButton: {
|
|
1691
|
-
paddingHorizontal: 16,
|
|
1692
|
-
paddingVertical: 8,
|
|
1693
|
-
borderRadius: 20,
|
|
1694
|
-
minWidth: 60,
|
|
1695
|
-
alignItems: 'center',
|
|
1696
|
-
justifyContent: 'center',
|
|
1697
|
-
},
|
|
1698
|
-
editingSaveButtonText: {
|
|
1699
|
-
fontSize: 16,
|
|
1700
|
-
fontWeight: '600',
|
|
1701
|
-
fontFamily: fontFamilies.phuduSemiBold,
|
|
1702
|
-
},
|
|
1703
|
-
editingHeaderBottom: {
|
|
1704
|
-
flexDirection: 'column',
|
|
1705
|
-
alignItems: 'flex-start',
|
|
1706
|
-
paddingHorizontal: 20,
|
|
1707
|
-
paddingBottom: 20,
|
|
1708
|
-
paddingTop: 24,
|
|
1709
|
-
},
|
|
1710
|
-
editingIconContainer: {
|
|
1711
|
-
width: 64,
|
|
1712
|
-
height: 64,
|
|
1713
|
-
borderRadius: 20,
|
|
1714
|
-
alignItems: 'center',
|
|
1715
|
-
justifyContent: 'center',
|
|
1716
|
-
marginBottom: 16,
|
|
1717
|
-
},
|
|
1718
|
-
editingBottomTitle: {
|
|
1719
|
-
fontSize: 28,
|
|
1720
|
-
fontWeight: '700',
|
|
1721
|
-
fontFamily: fontFamilies.phuduBold,
|
|
1722
|
-
letterSpacing: -0.5,
|
|
1723
|
-
lineHeight: 34,
|
|
1724
|
-
textAlign: 'left',
|
|
1725
|
-
alignSelf: 'flex-start',
|
|
1726
|
-
},
|
|
1727
|
-
// Links management styles
|
|
1728
|
-
addLinkSection: {
|
|
1729
|
-
marginBottom: 16,
|
|
1730
|
-
padding: 12,
|
|
1731
|
-
backgroundColor: '#F8F9FA',
|
|
1732
|
-
borderRadius: 8,
|
|
1733
|
-
borderWidth: 1,
|
|
1734
|
-
borderColor: '#E9ECEF',
|
|
1735
|
-
},
|
|
1736
|
-
addLinkLabel: {
|
|
1737
|
-
fontSize: 14,
|
|
1738
|
-
fontWeight: '600',
|
|
1739
|
-
color: '#333',
|
|
1740
|
-
marginBottom: 8,
|
|
1741
|
-
},
|
|
1742
|
-
addLinkInputContainer: {
|
|
1743
|
-
gap: 8,
|
|
1744
|
-
},
|
|
1745
|
-
addLinkInput: {
|
|
1746
|
-
backgroundColor: '#fff',
|
|
1747
|
-
borderWidth: 1,
|
|
1748
|
-
borderColor: '#E9ECEF',
|
|
1749
|
-
borderRadius: 6,
|
|
1750
|
-
padding: 10,
|
|
1751
|
-
fontSize: 14,
|
|
1752
|
-
minHeight: 36,
|
|
1753
|
-
},
|
|
1754
|
-
addLinkButtons: {
|
|
1755
|
-
flexDirection: 'row',
|
|
1756
|
-
gap: 6,
|
|
1757
|
-
},
|
|
1758
|
-
addLinkButton: {
|
|
1759
|
-
flex: 1,
|
|
1760
|
-
paddingVertical: 8,
|
|
1761
|
-
paddingHorizontal: 12,
|
|
1762
|
-
borderRadius: 6,
|
|
1763
|
-
alignItems: 'center',
|
|
1764
|
-
justifyContent: 'center',
|
|
1765
|
-
},
|
|
1766
|
-
cancelButton: {
|
|
1767
|
-
backgroundColor: '#F8F9FA',
|
|
1768
|
-
borderWidth: 1,
|
|
1769
|
-
borderColor: '#E9ECEF',
|
|
1770
|
-
},
|
|
1771
|
-
cancelButtonText: {
|
|
1772
|
-
fontSize: 14,
|
|
1773
|
-
fontWeight: '600',
|
|
1774
|
-
color: '#6C757D',
|
|
1775
|
-
},
|
|
1776
|
-
addButton: {
|
|
1777
|
-
// backgroundColor should be applied inline using colors.iconSecurity
|
|
1778
|
-
},
|
|
1779
|
-
addButtonText: {
|
|
1780
|
-
fontSize: 14,
|
|
1781
|
-
fontWeight: '600',
|
|
1782
|
-
color: '#fff',
|
|
1783
|
-
},
|
|
1784
|
-
addLinkTrigger: {
|
|
1785
|
-
flexDirection: 'row',
|
|
1786
|
-
alignItems: 'center',
|
|
1787
|
-
padding: 12,
|
|
1788
|
-
backgroundColor: '#F8F9FA',
|
|
1789
|
-
borderRadius: 8,
|
|
1790
|
-
borderWidth: 1,
|
|
1791
|
-
borderColor: '#E9ECEF',
|
|
1792
|
-
borderStyle: 'dashed',
|
|
1793
|
-
marginBottom: 16,
|
|
1794
|
-
},
|
|
1795
|
-
addLinkTriggerText: {
|
|
1796
|
-
fontSize: 14,
|
|
1797
|
-
fontWeight: '600',
|
|
1798
|
-
// color should be applied inline using colors.iconSecurity
|
|
1799
|
-
marginLeft: 6,
|
|
1800
|
-
},
|
|
1801
|
-
linksList: {
|
|
1802
|
-
gap: 8,
|
|
1803
|
-
},
|
|
1804
|
-
linksListTitle: {
|
|
1805
|
-
fontSize: 16,
|
|
1806
|
-
fontWeight: '700',
|
|
1807
|
-
color: '#333',
|
|
1808
|
-
marginBottom: 6,
|
|
1809
|
-
},
|
|
1810
|
-
linkItem: {
|
|
1811
|
-
backgroundColor: '#fff',
|
|
1812
|
-
borderRadius: 8,
|
|
1813
|
-
borderWidth: 1,
|
|
1814
|
-
borderColor: '#E9ECEF',
|
|
1815
|
-
overflow: 'hidden',
|
|
1816
|
-
},
|
|
1817
|
-
linkItemContent: {
|
|
1818
|
-
flexDirection: 'row',
|
|
1819
|
-
padding: 12,
|
|
1820
|
-
alignItems: 'center',
|
|
1821
|
-
},
|
|
1822
|
-
linkItemDragHandle: {
|
|
1823
|
-
width: 24,
|
|
1824
|
-
height: 24,
|
|
1825
|
-
alignItems: 'center',
|
|
1826
|
-
justifyContent: 'center',
|
|
1827
|
-
marginRight: 8,
|
|
1828
|
-
},
|
|
1829
|
-
linkItemInfo: {
|
|
1830
|
-
flex: 1,
|
|
1831
|
-
marginRight: 8,
|
|
1832
|
-
},
|
|
1833
|
-
linkItemTitle: {
|
|
1834
|
-
fontSize: 14,
|
|
1835
|
-
fontWeight: '600',
|
|
1836
|
-
color: '#333',
|
|
1837
|
-
marginBottom: 2,
|
|
1838
|
-
},
|
|
1839
|
-
linkItemDescription: {
|
|
1840
|
-
fontSize: 12,
|
|
1841
|
-
color: '#666',
|
|
1842
|
-
marginBottom: 2,
|
|
1843
|
-
},
|
|
1844
|
-
linkItemUrl: {
|
|
1845
|
-
fontSize: 12,
|
|
1846
|
-
color: '#6C757D',
|
|
1847
|
-
},
|
|
1848
|
-
linkItemActions: {
|
|
1849
|
-
flexDirection: 'row',
|
|
1850
|
-
gap: 6,
|
|
1851
|
-
},
|
|
1852
|
-
linkItemButton: {
|
|
1853
|
-
width: 28,
|
|
1854
|
-
height: 28,
|
|
1855
|
-
borderRadius: 14,
|
|
1856
|
-
backgroundColor: '#F8F9FA',
|
|
1857
|
-
alignItems: 'center',
|
|
1858
|
-
justifyContent: 'center',
|
|
1859
|
-
},
|
|
1860
|
-
linkItemDivider: {
|
|
1861
|
-
height: 1,
|
|
1862
|
-
backgroundColor: '#E9ECEF',
|
|
1863
|
-
marginHorizontal: 12,
|
|
1864
|
-
},
|
|
1865
|
-
reorderHint: {
|
|
1866
|
-
padding: 8,
|
|
1867
|
-
alignItems: 'center',
|
|
1868
|
-
},
|
|
1869
|
-
reorderHintText: {
|
|
1870
|
-
fontSize: 12,
|
|
1871
|
-
color: '#999',
|
|
1872
|
-
fontStyle: 'italic',
|
|
1873
|
-
},
|
|
1874
|
-
reorderButtons: {
|
|
1875
|
-
flexDirection: 'column',
|
|
1876
|
-
gap: 2,
|
|
1877
|
-
},
|
|
1878
|
-
reorderButton: {
|
|
1879
|
-
width: 20,
|
|
1880
|
-
height: 16,
|
|
1881
|
-
borderRadius: 3,
|
|
1882
|
-
backgroundColor: '#F8F9FA',
|
|
1883
|
-
alignItems: 'center',
|
|
1884
|
-
justifyContent: 'center',
|
|
1885
|
-
borderWidth: 1,
|
|
1886
|
-
borderColor: '#E9ECEF',
|
|
1887
|
-
},
|
|
1888
|
-
reorderButtonDisabled: {
|
|
1889
|
-
opacity: 0.3,
|
|
1890
|
-
},
|
|
1891
|
-
linkItemImage: {
|
|
1892
|
-
width: 32,
|
|
1893
|
-
height: 32,
|
|
1894
|
-
borderRadius: 16,
|
|
1895
|
-
// backgroundColor should be applied inline using colors.iconSecurity
|
|
1896
|
-
alignItems: 'center',
|
|
1897
|
-
justifyContent: 'center',
|
|
1898
|
-
marginRight: 8,
|
|
1899
|
-
},
|
|
1900
|
-
linkItemImageText: {
|
|
1901
|
-
fontSize: 12,
|
|
1902
|
-
fontWeight: '600',
|
|
1903
|
-
color: '#fff',
|
|
1904
|
-
},
|
|
1905
|
-
fetchingText: {
|
|
1906
|
-
fontSize: 12,
|
|
1907
|
-
// color should be applied inline using colors.iconSecurity
|
|
1908
|
-
fontStyle: 'italic',
|
|
1909
|
-
},
|
|
1910
|
-
linksFieldContent: {
|
|
1911
|
-
flex: 1,
|
|
1912
|
-
marginLeft: 12,
|
|
1913
|
-
},
|
|
1914
|
-
linksPreview: {
|
|
1915
|
-
marginTop: 4,
|
|
1916
|
-
flexDirection: 'column',
|
|
1917
|
-
},
|
|
1918
|
-
linksPreviewContainer: {
|
|
1919
|
-
marginTop: 4,
|
|
1920
|
-
flexDirection: 'column',
|
|
1921
|
-
width: '100%',
|
|
1922
|
-
},
|
|
1923
|
-
linkPreviewItem: {
|
|
1924
|
-
flexDirection: 'row',
|
|
1925
|
-
alignItems: 'center',
|
|
1926
|
-
marginBottom: 4,
|
|
1927
|
-
},
|
|
1928
|
-
linkPreviewImage: {
|
|
1929
|
-
width: 20,
|
|
1930
|
-
height: 20,
|
|
1931
|
-
borderRadius: 10,
|
|
1932
|
-
// backgroundColor should be applied inline using colors.iconSecurity
|
|
1933
|
-
alignItems: 'center',
|
|
1934
|
-
justifyContent: 'center',
|
|
1935
|
-
marginRight: 6,
|
|
1936
|
-
},
|
|
1937
|
-
linkPreviewImageText: {
|
|
1938
|
-
fontSize: 10,
|
|
1939
|
-
fontWeight: '600',
|
|
1940
|
-
color: '#fff',
|
|
1941
|
-
},
|
|
1942
|
-
linkPreviewTitle: {
|
|
1943
|
-
fontSize: 13,
|
|
1944
|
-
color: '#666',
|
|
1945
|
-
flex: 1,
|
|
1946
|
-
},
|
|
1947
|
-
linkPreviewContent: {
|
|
1948
|
-
flex: 1,
|
|
1949
|
-
},
|
|
1950
|
-
linkPreviewSubtitle: {
|
|
1951
|
-
fontSize: 11,
|
|
1952
|
-
color: '#999',
|
|
1953
|
-
marginTop: 1,
|
|
1954
|
-
},
|
|
1955
|
-
linkPreviewMore: {
|
|
1956
|
-
fontSize: 12,
|
|
1957
|
-
color: '#999',
|
|
1958
|
-
fontStyle: 'italic',
|
|
1959
|
-
},
|
|
1960
|
-
// Location management styles
|
|
1961
|
-
addLocationSection: {
|
|
1962
|
-
marginBottom: 16,
|
|
1963
|
-
},
|
|
1964
|
-
addLocationLabel: {
|
|
1965
|
-
fontSize: 14,
|
|
1966
|
-
fontWeight: '600',
|
|
1967
|
-
color: '#333',
|
|
1968
|
-
marginBottom: 8,
|
|
1969
|
-
fontFamily: fontFamilies.phuduSemiBold,
|
|
1970
|
-
},
|
|
1971
|
-
searchingText: {
|
|
1972
|
-
fontSize: 12,
|
|
1973
|
-
// color should be applied inline using colors.iconSecurity
|
|
1974
|
-
fontStyle: 'italic',
|
|
1975
|
-
},
|
|
1976
|
-
addLocationInputContainer: {
|
|
1977
|
-
marginBottom: 8,
|
|
1978
|
-
},
|
|
1979
|
-
addLocationInput: {
|
|
1980
|
-
backgroundColor: '#fff',
|
|
1981
|
-
borderWidth: 2,
|
|
1982
|
-
borderColor: '#e0e0e0',
|
|
1983
|
-
borderRadius: 12,
|
|
1984
|
-
padding: 16,
|
|
1985
|
-
fontSize: 17,
|
|
1986
|
-
minHeight: 52,
|
|
1987
|
-
fontWeight: '400',
|
|
1988
|
-
marginBottom: 8,
|
|
1989
|
-
},
|
|
1990
|
-
addLocationButtons: {
|
|
1991
|
-
flexDirection: 'row',
|
|
1992
|
-
gap: 8,
|
|
1993
|
-
},
|
|
1994
|
-
addLocationButton: {
|
|
1995
|
-
flex: 1,
|
|
1996
|
-
paddingVertical: 12,
|
|
1997
|
-
paddingHorizontal: 16,
|
|
1998
|
-
borderRadius: 8,
|
|
1999
|
-
alignItems: 'center',
|
|
2000
|
-
justifyContent: 'center',
|
|
2001
|
-
},
|
|
2002
|
-
addLocationTrigger: {
|
|
2003
|
-
flexDirection: 'row',
|
|
2004
|
-
alignItems: 'center',
|
|
2005
|
-
paddingVertical: 12,
|
|
2006
|
-
paddingHorizontal: 16,
|
|
2007
|
-
backgroundColor: '#F8F9FA',
|
|
2008
|
-
borderRadius: 8,
|
|
2009
|
-
marginBottom: 16,
|
|
2010
|
-
},
|
|
2011
|
-
addLocationTriggerText: {
|
|
2012
|
-
marginLeft: 8,
|
|
2013
|
-
fontSize: 16,
|
|
2014
|
-
// color should be applied inline using colors.iconSecurity
|
|
2015
|
-
fontWeight: '500',
|
|
2016
|
-
},
|
|
2017
|
-
searchResults: {
|
|
2018
|
-
backgroundColor: '#fff',
|
|
2019
|
-
borderWidth: 1,
|
|
2020
|
-
borderColor: '#e0e0e0',
|
|
2021
|
-
borderRadius: 8,
|
|
2022
|
-
maxHeight: 200,
|
|
2023
|
-
},
|
|
2024
|
-
searchResultItem: {
|
|
2025
|
-
padding: 12,
|
|
2026
|
-
borderBottomWidth: 1,
|
|
2027
|
-
borderBottomColor: '#f0f0f0',
|
|
2028
|
-
},
|
|
2029
|
-
searchResultName: {
|
|
2030
|
-
fontSize: 14,
|
|
2031
|
-
fontWeight: '500',
|
|
2032
|
-
color: '#333',
|
|
2033
|
-
marginBottom: 2,
|
|
2034
|
-
},
|
|
2035
|
-
searchResultType: {
|
|
2036
|
-
fontSize: 12,
|
|
2037
|
-
color: '#666',
|
|
2038
|
-
textTransform: 'capitalize',
|
|
2039
|
-
},
|
|
2040
|
-
locationsList: {
|
|
2041
|
-
marginTop: 8,
|
|
2042
|
-
},
|
|
2043
|
-
locationsListTitle: {
|
|
2044
|
-
fontSize: 14,
|
|
2045
|
-
fontWeight: '600',
|
|
2046
|
-
color: '#333',
|
|
2047
|
-
marginBottom: 12,
|
|
2048
|
-
fontFamily: fontFamilies.phuduSemiBold,
|
|
2049
|
-
},
|
|
2050
|
-
locationItem: {
|
|
2051
|
-
marginBottom: 8,
|
|
2052
|
-
},
|
|
2053
|
-
locationItemContent: {
|
|
2054
|
-
flexDirection: 'row',
|
|
2055
|
-
alignItems: 'center',
|
|
2056
|
-
padding: 12,
|
|
2057
|
-
backgroundColor: '#F8F9FA',
|
|
2058
|
-
borderRadius: 8,
|
|
2059
|
-
},
|
|
2060
|
-
locationItemDragHandle: {
|
|
2061
|
-
marginRight: 12,
|
|
2062
|
-
},
|
|
2063
|
-
locationItemInfo: {
|
|
2064
|
-
flex: 1,
|
|
2065
|
-
},
|
|
2066
|
-
locationItemHeader: {
|
|
2067
|
-
flexDirection: 'row',
|
|
2068
|
-
alignItems: 'center',
|
|
2069
|
-
marginBottom: 4,
|
|
2070
|
-
},
|
|
2071
|
-
locationItemName: {
|
|
2072
|
-
fontSize: 14,
|
|
2073
|
-
fontWeight: '500',
|
|
2074
|
-
color: '#333',
|
|
2075
|
-
flex: 1,
|
|
2076
|
-
},
|
|
2077
|
-
locationLabel: {
|
|
2078
|
-
// backgroundColor should be applied inline using colors.iconSecurity
|
|
2079
|
-
paddingHorizontal: 6,
|
|
2080
|
-
paddingVertical: 2,
|
|
2081
|
-
borderRadius: 4,
|
|
2082
|
-
marginLeft: 8,
|
|
2083
|
-
},
|
|
2084
|
-
locationLabelText: {
|
|
2085
|
-
fontSize: 10,
|
|
2086
|
-
fontWeight: '600',
|
|
2087
|
-
color: '#fff',
|
|
2088
|
-
textTransform: 'uppercase',
|
|
2089
|
-
},
|
|
2090
|
-
locationCoordinates: {
|
|
2091
|
-
fontSize: 12,
|
|
2092
|
-
color: '#666',
|
|
2093
|
-
fontFamily: 'monospace',
|
|
2094
|
-
},
|
|
2095
|
-
locationItemActions: {
|
|
2096
|
-
marginLeft: 8,
|
|
2097
|
-
},
|
|
2098
|
-
locationItemButton: {
|
|
2099
|
-
width: 28,
|
|
2100
|
-
height: 28,
|
|
2101
|
-
borderRadius: 14,
|
|
2102
|
-
backgroundColor: '#F8F9FA',
|
|
2103
|
-
alignItems: 'center',
|
|
2104
|
-
justifyContent: 'center',
|
|
2105
|
-
},
|
|
2106
|
-
locationItemDivider: {
|
|
2107
|
-
height: 1,
|
|
2108
|
-
backgroundColor: '#E9ECEF',
|
|
2109
|
-
marginHorizontal: 12,
|
|
2110
|
-
},
|
|
2111
635
|
});
|
|
2112
636
|
|
|
2113
637
|
export default React.memo(AccountSettingsScreen);
|