@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
|
@@ -1,316 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
View,
|
|
4
|
-
Text,
|
|
5
|
-
TextInput,
|
|
6
|
-
TouchableOpacity,
|
|
7
|
-
StyleSheet,
|
|
8
|
-
Modal,
|
|
9
|
-
Platform,
|
|
10
|
-
ScrollView,
|
|
11
|
-
Image,
|
|
12
|
-
} from 'react-native';
|
|
13
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
14
|
-
import { useThemeStyles } from '../../hooks/useThemeStyles';
|
|
15
|
-
import { useColorScheme } from '../../hooks/use-color-scheme';
|
|
16
|
-
import { useI18n } from '../../hooks/useI18n';
|
|
17
|
-
import { fontFamilies } from '../../styles/fonts';
|
|
18
|
-
import { useProfileEditing } from '../../hooks/useProfileEditing';
|
|
19
|
-
|
|
20
|
-
interface LinkMetadata {
|
|
21
|
-
url: string;
|
|
22
|
-
title?: string;
|
|
23
|
-
description?: string;
|
|
24
|
-
image?: string;
|
|
25
|
-
id: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
interface EditLinksModalProps {
|
|
29
|
-
visible: boolean;
|
|
30
|
-
onClose: () => void;
|
|
31
|
-
initialLinks?: LinkMetadata[];
|
|
32
|
-
theme?: 'light' | 'dark';
|
|
33
|
-
onSave?: () => void;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export const EditLinksModal: React.FC<EditLinksModalProps> = ({
|
|
37
|
-
visible,
|
|
38
|
-
onClose,
|
|
39
|
-
initialLinks = [],
|
|
40
|
-
theme = 'light',
|
|
41
|
-
onSave,
|
|
42
|
-
}) => {
|
|
43
|
-
const { t } = useI18n();
|
|
44
|
-
const colorScheme = useColorScheme();
|
|
45
|
-
const themeStyles = useThemeStyles(theme || 'light', colorScheme);
|
|
46
|
-
const colors = themeStyles.colors;
|
|
47
|
-
const { saveProfile, isSaving } = useProfileEditing();
|
|
48
|
-
|
|
49
|
-
const [links, setLinks] = useState<LinkMetadata[]>(initialLinks);
|
|
50
|
-
const [newLinkUrl, setNewLinkUrl] = useState('');
|
|
51
|
-
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
if (visible) {
|
|
54
|
-
setLinks(initialLinks);
|
|
55
|
-
setNewLinkUrl('');
|
|
56
|
-
}
|
|
57
|
-
}, [visible, initialLinks]);
|
|
58
|
-
|
|
59
|
-
const handleAddLink = () => {
|
|
60
|
-
if (!newLinkUrl.trim()) return;
|
|
61
|
-
const link: LinkMetadata = {
|
|
62
|
-
id: `link-${Date.now()}`,
|
|
63
|
-
url: newLinkUrl.trim(),
|
|
64
|
-
title: newLinkUrl.replace(/^https?:\/\//, '').replace(/\/$/, ''),
|
|
65
|
-
description: `Link to ${newLinkUrl}`,
|
|
66
|
-
};
|
|
67
|
-
setLinks([...links, link]);
|
|
68
|
-
setNewLinkUrl('');
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
const handleRemoveLink = (id: string) => {
|
|
72
|
-
setLinks(links.filter(link => link.id !== id));
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const handleSave = async () => {
|
|
76
|
-
const success = await saveProfile({
|
|
77
|
-
linksMetadata: links,
|
|
78
|
-
links: links.map(link => link.url),
|
|
79
|
-
});
|
|
80
|
-
if (success) {
|
|
81
|
-
onSave?.();
|
|
82
|
-
onClose();
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
return (
|
|
87
|
-
<Modal
|
|
88
|
-
visible={visible}
|
|
89
|
-
animationType="slide"
|
|
90
|
-
transparent={true}
|
|
91
|
-
onRequestClose={onClose}
|
|
92
|
-
>
|
|
93
|
-
<View style={styles.modalOverlay}>
|
|
94
|
-
<View style={[styles.modalContent, { backgroundColor: colors.background }]}>
|
|
95
|
-
<View style={styles.modalHeader}>
|
|
96
|
-
<TouchableOpacity onPress={onClose} style={styles.closeButton}>
|
|
97
|
-
<Ionicons name="close" size={24} color={colors.text} />
|
|
98
|
-
</TouchableOpacity>
|
|
99
|
-
<Text style={[styles.modalTitle, { color: colors.text }]}>
|
|
100
|
-
{t('editProfile.items.links.title') || 'Links'}
|
|
101
|
-
</Text>
|
|
102
|
-
<TouchableOpacity
|
|
103
|
-
onPress={handleSave}
|
|
104
|
-
disabled={isSaving}
|
|
105
|
-
style={[styles.saveButton, { opacity: isSaving ? 0.5 : 1 }]}
|
|
106
|
-
>
|
|
107
|
-
<Text style={[styles.saveButtonText, { color: colors.tint }]}>
|
|
108
|
-
{isSaving ? 'Saving...' : 'Save'}
|
|
109
|
-
</Text>
|
|
110
|
-
</TouchableOpacity>
|
|
111
|
-
</View>
|
|
112
|
-
|
|
113
|
-
<ScrollView style={styles.modalBody}>
|
|
114
|
-
<View style={styles.inputGroup}>
|
|
115
|
-
<Text style={[styles.label, { color: colors.text }]}>
|
|
116
|
-
{t('editProfile.items.links.add') || 'Add Link'}
|
|
117
|
-
</Text>
|
|
118
|
-
<View style={styles.addLinkRow}>
|
|
119
|
-
<TextInput
|
|
120
|
-
style={[
|
|
121
|
-
styles.input,
|
|
122
|
-
{
|
|
123
|
-
backgroundColor: colors.card,
|
|
124
|
-
color: colors.text,
|
|
125
|
-
borderColor: colors.border,
|
|
126
|
-
flex: 1,
|
|
127
|
-
},
|
|
128
|
-
]}
|
|
129
|
-
value={newLinkUrl}
|
|
130
|
-
onChangeText={setNewLinkUrl}
|
|
131
|
-
placeholder={t('editProfile.items.links.placeholder') || 'Enter URL (e.g., https://example.com)'}
|
|
132
|
-
placeholderTextColor={colors.secondaryText}
|
|
133
|
-
keyboardType="url"
|
|
134
|
-
autoCapitalize="none"
|
|
135
|
-
autoCorrect={false}
|
|
136
|
-
selectionColor={colors.tint}
|
|
137
|
-
/>
|
|
138
|
-
<TouchableOpacity
|
|
139
|
-
style={[styles.addButton, { backgroundColor: colors.tint }]}
|
|
140
|
-
onPress={handleAddLink}
|
|
141
|
-
disabled={!newLinkUrl.trim()}
|
|
142
|
-
>
|
|
143
|
-
<Ionicons name="add" size={20} color="#fff" />
|
|
144
|
-
</TouchableOpacity>
|
|
145
|
-
</View>
|
|
146
|
-
</View>
|
|
147
|
-
|
|
148
|
-
{links.length > 0 && (
|
|
149
|
-
<View style={styles.linksList}>
|
|
150
|
-
<Text style={[styles.listTitle, { color: colors.text }]}>
|
|
151
|
-
{t('editProfile.items.links.yourLinks') || 'Your Links'} ({links.length})
|
|
152
|
-
</Text>
|
|
153
|
-
{links.map((link, index) => (
|
|
154
|
-
<View
|
|
155
|
-
key={link.id}
|
|
156
|
-
style={[
|
|
157
|
-
styles.linkItem,
|
|
158
|
-
{ backgroundColor: colors.card, borderColor: colors.border },
|
|
159
|
-
index < links.length - 1 && { borderBottomWidth: StyleSheet.hairlineWidth },
|
|
160
|
-
]}
|
|
161
|
-
>
|
|
162
|
-
{link.image && (
|
|
163
|
-
<Image source={{ uri: link.image }} style={styles.linkImage} />
|
|
164
|
-
)}
|
|
165
|
-
<View style={styles.linkInfo}>
|
|
166
|
-
<Text style={[styles.linkTitle, { color: colors.text }]} numberOfLines={1}>
|
|
167
|
-
{link.title || link.url}
|
|
168
|
-
</Text>
|
|
169
|
-
{link.description && link.description !== link.title && (
|
|
170
|
-
<Text style={[styles.linkDescription, { color: colors.secondaryText }]} numberOfLines={1}>
|
|
171
|
-
{link.description}
|
|
172
|
-
</Text>
|
|
173
|
-
)}
|
|
174
|
-
<Text style={[styles.linkUrl, { color: colors.secondaryText }]} numberOfLines={1}>
|
|
175
|
-
{link.url}
|
|
176
|
-
</Text>
|
|
177
|
-
</View>
|
|
178
|
-
<TouchableOpacity
|
|
179
|
-
onPress={() => handleRemoveLink(link.id)}
|
|
180
|
-
style={styles.removeButton}
|
|
181
|
-
>
|
|
182
|
-
<Ionicons name="trash-outline" size={18} color="#FF3B30" />
|
|
183
|
-
</TouchableOpacity>
|
|
184
|
-
</View>
|
|
185
|
-
))}
|
|
186
|
-
</View>
|
|
187
|
-
)}
|
|
188
|
-
</ScrollView>
|
|
189
|
-
</View>
|
|
190
|
-
</View>
|
|
191
|
-
</Modal>
|
|
192
|
-
);
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
const styles = StyleSheet.create({
|
|
196
|
-
modalOverlay: {
|
|
197
|
-
flex: 1,
|
|
198
|
-
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
199
|
-
justifyContent: 'flex-end',
|
|
200
|
-
},
|
|
201
|
-
modalContent: {
|
|
202
|
-
borderTopLeftRadius: 20,
|
|
203
|
-
borderTopRightRadius: 20,
|
|
204
|
-
paddingTop: Platform.OS === 'ios' ? 20 : 16,
|
|
205
|
-
maxHeight: '80%',
|
|
206
|
-
},
|
|
207
|
-
modalHeader: {
|
|
208
|
-
flexDirection: 'row',
|
|
209
|
-
alignItems: 'center',
|
|
210
|
-
justifyContent: 'space-between',
|
|
211
|
-
paddingHorizontal: 16,
|
|
212
|
-
paddingBottom: 16,
|
|
213
|
-
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
214
|
-
borderBottomColor: '#E5E5EA',
|
|
215
|
-
},
|
|
216
|
-
closeButton: {
|
|
217
|
-
width: 40,
|
|
218
|
-
height: 40,
|
|
219
|
-
alignItems: 'center',
|
|
220
|
-
justifyContent: 'center',
|
|
221
|
-
},
|
|
222
|
-
modalTitle: {
|
|
223
|
-
fontSize: 18,
|
|
224
|
-
fontWeight: '600',
|
|
225
|
-
fontFamily: fontFamilies.phuduSemiBold,
|
|
226
|
-
flex: 1,
|
|
227
|
-
textAlign: 'center',
|
|
228
|
-
},
|
|
229
|
-
saveButton: {
|
|
230
|
-
paddingHorizontal: 16,
|
|
231
|
-
paddingVertical: 8,
|
|
232
|
-
},
|
|
233
|
-
saveButtonText: {
|
|
234
|
-
fontSize: 16,
|
|
235
|
-
fontWeight: '600',
|
|
236
|
-
fontFamily: fontFamilies.phuduSemiBold,
|
|
237
|
-
},
|
|
238
|
-
modalBody: {
|
|
239
|
-
padding: 16,
|
|
240
|
-
},
|
|
241
|
-
inputGroup: {
|
|
242
|
-
gap: 8,
|
|
243
|
-
marginBottom: 24,
|
|
244
|
-
},
|
|
245
|
-
label: {
|
|
246
|
-
fontSize: 14,
|
|
247
|
-
fontWeight: '600',
|
|
248
|
-
fontFamily: fontFamilies.phuduSemiBold,
|
|
249
|
-
},
|
|
250
|
-
addLinkRow: {
|
|
251
|
-
flexDirection: 'row',
|
|
252
|
-
gap: 8,
|
|
253
|
-
alignItems: 'center',
|
|
254
|
-
},
|
|
255
|
-
input: {
|
|
256
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
257
|
-
borderRadius: 12,
|
|
258
|
-
padding: 16,
|
|
259
|
-
fontSize: 16,
|
|
260
|
-
minHeight: 52,
|
|
261
|
-
},
|
|
262
|
-
addButton: {
|
|
263
|
-
width: 52,
|
|
264
|
-
height: 52,
|
|
265
|
-
borderRadius: 12,
|
|
266
|
-
alignItems: 'center',
|
|
267
|
-
justifyContent: 'center',
|
|
268
|
-
},
|
|
269
|
-
linksList: {
|
|
270
|
-
gap: 8,
|
|
271
|
-
},
|
|
272
|
-
listTitle: {
|
|
273
|
-
fontSize: 16,
|
|
274
|
-
fontWeight: '600',
|
|
275
|
-
fontFamily: fontFamilies.phuduSemiBold,
|
|
276
|
-
marginBottom: 8,
|
|
277
|
-
},
|
|
278
|
-
linkItem: {
|
|
279
|
-
flexDirection: 'row',
|
|
280
|
-
alignItems: 'center',
|
|
281
|
-
padding: 16,
|
|
282
|
-
borderRadius: 12,
|
|
283
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
284
|
-
gap: 12,
|
|
285
|
-
},
|
|
286
|
-
linkImage: {
|
|
287
|
-
width: 40,
|
|
288
|
-
height: 40,
|
|
289
|
-
borderRadius: 8,
|
|
290
|
-
},
|
|
291
|
-
linkInfo: {
|
|
292
|
-
flex: 1,
|
|
293
|
-
gap: 4,
|
|
294
|
-
},
|
|
295
|
-
linkTitle: {
|
|
296
|
-
fontSize: 16,
|
|
297
|
-
fontWeight: '600',
|
|
298
|
-
},
|
|
299
|
-
linkDescription: {
|
|
300
|
-
fontSize: 14,
|
|
301
|
-
},
|
|
302
|
-
linkUrl: {
|
|
303
|
-
fontSize: 12,
|
|
304
|
-
},
|
|
305
|
-
removeButton: {
|
|
306
|
-
padding: 8,
|
|
307
|
-
},
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
4
|
-
import { EditFieldModal } from './EditFieldModal';
|
|
5
|
-
import { useProfileEditing } from '../../hooks/useProfileEditing';
|
|
6
|
-
import { useI18n } from '../../hooks/useI18n';
|
|
7
|
-
|
|
8
|
-
interface Location {
|
|
9
|
-
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
label?: string;
|
|
12
|
-
coordinates?: { lat: number; lon: number };
|
|
13
|
-
[key: string]: unknown;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
interface EditLocationModalProps {
|
|
17
|
-
visible: boolean;
|
|
18
|
-
onClose: () => void;
|
|
19
|
-
initialLocations?: Location[];
|
|
20
|
-
theme?: 'light' | 'dark';
|
|
21
|
-
onSave?: () => void;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const EditLocationModal: React.FC<EditLocationModalProps> = ({
|
|
25
|
-
visible,
|
|
26
|
-
onClose,
|
|
27
|
-
initialLocations = [],
|
|
28
|
-
theme = 'light',
|
|
29
|
-
onSave,
|
|
30
|
-
}) => {
|
|
31
|
-
const { t } = useI18n();
|
|
32
|
-
const { saveProfile } = useProfileEditing();
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<EditFieldModal<Location>
|
|
36
|
-
visible={visible}
|
|
37
|
-
onClose={onClose}
|
|
38
|
-
title={t('editProfile.items.locations.title') || 'Locations'}
|
|
39
|
-
theme={theme}
|
|
40
|
-
onSave={onSave}
|
|
41
|
-
variant="list"
|
|
42
|
-
listConfig={{
|
|
43
|
-
items: initialLocations,
|
|
44
|
-
addItemLabel: t('editProfile.items.locations.add') || 'Add Location',
|
|
45
|
-
listTitle: t('editProfile.items.locations.yourLocations') || 'Your Locations',
|
|
46
|
-
addItemPlaceholder: t('editProfile.items.locations.placeholder') || 'Enter location name',
|
|
47
|
-
createItem: (value: string) => ({
|
|
48
|
-
id: `location-${Date.now()}`,
|
|
49
|
-
name: value.trim(),
|
|
50
|
-
}),
|
|
51
|
-
renderItem: (item: Location, onRemove: () => void, colors: Record<string, string>) => (
|
|
52
|
-
<View
|
|
53
|
-
style={[
|
|
54
|
-
styles.locationItem,
|
|
55
|
-
{ backgroundColor: colors.card, borderColor: colors.border },
|
|
56
|
-
]}
|
|
57
|
-
>
|
|
58
|
-
<Text style={[styles.locationName, { color: colors.text }]}>
|
|
59
|
-
{item.name}
|
|
60
|
-
</Text>
|
|
61
|
-
<TouchableOpacity onPress={onRemove} style={styles.removeButton}>
|
|
62
|
-
<Ionicons name="trash-outline" size={18} color="#FF3B30" />
|
|
63
|
-
</TouchableOpacity>
|
|
64
|
-
</View>
|
|
65
|
-
),
|
|
66
|
-
}}
|
|
67
|
-
onSubmit={async (data) => {
|
|
68
|
-
return await saveProfile({ locations: data.items as Location[] });
|
|
69
|
-
}}
|
|
70
|
-
/>
|
|
71
|
-
);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
const styles = StyleSheet.create({
|
|
75
|
-
locationItem: {
|
|
76
|
-
flexDirection: 'row',
|
|
77
|
-
alignItems: 'center',
|
|
78
|
-
justifyContent: 'space-between',
|
|
79
|
-
padding: 16,
|
|
80
|
-
borderRadius: 12,
|
|
81
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
82
|
-
marginBottom: 8,
|
|
83
|
-
},
|
|
84
|
-
locationName: {
|
|
85
|
-
fontSize: 16,
|
|
86
|
-
flex: 1,
|
|
87
|
-
},
|
|
88
|
-
removeButton: {
|
|
89
|
-
padding: 8,
|
|
90
|
-
},
|
|
91
|
-
});
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EditFieldModal } from './EditFieldModal';
|
|
3
|
-
import { useProfileEditing } from '../../hooks/useProfileEditing';
|
|
4
|
-
import { useI18n } from '../../hooks/useI18n';
|
|
5
|
-
|
|
6
|
-
interface EditUsernameModalProps {
|
|
7
|
-
visible: boolean;
|
|
8
|
-
onClose: () => void;
|
|
9
|
-
initialValue?: string;
|
|
10
|
-
theme?: 'light' | 'dark';
|
|
11
|
-
onSave?: () => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const EditUsernameModal: React.FC<EditUsernameModalProps> = ({
|
|
15
|
-
visible,
|
|
16
|
-
onClose,
|
|
17
|
-
initialValue = '',
|
|
18
|
-
theme = 'light',
|
|
19
|
-
onSave,
|
|
20
|
-
}) => {
|
|
21
|
-
const { t } = useI18n();
|
|
22
|
-
const { updateField } = useProfileEditing();
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<EditFieldModal
|
|
26
|
-
visible={visible}
|
|
27
|
-
onClose={onClose}
|
|
28
|
-
title={t('editProfile.items.username.title') || 'Username'}
|
|
29
|
-
theme={theme}
|
|
30
|
-
onSave={onSave}
|
|
31
|
-
variant="single"
|
|
32
|
-
fields={[
|
|
33
|
-
{
|
|
34
|
-
key: 'username',
|
|
35
|
-
label: t('editProfile.items.username.label') || 'Username',
|
|
36
|
-
initialValue,
|
|
37
|
-
placeholder: t('editProfile.items.username.placeholder') || 'Choose a username',
|
|
38
|
-
validation: (value) => {
|
|
39
|
-
if (!value.trim()) {
|
|
40
|
-
return t('editProfile.items.username.required') || 'Username is required';
|
|
41
|
-
}
|
|
42
|
-
return undefined;
|
|
43
|
-
},
|
|
44
|
-
inputProps: {
|
|
45
|
-
autoCapitalize: 'none',
|
|
46
|
-
autoCorrect: false,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
]}
|
|
50
|
-
onSubmit={async (data) => {
|
|
51
|
-
return await updateField('username', data.username as string);
|
|
52
|
-
}}
|
|
53
|
-
/>
|
|
54
|
-
);
|
|
55
|
-
};
|