@oxyhq/services 5.4.2 → 5.4.4
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 +14 -0
- package/lib/commonjs/assets/OxyLogo.svg +1 -0
- package/lib/commonjs/assets/assets/OxyLogo.svg +1 -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/assets/icons/OxyServices.tsx +67 -0
- package/lib/commonjs/assets/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/commonjs/assets/assets/illustrations/HighFive.tsx +41 -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/assets/icons/OxyServices.js +53 -0
- package/lib/commonjs/assets/icons/OxyServices.js.map +1 -0
- package/lib/commonjs/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/commonjs/assets/illustrations/HighFive.js +61 -0
- package/lib/commonjs/assets/illustrations/HighFive.js.map +1 -0
- package/lib/commonjs/constants/version.js +28 -0
- package/lib/commonjs/constants/version.js.map +1 -0
- package/lib/commonjs/core/index.js +1660 -0
- package/lib/commonjs/core/index.js.map +1 -0
- package/lib/commonjs/index.js +160 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/lib/sonner.js +21 -0
- package/lib/commonjs/lib/sonner.js.map +1 -0
- package/lib/commonjs/models/interfaces.js +2 -0
- package/lib/commonjs/models/interfaces.js.map +1 -0
- package/lib/commonjs/models/secureSession.js +2 -0
- package/lib/commonjs/models/secureSession.js.map +1 -0
- package/lib/commonjs/node/createAuth.js +95 -0
- package/lib/commonjs/node/createAuth.js.map +1 -0
- package/lib/commonjs/node/index.js +63 -0
- package/lib/commonjs/node/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/ui/components/Avatar.js +98 -0
- package/lib/commonjs/ui/components/Avatar.js.map +1 -0
- package/lib/commonjs/ui/components/FollowButton.js +246 -0
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -0
- package/lib/commonjs/ui/components/FontLoader.js +181 -0
- package/lib/commonjs/ui/components/FontLoader.js.map +1 -0
- package/lib/commonjs/ui/components/GroupedItem.js +109 -0
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -0
- package/lib/commonjs/ui/components/GroupedSection.js +33 -0
- package/lib/commonjs/ui/components/GroupedSection.js.map +1 -0
- package/lib/commonjs/ui/components/OxyLogo.js +56 -0
- package/lib/commonjs/ui/components/OxyLogo.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +522 -0
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -0
- package/lib/commonjs/ui/components/OxySignInButton.js +178 -0
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -0
- package/lib/commonjs/ui/components/ProfileCard.js +124 -0
- package/lib/commonjs/ui/components/ProfileCard.js.map +1 -0
- package/lib/commonjs/ui/components/QuickActions.js +87 -0
- package/lib/commonjs/ui/components/QuickActions.js.map +1 -0
- package/lib/commonjs/ui/components/Section.js +36 -0
- package/lib/commonjs/ui/components/Section.js.map +1 -0
- package/lib/commonjs/ui/components/SectionTitle.js +35 -0
- package/lib/commonjs/ui/components/SectionTitle.js.map +1 -0
- package/lib/commonjs/ui/components/bottomSheet/index.js +37 -0
- package/lib/commonjs/ui/components/bottomSheet/index.js.map +1 -0
- package/lib/commonjs/ui/components/icon/OxyIcon.js +27 -0
- package/lib/commonjs/ui/components/icon/OxyIcon.js.map +1 -0
- package/lib/commonjs/ui/components/icon/index.js +14 -0
- package/lib/commonjs/ui/components/icon/index.js.map +1 -0
- package/lib/commonjs/ui/components/index.js +97 -0
- package/lib/commonjs/ui/components/index.js.map +1 -0
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +213 -0
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -0
- package/lib/commonjs/ui/components/internal/TextField.js +576 -0
- package/lib/commonjs/ui/components/internal/TextField.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +584 -0
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -0
- package/lib/commonjs/ui/index.js +136 -0
- package/lib/commonjs/ui/index.js.map +1 -0
- package/lib/commonjs/ui/navigation/OxyRouter.js +269 -0
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -0
- package/lib/commonjs/ui/navigation/types.js +6 -0
- package/lib/commonjs/ui/navigation/types.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +313 -0
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountManagementDemo.js +299 -0
- package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +855 -0
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +843 -0
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +788 -0
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/AppInfoScreen.js +664 -0
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/BillingManagementScreen.js +636 -0
- package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FeedbackScreen.js +1169 -0
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js +2515 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +1620 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/ProfileScreen.js +450 -0
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +449 -0
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/SignInScreen.js +882 -0
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/SignUpScreen.js +1036 -0
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +88 -0
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +364 -0
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +227 -0
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +148 -0
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +127 -0
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +105 -0
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -0
- package/lib/commonjs/ui/store/index.js +52 -0
- package/lib/commonjs/ui/store/index.js.map +1 -0
- package/lib/commonjs/ui/styles/FONTS.md +126 -0
- package/lib/commonjs/ui/styles/fonts.js +84 -0
- package/lib/commonjs/ui/styles/fonts.js.map +1 -0
- package/lib/commonjs/ui/styles/index.js +28 -0
- package/lib/commonjs/ui/styles/index.js.map +1 -0
- package/lib/commonjs/ui/styles/theme.js +121 -0
- package/lib/commonjs/ui/styles/theme.js.map +1 -0
- package/lib/commonjs/utils/deviceManager.js +173 -0
- package/lib/commonjs/utils/deviceManager.js.map +1 -0
- package/lib/commonjs/utils/index.js +13 -0
- package/lib/commonjs/utils/index.js.map +1 -0
- package/lib/commonjs/utils/polyfills.js +42 -0
- package/lib/commonjs/utils/polyfills.js.map +1 -0
- package/lib/module/assets/OxyLogo.svg +1 -0
- package/lib/module/assets/assets/OxyLogo.svg +1 -0
- 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/assets/icons/OxyServices.tsx +67 -0
- package/lib/module/assets/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/module/assets/assets/illustrations/HighFive.tsx +41 -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/assets/icons/OxyServices.js +46 -0
- package/lib/module/assets/icons/OxyServices.js.map +1 -0
- package/lib/module/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/module/assets/illustrations/HighFive.js +55 -0
- package/lib/module/assets/illustrations/HighFive.js.map +1 -0
- package/lib/module/constants/version.js +21 -0
- package/lib/module/constants/version.js.map +1 -0
- package/lib/module/core/index.js +1634 -0
- package/lib/module/core/index.js.map +1 -0
- package/lib/module/index.js +48 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/lib/sonner.js +16 -0
- package/lib/module/lib/sonner.js.map +1 -0
- package/lib/module/models/interfaces.js +2 -0
- package/lib/module/models/interfaces.js.map +1 -0
- package/lib/module/models/secureSession.js +2 -0
- package/lib/module/models/secureSession.js.map +1 -0
- package/lib/module/node/createAuth.js +90 -0
- package/lib/module/node/createAuth.js.map +1 -0
- package/lib/module/node/index.js +27 -0
- package/lib/module/node/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/ui/components/Avatar.js +93 -0
- package/lib/module/ui/components/Avatar.js.map +1 -0
- package/lib/module/ui/components/FollowButton.js +241 -0
- package/lib/module/ui/components/FollowButton.js.map +1 -0
- package/lib/module/ui/components/FontLoader.js +176 -0
- package/lib/module/ui/components/FontLoader.js.map +1 -0
- package/lib/module/ui/components/GroupedItem.js +104 -0
- package/lib/module/ui/components/GroupedItem.js.map +1 -0
- package/lib/module/ui/components/GroupedSection.js +28 -0
- package/lib/module/ui/components/GroupedSection.js.map +1 -0
- package/lib/module/ui/components/OxyLogo.js +49 -0
- package/lib/module/ui/components/OxyLogo.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +516 -0
- package/lib/module/ui/components/OxyProvider.js.map +1 -0
- package/lib/module/ui/components/OxySignInButton.js +172 -0
- package/lib/module/ui/components/OxySignInButton.js.map +1 -0
- package/lib/module/ui/components/ProfileCard.js +119 -0
- package/lib/module/ui/components/ProfileCard.js.map +1 -0
- package/lib/module/ui/components/QuickActions.js +82 -0
- package/lib/module/ui/components/QuickActions.js.map +1 -0
- package/lib/module/ui/components/Section.js +31 -0
- package/lib/module/ui/components/Section.js.map +1 -0
- package/lib/module/ui/components/SectionTitle.js +30 -0
- package/lib/module/ui/components/SectionTitle.js.map +1 -0
- package/lib/module/ui/components/bottomSheet/index.js +5 -0
- package/lib/module/ui/components/bottomSheet/index.js.map +1 -0
- package/lib/module/ui/components/icon/OxyIcon.js +22 -0
- package/lib/module/ui/components/icon/OxyIcon.js.map +1 -0
- package/lib/module/ui/components/icon/index.js +4 -0
- package/lib/module/ui/components/icon/index.js.map +1 -0
- package/lib/module/ui/components/index.js +18 -0
- package/lib/module/ui/components/index.js.map +1 -0
- package/lib/module/ui/components/internal/GroupedPillButtons.js +208 -0
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -0
- package/lib/module/ui/components/internal/TextField.js +571 -0
- package/lib/module/ui/components/internal/TextField.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +579 -0
- package/lib/module/ui/context/OxyContext.js.map +1 -0
- package/lib/module/ui/index.js +26 -0
- package/lib/module/ui/index.js.map +1 -0
- package/lib/module/ui/navigation/OxyRouter.js +262 -0
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -0
- package/lib/module/ui/navigation/types.js +4 -0
- package/lib/module/ui/navigation/types.js.map +1 -0
- package/lib/module/ui/screens/AccountCenterScreen.js +308 -0
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -0
- package/lib/module/ui/screens/AccountManagementDemo.js +296 -0
- package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -0
- package/lib/module/ui/screens/AccountOverviewScreen.js +849 -0
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -0
- package/lib/module/ui/screens/AccountSettingsScreen.js +837 -0
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -0
- package/lib/module/ui/screens/AccountSwitcherScreen.js +782 -0
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -0
- package/lib/module/ui/screens/AppInfoScreen.js +658 -0
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -0
- package/lib/module/ui/screens/BillingManagementScreen.js +631 -0
- package/lib/module/ui/screens/BillingManagementScreen.js.map +1 -0
- package/lib/module/ui/screens/FeedbackScreen.js +1164 -0
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -0
- package/lib/module/ui/screens/FileManagementScreen.js +2510 -0
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +1615 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
- package/lib/module/ui/screens/ProfileScreen.js +444 -0
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -0
- package/lib/module/ui/screens/SessionManagementScreen.js +444 -0
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -0
- package/lib/module/ui/screens/SignInScreen.js +876 -0
- package/lib/module/ui/screens/SignInScreen.js.map +1 -0
- package/lib/module/ui/screens/SignUpScreen.js +1030 -0
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +83 -0
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +358 -0
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +222 -0
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +142 -0
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +122 -0
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +100 -0
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -0
- package/lib/module/ui/store/index.js +44 -0
- package/lib/module/ui/store/index.js.map +1 -0
- package/lib/module/ui/styles/FONTS.md +126 -0
- package/lib/module/ui/styles/fonts.js +81 -0
- package/lib/module/ui/styles/fonts.js.map +1 -0
- package/lib/module/ui/styles/index.js +5 -0
- package/lib/module/ui/styles/index.js.map +1 -0
- package/lib/module/ui/styles/theme.js +114 -0
- package/lib/module/ui/styles/theme.js.map +1 -0
- package/lib/module/utils/deviceManager.js +167 -0
- package/lib/module/utils/deviceManager.js.map +1 -0
- package/lib/module/utils/index.js +4 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/module/utils/polyfills.js +36 -0
- package/lib/module/utils/polyfills.js.map +1 -0
- package/lib/typescript/assets/icons/OxyServices.d.ts +29 -0
- package/lib/typescript/assets/icons/OxyServices.d.ts.map +1 -0
- package/lib/typescript/assets/illustrations/HighFive.d.ts +9 -0
- package/lib/typescript/assets/illustrations/HighFive.d.ts.map +1 -0
- package/lib/typescript/constants/version.d.ts +14 -0
- package/lib/typescript/constants/version.d.ts.map +1 -0
- package/lib/typescript/core/index.d.ts +603 -0
- package/lib/typescript/core/index.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +20 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/lib/sonner.d.ts +6 -0
- package/lib/typescript/lib/sonner.d.ts.map +1 -0
- package/lib/typescript/models/interfaces.d.ts +179 -0
- package/lib/typescript/models/interfaces.d.ts.map +1 -0
- package/lib/typescript/models/secureSession.d.ts +27 -0
- package/lib/typescript/models/secureSession.d.ts.map +1 -0
- package/lib/typescript/node/createAuth.d.ts +7 -0
- package/lib/typescript/node/createAuth.d.ts.map +1 -0
- package/lib/typescript/node/index.d.ts +13 -0
- package/lib/typescript/node/index.d.ts.map +1 -0
- package/lib/typescript/types/expo-vector-icons.d.ts +3 -0
- package/lib/typescript/types/express.d.ts +5 -0
- package/lib/typescript/types/react-redux.d.ts +5 -0
- package/lib/typescript/ui/components/Avatar.d.ts +62 -0
- package/lib/typescript/ui/components/Avatar.d.ts.map +1 -0
- package/lib/typescript/ui/components/FollowButton.d.ts +92 -0
- package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -0
- package/lib/typescript/ui/components/FontLoader.d.ts +15 -0
- package/lib/typescript/ui/components/FontLoader.d.ts.map +1 -0
- package/lib/typescript/ui/components/GroupedItem.d.ts +17 -0
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts +19 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyLogo.d.ts +29 -0
- package/lib/typescript/ui/components/OxyLogo.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts +12 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxySignInButton.d.ts +70 -0
- package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -0
- package/lib/typescript/ui/components/ProfileCard.d.ts +20 -0
- package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -0
- package/lib/typescript/ui/components/QuickActions.d.ts +15 -0
- package/lib/typescript/ui/components/QuickActions.d.ts.map +1 -0
- package/lib/typescript/ui/components/Section.d.ts +11 -0
- package/lib/typescript/ui/components/Section.d.ts.map +1 -0
- package/lib/typescript/ui/components/SectionTitle.d.ts +9 -0
- package/lib/typescript/ui/components/SectionTitle.d.ts.map +1 -0
- package/lib/typescript/ui/components/bottomSheet/index.d.ts +4 -0
- package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/icon/OxyIcon.d.ts +10 -0
- package/lib/typescript/ui/components/icon/OxyIcon.d.ts.map +1 -0
- package/lib/typescript/ui/components/icon/index.d.ts +3 -0
- package/lib/typescript/ui/components/icon/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/index.d.ts +13 -0
- package/lib/typescript/ui/components/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts +18 -0
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts +25 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -0
- package/lib/typescript/ui/context/OxyContext.d.ts +42 -0
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -0
- package/lib/typescript/ui/index.d.ts +17 -0
- package/lib/typescript/ui/index.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/OxyRouter.d.ts +5 -0
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/types.d.ts +116 -0
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountManagementDemo.d.ts +8 -0
- package/lib/typescript/ui/screens/AccountManagementDemo.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts +8 -0
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/ProfileScreen.d.ts +9 -0
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SignInScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SignUpScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -0
- package/lib/typescript/ui/store/index.d.ts +19 -0
- package/lib/typescript/ui/store/index.d.ts.map +1 -0
- package/lib/typescript/ui/styles/fonts.d.ts +21 -0
- package/lib/typescript/ui/styles/fonts.d.ts.map +1 -0
- package/lib/typescript/ui/styles/index.d.ts +3 -0
- package/lib/typescript/ui/styles/index.d.ts.map +1 -0
- package/lib/typescript/ui/styles/theme.d.ts +68 -0
- package/lib/typescript/ui/styles/theme.d.ts.map +1 -0
- package/lib/typescript/utils/deviceManager.d.ts +66 -0
- package/lib/typescript/utils/deviceManager.d.ts.map +1 -0
- package/lib/typescript/utils/index.d.ts +3 -0
- package/lib/typescript/utils/index.d.ts.map +1 -0
- package/lib/typescript/utils/polyfills.d.ts +6 -0
- package/lib/typescript/utils/polyfills.d.ts.map +1 -0
- package/package.json +7 -6
- package/src/assets/illustrations/HighFive.tsx +41 -0
- package/src/node/createAuth.ts +116 -0
- package/src/node/index.ts +4 -0
- package/src/types/expo-vector-icons.d.ts +3 -0
- package/src/types/express.d.ts +5 -0
- package/src/types/react-redux.d.ts +5 -0
- package/src/ui/components/OxyProvider.tsx +136 -135
- package/src/ui/components/internal/GroupedPillButtons.tsx +253 -0
- package/src/ui/components/internal/TextField.tsx +694 -0
- package/src/ui/index.ts +6 -2
- package/src/ui/navigation/OxyRouter.tsx +8 -3
- package/src/ui/screens/FeedbackScreen.tsx +1042 -0
- package/src/ui/screens/SignInScreen.tsx +179 -222
- package/src/ui/screens/SignUpScreen.tsx +772 -608
- package/src/ui/store/index.ts +51 -0
|
@@ -0,0 +1,837 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useState, useEffect, useRef, useMemo, useCallback } from 'react';
|
|
4
|
+
import { View, Text, TouchableOpacity, StyleSheet, ActivityIndicator, ScrollView, Alert, TextInput, Animated } from 'react-native';
|
|
5
|
+
import { useOxy } from '../context/OxyContext';
|
|
6
|
+
import Avatar from '../components/Avatar';
|
|
7
|
+
import OxyIcon from '../components/icon/OxyIcon';
|
|
8
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
9
|
+
import { toast } from '../../lib/sonner';
|
|
10
|
+
import { fontFamilies } from '../styles/fonts';
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
|
+
const AccountSettingsScreen = ({
|
|
13
|
+
onClose,
|
|
14
|
+
theme,
|
|
15
|
+
goBack,
|
|
16
|
+
navigate
|
|
17
|
+
}) => {
|
|
18
|
+
const {
|
|
19
|
+
user,
|
|
20
|
+
oxyServices,
|
|
21
|
+
isLoading: authLoading
|
|
22
|
+
} = useOxy();
|
|
23
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
24
|
+
const [isSaving, setIsSaving] = useState(false);
|
|
25
|
+
|
|
26
|
+
// Animation refs
|
|
27
|
+
const saveButtonScale = useRef(new Animated.Value(1)).current;
|
|
28
|
+
|
|
29
|
+
// Form state
|
|
30
|
+
const [displayName, setDisplayName] = useState('');
|
|
31
|
+
const [username, setUsername] = useState('');
|
|
32
|
+
const [email, setEmail] = useState('');
|
|
33
|
+
const [bio, setBio] = useState('');
|
|
34
|
+
const [location, setLocation] = useState('');
|
|
35
|
+
const [website, setWebsite] = useState('');
|
|
36
|
+
const [avatarUrl, setAvatarUrl] = useState('');
|
|
37
|
+
|
|
38
|
+
// Editing states
|
|
39
|
+
const [editingField, setEditingField] = useState(null);
|
|
40
|
+
|
|
41
|
+
// Temporary input states for inline editing
|
|
42
|
+
const [tempDisplayName, setTempDisplayName] = useState('');
|
|
43
|
+
const [tempUsername, setTempUsername] = useState('');
|
|
44
|
+
const [tempEmail, setTempEmail] = useState('');
|
|
45
|
+
const [tempBio, setTempBio] = useState('');
|
|
46
|
+
const [tempLocation, setTempLocation] = useState('');
|
|
47
|
+
const [tempWebsite, setTempWebsite] = useState('');
|
|
48
|
+
|
|
49
|
+
// Memoize theme-related calculations to prevent unnecessary recalculations
|
|
50
|
+
const themeStyles = useMemo(() => {
|
|
51
|
+
const isDarkTheme = theme === 'dark';
|
|
52
|
+
return {
|
|
53
|
+
isDarkTheme,
|
|
54
|
+
backgroundColor: isDarkTheme ? '#121212' : '#f2f2f2',
|
|
55
|
+
primaryColor: '#007AFF'
|
|
56
|
+
};
|
|
57
|
+
}, [theme]);
|
|
58
|
+
|
|
59
|
+
// Memoize animation function to prevent recreation on every render
|
|
60
|
+
const animateSaveButton = useCallback(toValue => {
|
|
61
|
+
Animated.spring(saveButtonScale, {
|
|
62
|
+
toValue,
|
|
63
|
+
useNativeDriver: true,
|
|
64
|
+
tension: 150,
|
|
65
|
+
friction: 8
|
|
66
|
+
}).start();
|
|
67
|
+
}, [saveButtonScale]);
|
|
68
|
+
|
|
69
|
+
// Load user data
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
if (user) {
|
|
72
|
+
const userDisplayName = typeof user.name === 'string' ? user.name : user.name?.full || user.name?.first || '';
|
|
73
|
+
setDisplayName(userDisplayName);
|
|
74
|
+
setUsername(user.username || '');
|
|
75
|
+
setEmail(user.email || '');
|
|
76
|
+
setBio(user.bio || '');
|
|
77
|
+
setLocation(user.location || '');
|
|
78
|
+
setWebsite(user.website || '');
|
|
79
|
+
setAvatarUrl(user.avatar?.url || '');
|
|
80
|
+
}
|
|
81
|
+
}, [user]);
|
|
82
|
+
const handleSave = async () => {
|
|
83
|
+
if (!user) return;
|
|
84
|
+
try {
|
|
85
|
+
setIsSaving(true);
|
|
86
|
+
animateSaveButton(0.95); // Scale down slightly for animation
|
|
87
|
+
|
|
88
|
+
const updates = {
|
|
89
|
+
username,
|
|
90
|
+
email,
|
|
91
|
+
bio,
|
|
92
|
+
location,
|
|
93
|
+
website
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
// Handle name field
|
|
97
|
+
if (displayName) {
|
|
98
|
+
updates.name = displayName;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Handle avatar
|
|
102
|
+
if (avatarUrl !== user.avatar?.url) {
|
|
103
|
+
updates.avatar = {
|
|
104
|
+
url: avatarUrl
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
await oxyServices.updateProfile(updates);
|
|
108
|
+
toast.success('Profile updated successfully');
|
|
109
|
+
animateSaveButton(1); // Scale back to normal
|
|
110
|
+
|
|
111
|
+
if (onClose) {
|
|
112
|
+
onClose();
|
|
113
|
+
} else if (goBack) {
|
|
114
|
+
goBack();
|
|
115
|
+
}
|
|
116
|
+
} catch (error) {
|
|
117
|
+
toast.error(error.message || 'Failed to update profile');
|
|
118
|
+
animateSaveButton(1); // Scale back to normal on error
|
|
119
|
+
} finally {
|
|
120
|
+
setIsSaving(false);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const handleAvatarUpdate = () => {
|
|
124
|
+
Alert.alert('Update Avatar', 'Choose how you want to update your profile picture', [{
|
|
125
|
+
text: 'Cancel',
|
|
126
|
+
style: 'cancel'
|
|
127
|
+
}, {
|
|
128
|
+
text: 'Use Mock URL',
|
|
129
|
+
onPress: () => {
|
|
130
|
+
const mockUrl = `https://ui-avatars.com/api/?name=${displayName || username}&background=random`;
|
|
131
|
+
setAvatarUrl(mockUrl);
|
|
132
|
+
}
|
|
133
|
+
}, {
|
|
134
|
+
text: 'Remove Avatar',
|
|
135
|
+
onPress: () => setAvatarUrl(''),
|
|
136
|
+
style: 'destructive'
|
|
137
|
+
}]);
|
|
138
|
+
};
|
|
139
|
+
const startEditing = (type, currentValue) => {
|
|
140
|
+
switch (type) {
|
|
141
|
+
case 'displayName':
|
|
142
|
+
setTempDisplayName(currentValue);
|
|
143
|
+
break;
|
|
144
|
+
case 'username':
|
|
145
|
+
setTempUsername(currentValue);
|
|
146
|
+
break;
|
|
147
|
+
case 'email':
|
|
148
|
+
setTempEmail(currentValue);
|
|
149
|
+
break;
|
|
150
|
+
case 'bio':
|
|
151
|
+
setTempBio(currentValue);
|
|
152
|
+
break;
|
|
153
|
+
case 'location':
|
|
154
|
+
setTempLocation(currentValue);
|
|
155
|
+
break;
|
|
156
|
+
case 'website':
|
|
157
|
+
setTempWebsite(currentValue);
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
setEditingField(type);
|
|
161
|
+
};
|
|
162
|
+
const saveField = type => {
|
|
163
|
+
animateSaveButton(0.95); // Scale down slightly for animation
|
|
164
|
+
|
|
165
|
+
switch (type) {
|
|
166
|
+
case 'displayName':
|
|
167
|
+
setDisplayName(tempDisplayName);
|
|
168
|
+
break;
|
|
169
|
+
case 'username':
|
|
170
|
+
setUsername(tempUsername);
|
|
171
|
+
break;
|
|
172
|
+
case 'email':
|
|
173
|
+
setEmail(tempEmail);
|
|
174
|
+
break;
|
|
175
|
+
case 'bio':
|
|
176
|
+
setBio(tempBio);
|
|
177
|
+
break;
|
|
178
|
+
case 'location':
|
|
179
|
+
setLocation(tempLocation);
|
|
180
|
+
break;
|
|
181
|
+
case 'website':
|
|
182
|
+
setWebsite(tempWebsite);
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// Brief delay for animation, then reset and close editing
|
|
187
|
+
setTimeout(() => {
|
|
188
|
+
animateSaveButton(1);
|
|
189
|
+
setEditingField(null);
|
|
190
|
+
}, 150);
|
|
191
|
+
};
|
|
192
|
+
const cancelEditing = () => {
|
|
193
|
+
setEditingField(null);
|
|
194
|
+
};
|
|
195
|
+
const getFieldLabel = type => {
|
|
196
|
+
const labels = {
|
|
197
|
+
displayName: 'Display Name',
|
|
198
|
+
username: 'Username',
|
|
199
|
+
email: 'Email',
|
|
200
|
+
bio: 'Bio',
|
|
201
|
+
location: 'Location',
|
|
202
|
+
website: 'Website'
|
|
203
|
+
};
|
|
204
|
+
return labels[type] || 'Field';
|
|
205
|
+
};
|
|
206
|
+
const getFieldIcon = type => {
|
|
207
|
+
const icons = {
|
|
208
|
+
displayName: {
|
|
209
|
+
name: 'person',
|
|
210
|
+
color: '#007AFF'
|
|
211
|
+
},
|
|
212
|
+
username: {
|
|
213
|
+
name: 'at',
|
|
214
|
+
color: '#5856D6'
|
|
215
|
+
},
|
|
216
|
+
email: {
|
|
217
|
+
name: 'mail',
|
|
218
|
+
color: '#FF9500'
|
|
219
|
+
},
|
|
220
|
+
bio: {
|
|
221
|
+
name: 'document-text',
|
|
222
|
+
color: '#34C759'
|
|
223
|
+
},
|
|
224
|
+
location: {
|
|
225
|
+
name: 'location',
|
|
226
|
+
color: '#FF3B30'
|
|
227
|
+
},
|
|
228
|
+
website: {
|
|
229
|
+
name: 'link',
|
|
230
|
+
color: '#32D74B'
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
return icons[type] || {
|
|
234
|
+
name: 'person',
|
|
235
|
+
color: '#007AFF'
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
const renderEditingField = type => {
|
|
239
|
+
const fieldConfig = {
|
|
240
|
+
displayName: {
|
|
241
|
+
label: 'Display Name',
|
|
242
|
+
value: displayName,
|
|
243
|
+
placeholder: 'Enter your display name',
|
|
244
|
+
icon: 'person',
|
|
245
|
+
color: '#007AFF',
|
|
246
|
+
multiline: false,
|
|
247
|
+
keyboardType: 'default'
|
|
248
|
+
},
|
|
249
|
+
username: {
|
|
250
|
+
label: 'Username',
|
|
251
|
+
value: username,
|
|
252
|
+
placeholder: 'Choose a username',
|
|
253
|
+
icon: 'at',
|
|
254
|
+
color: '#5856D6',
|
|
255
|
+
multiline: false,
|
|
256
|
+
keyboardType: 'default'
|
|
257
|
+
},
|
|
258
|
+
email: {
|
|
259
|
+
label: 'Email',
|
|
260
|
+
value: email,
|
|
261
|
+
placeholder: 'Enter your email address',
|
|
262
|
+
icon: 'mail',
|
|
263
|
+
color: '#FF9500',
|
|
264
|
+
multiline: false,
|
|
265
|
+
keyboardType: 'email-address'
|
|
266
|
+
},
|
|
267
|
+
bio: {
|
|
268
|
+
label: 'Bio',
|
|
269
|
+
value: bio,
|
|
270
|
+
placeholder: 'Tell people about yourself...',
|
|
271
|
+
icon: 'document-text',
|
|
272
|
+
color: '#34C759',
|
|
273
|
+
multiline: true,
|
|
274
|
+
keyboardType: 'default'
|
|
275
|
+
},
|
|
276
|
+
location: {
|
|
277
|
+
label: 'Location',
|
|
278
|
+
value: location,
|
|
279
|
+
placeholder: 'Enter your location',
|
|
280
|
+
icon: 'location',
|
|
281
|
+
color: '#FF3B30',
|
|
282
|
+
multiline: false,
|
|
283
|
+
keyboardType: 'default'
|
|
284
|
+
},
|
|
285
|
+
website: {
|
|
286
|
+
label: 'Website',
|
|
287
|
+
value: website,
|
|
288
|
+
placeholder: 'Enter your website URL',
|
|
289
|
+
icon: 'link',
|
|
290
|
+
color: '#32D74B',
|
|
291
|
+
multiline: false,
|
|
292
|
+
keyboardType: 'url'
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
const config = fieldConfig[type];
|
|
296
|
+
if (!config) return null;
|
|
297
|
+
const tempValue = (() => {
|
|
298
|
+
switch (type) {
|
|
299
|
+
case 'displayName':
|
|
300
|
+
return tempDisplayName;
|
|
301
|
+
case 'username':
|
|
302
|
+
return tempUsername;
|
|
303
|
+
case 'email':
|
|
304
|
+
return tempEmail;
|
|
305
|
+
case 'bio':
|
|
306
|
+
return tempBio;
|
|
307
|
+
case 'location':
|
|
308
|
+
return tempLocation;
|
|
309
|
+
case 'website':
|
|
310
|
+
return tempWebsite;
|
|
311
|
+
default:
|
|
312
|
+
return '';
|
|
313
|
+
}
|
|
314
|
+
})();
|
|
315
|
+
const setTempValue = text => {
|
|
316
|
+
switch (type) {
|
|
317
|
+
case 'displayName':
|
|
318
|
+
setTempDisplayName(text);
|
|
319
|
+
break;
|
|
320
|
+
case 'username':
|
|
321
|
+
setTempUsername(text);
|
|
322
|
+
break;
|
|
323
|
+
case 'email':
|
|
324
|
+
setTempEmail(text);
|
|
325
|
+
break;
|
|
326
|
+
case 'bio':
|
|
327
|
+
setTempBio(text);
|
|
328
|
+
break;
|
|
329
|
+
case 'location':
|
|
330
|
+
setTempLocation(text);
|
|
331
|
+
break;
|
|
332
|
+
case 'website':
|
|
333
|
+
setTempWebsite(text);
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
return /*#__PURE__*/_jsx(View, {
|
|
338
|
+
style: styles.editingFieldContainer,
|
|
339
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
340
|
+
style: styles.editingFieldContent,
|
|
341
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
342
|
+
style: styles.newValueSection,
|
|
343
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
344
|
+
style: styles.editingFieldLabel,
|
|
345
|
+
children: `Enter ${config.label.toLowerCase()}:`
|
|
346
|
+
}), /*#__PURE__*/_jsx(TextInput, {
|
|
347
|
+
style: [config.multiline ? styles.editingFieldTextArea : styles.editingFieldInput, {
|
|
348
|
+
backgroundColor: themeStyles.isDarkTheme ? '#333' : '#fff',
|
|
349
|
+
color: themeStyles.isDarkTheme ? '#fff' : '#000',
|
|
350
|
+
borderColor: themeStyles.primaryColor
|
|
351
|
+
}],
|
|
352
|
+
value: tempValue,
|
|
353
|
+
onChangeText: setTempValue,
|
|
354
|
+
placeholder: config.placeholder,
|
|
355
|
+
placeholderTextColor: themeStyles.isDarkTheme ? '#aaa' : '#999',
|
|
356
|
+
multiline: config.multiline,
|
|
357
|
+
numberOfLines: config.multiline ? 6 : 1,
|
|
358
|
+
keyboardType: config.keyboardType,
|
|
359
|
+
autoFocus: true,
|
|
360
|
+
selectionColor: themeStyles.primaryColor
|
|
361
|
+
})]
|
|
362
|
+
})
|
|
363
|
+
})
|
|
364
|
+
});
|
|
365
|
+
};
|
|
366
|
+
const renderField = (type, label, value, placeholder, icon, iconColor, multiline = false, keyboardType = 'default', isFirst = false, isLast = false) => {
|
|
367
|
+
const itemStyles = [styles.settingItem, isFirst && styles.firstSettingItem, isLast && styles.lastSettingItem];
|
|
368
|
+
return /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
369
|
+
style: itemStyles,
|
|
370
|
+
onPress: () => startEditing(type, value),
|
|
371
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
372
|
+
style: styles.settingInfo,
|
|
373
|
+
children: [/*#__PURE__*/_jsx(OxyIcon, {
|
|
374
|
+
name: icon,
|
|
375
|
+
size: 20,
|
|
376
|
+
color: iconColor,
|
|
377
|
+
style: styles.settingIcon
|
|
378
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
379
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
380
|
+
style: styles.settingLabel,
|
|
381
|
+
children: label
|
|
382
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
383
|
+
style: styles.settingDescription,
|
|
384
|
+
children: value || placeholder
|
|
385
|
+
})]
|
|
386
|
+
})]
|
|
387
|
+
}), /*#__PURE__*/_jsx(OxyIcon, {
|
|
388
|
+
name: "chevron-forward",
|
|
389
|
+
size: 16,
|
|
390
|
+
color: "#ccc"
|
|
391
|
+
})]
|
|
392
|
+
});
|
|
393
|
+
};
|
|
394
|
+
if (authLoading || !user) {
|
|
395
|
+
return /*#__PURE__*/_jsx(View, {
|
|
396
|
+
style: [styles.container, {
|
|
397
|
+
backgroundColor: themeStyles.backgroundColor,
|
|
398
|
+
justifyContent: 'center'
|
|
399
|
+
}],
|
|
400
|
+
children: /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
401
|
+
size: "large",
|
|
402
|
+
color: themeStyles.primaryColor
|
|
403
|
+
})
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
407
|
+
style: [styles.container, {
|
|
408
|
+
backgroundColor: themeStyles.backgroundColor
|
|
409
|
+
}],
|
|
410
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
411
|
+
style: styles.header,
|
|
412
|
+
children: editingField ? /*#__PURE__*/_jsxs(View, {
|
|
413
|
+
style: styles.editingHeader,
|
|
414
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
415
|
+
style: styles.editingHeaderTop,
|
|
416
|
+
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
417
|
+
style: styles.cancelButton,
|
|
418
|
+
onPress: cancelEditing,
|
|
419
|
+
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
420
|
+
name: "close",
|
|
421
|
+
size: 24,
|
|
422
|
+
color: "#666"
|
|
423
|
+
})
|
|
424
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
425
|
+
style: {
|
|
426
|
+
transform: [{
|
|
427
|
+
scale: saveButtonScale
|
|
428
|
+
}]
|
|
429
|
+
},
|
|
430
|
+
children: /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
431
|
+
style: [styles.saveHeaderButton, {
|
|
432
|
+
opacity: isSaving ? 0.7 : 1,
|
|
433
|
+
backgroundColor: editingField ? getFieldIcon(editingField).color : '#007AFF'
|
|
434
|
+
}],
|
|
435
|
+
onPress: () => saveField(editingField),
|
|
436
|
+
disabled: isSaving,
|
|
437
|
+
children: isSaving ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
438
|
+
size: "small",
|
|
439
|
+
color: "#fff"
|
|
440
|
+
}) : /*#__PURE__*/_jsx(Text, {
|
|
441
|
+
style: styles.saveButtonText,
|
|
442
|
+
children: "Save"
|
|
443
|
+
})
|
|
444
|
+
})
|
|
445
|
+
})]
|
|
446
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
447
|
+
style: styles.editingHeaderBottom,
|
|
448
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
449
|
+
style: styles.headerTitleWithIcon,
|
|
450
|
+
children: [/*#__PURE__*/_jsx(OxyIcon, {
|
|
451
|
+
name: getFieldIcon(editingField).name,
|
|
452
|
+
size: 50,
|
|
453
|
+
color: getFieldIcon(editingField).color,
|
|
454
|
+
style: styles.headerIcon
|
|
455
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
456
|
+
style: styles.headerTitleLarge,
|
|
457
|
+
children: getFieldLabel(editingField)
|
|
458
|
+
})]
|
|
459
|
+
})
|
|
460
|
+
})]
|
|
461
|
+
}) : /*#__PURE__*/_jsxs(View, {
|
|
462
|
+
style: styles.normalHeader,
|
|
463
|
+
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
464
|
+
style: styles.cancelButton,
|
|
465
|
+
onPress: onClose || goBack,
|
|
466
|
+
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
467
|
+
name: "close",
|
|
468
|
+
size: 24,
|
|
469
|
+
color: "#666"
|
|
470
|
+
})
|
|
471
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
472
|
+
style: styles.headerTitle,
|
|
473
|
+
children: "Account Settings"
|
|
474
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
475
|
+
style: {
|
|
476
|
+
transform: [{
|
|
477
|
+
scale: saveButtonScale
|
|
478
|
+
}]
|
|
479
|
+
},
|
|
480
|
+
children: /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
481
|
+
style: [styles.saveIconButton, {
|
|
482
|
+
opacity: isSaving ? 0.7 : 1
|
|
483
|
+
}],
|
|
484
|
+
onPress: handleSave,
|
|
485
|
+
disabled: isSaving,
|
|
486
|
+
children: isSaving ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
487
|
+
size: "small",
|
|
488
|
+
color: themeStyles.primaryColor
|
|
489
|
+
}) : /*#__PURE__*/_jsx(Ionicons, {
|
|
490
|
+
name: "checkmark",
|
|
491
|
+
size: 24,
|
|
492
|
+
color: themeStyles.primaryColor
|
|
493
|
+
})
|
|
494
|
+
})
|
|
495
|
+
})]
|
|
496
|
+
})
|
|
497
|
+
}), /*#__PURE__*/_jsx(ScrollView, {
|
|
498
|
+
style: editingField ? styles.contentEditing : styles.content,
|
|
499
|
+
children: editingField ?
|
|
500
|
+
/*#__PURE__*/
|
|
501
|
+
// Show only the editing interface when editing
|
|
502
|
+
_jsx(View, {
|
|
503
|
+
style: styles.editingOnlyContainer,
|
|
504
|
+
children: renderEditingField(editingField)
|
|
505
|
+
}) :
|
|
506
|
+
/*#__PURE__*/
|
|
507
|
+
// Show all settings when not editing
|
|
508
|
+
_jsxs(_Fragment, {
|
|
509
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
510
|
+
style: styles.section,
|
|
511
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
512
|
+
style: styles.sectionTitle,
|
|
513
|
+
children: "Profile Picture"
|
|
514
|
+
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
515
|
+
style: [styles.settingItem, styles.firstSettingItem, styles.lastSettingItem],
|
|
516
|
+
onPress: handleAvatarUpdate,
|
|
517
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
518
|
+
style: styles.userIcon,
|
|
519
|
+
children: /*#__PURE__*/_jsx(Avatar, {
|
|
520
|
+
uri: avatarUrl,
|
|
521
|
+
name: displayName || username,
|
|
522
|
+
size: 50,
|
|
523
|
+
theme: theme
|
|
524
|
+
})
|
|
525
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
526
|
+
style: styles.settingInfo,
|
|
527
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
528
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
529
|
+
style: styles.settingLabel,
|
|
530
|
+
children: "Profile Photo"
|
|
531
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
532
|
+
style: styles.settingDescription,
|
|
533
|
+
children: avatarUrl ? 'Tap to change your profile picture' : 'Tap to add a profile picture'
|
|
534
|
+
})]
|
|
535
|
+
})
|
|
536
|
+
}), /*#__PURE__*/_jsx(OxyIcon, {
|
|
537
|
+
name: "chevron-forward",
|
|
538
|
+
size: 16,
|
|
539
|
+
color: "#ccc"
|
|
540
|
+
})]
|
|
541
|
+
})]
|
|
542
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
543
|
+
style: styles.section,
|
|
544
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
545
|
+
style: styles.sectionTitle,
|
|
546
|
+
children: "Basic Information"
|
|
547
|
+
}), renderField('displayName', 'Display Name', displayName, 'Add your display name', 'person', '#007AFF', false, 'default', true, false), renderField('username', 'Username', username, 'Choose a username', 'at', '#5856D6', false, 'default', false, false), renderField('email', 'Email', email, 'Add your email address', 'mail', '#FF9500', false, 'email-address', false, true)]
|
|
548
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
549
|
+
style: styles.section,
|
|
550
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
551
|
+
style: styles.sectionTitle,
|
|
552
|
+
children: "About You"
|
|
553
|
+
}), renderField('bio', 'Bio', bio, 'Tell people about yourself', 'document-text', '#34C759', true, 'default', true, false), renderField('location', 'Location', location, 'Add your location', 'location', '#FF3B30', false, 'default', false, false), renderField('website', 'Website', website, 'Add your website', 'link', '#32D74B', false, 'url', false, true)]
|
|
554
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
555
|
+
style: styles.section,
|
|
556
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
557
|
+
style: styles.sectionTitle,
|
|
558
|
+
children: "Quick Actions"
|
|
559
|
+
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
560
|
+
style: [styles.settingItem, styles.firstSettingItem],
|
|
561
|
+
onPress: () => toast.info('Privacy settings coming soon!'),
|
|
562
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
563
|
+
style: styles.settingInfo,
|
|
564
|
+
children: [/*#__PURE__*/_jsx(OxyIcon, {
|
|
565
|
+
name: "shield-checkmark",
|
|
566
|
+
size: 20,
|
|
567
|
+
color: "#8E8E93",
|
|
568
|
+
style: styles.settingIcon
|
|
569
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
570
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
571
|
+
style: styles.settingLabel,
|
|
572
|
+
children: "Privacy Settings"
|
|
573
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
574
|
+
style: styles.settingDescription,
|
|
575
|
+
children: "Control who can see your profile"
|
|
576
|
+
})]
|
|
577
|
+
})]
|
|
578
|
+
}), /*#__PURE__*/_jsx(OxyIcon, {
|
|
579
|
+
name: "chevron-forward",
|
|
580
|
+
size: 16,
|
|
581
|
+
color: "#ccc"
|
|
582
|
+
})]
|
|
583
|
+
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
584
|
+
style: [styles.settingItem, styles.lastSettingItem],
|
|
585
|
+
onPress: () => toast.info('Account verification coming soon!'),
|
|
586
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
587
|
+
style: styles.settingInfo,
|
|
588
|
+
children: [/*#__PURE__*/_jsx(OxyIcon, {
|
|
589
|
+
name: "checkmark-circle",
|
|
590
|
+
size: 20,
|
|
591
|
+
color: "#30D158",
|
|
592
|
+
style: styles.settingIcon
|
|
593
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
594
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
595
|
+
style: styles.settingLabel,
|
|
596
|
+
children: "Verify Account"
|
|
597
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
598
|
+
style: styles.settingDescription,
|
|
599
|
+
children: "Get a verified badge"
|
|
600
|
+
})]
|
|
601
|
+
})]
|
|
602
|
+
}), /*#__PURE__*/_jsx(OxyIcon, {
|
|
603
|
+
name: "chevron-forward",
|
|
604
|
+
size: 16,
|
|
605
|
+
color: "#ccc"
|
|
606
|
+
})]
|
|
607
|
+
})]
|
|
608
|
+
})]
|
|
609
|
+
})
|
|
610
|
+
})]
|
|
611
|
+
});
|
|
612
|
+
};
|
|
613
|
+
const styles = StyleSheet.create({
|
|
614
|
+
container: {
|
|
615
|
+
flex: 1,
|
|
616
|
+
backgroundColor: '#f2f2f2'
|
|
617
|
+
},
|
|
618
|
+
header: {
|
|
619
|
+
paddingHorizontal: 20,
|
|
620
|
+
paddingVertical: 10,
|
|
621
|
+
backgroundColor: '#fff',
|
|
622
|
+
borderBottomWidth: 1,
|
|
623
|
+
borderBottomColor: '#e0e0e0'
|
|
624
|
+
},
|
|
625
|
+
normalHeader: {
|
|
626
|
+
flexDirection: 'row',
|
|
627
|
+
justifyContent: 'space-between',
|
|
628
|
+
alignItems: 'center'
|
|
629
|
+
},
|
|
630
|
+
editingHeader: {
|
|
631
|
+
flexDirection: 'column'
|
|
632
|
+
},
|
|
633
|
+
editingHeaderTop: {
|
|
634
|
+
flexDirection: 'row',
|
|
635
|
+
justifyContent: 'space-between',
|
|
636
|
+
alignItems: 'center',
|
|
637
|
+
marginBottom: 16
|
|
638
|
+
},
|
|
639
|
+
editingHeaderBottom: {
|
|
640
|
+
flexDirection: 'row',
|
|
641
|
+
alignItems: 'center',
|
|
642
|
+
justifyContent: 'flex-start'
|
|
643
|
+
},
|
|
644
|
+
headerTitle: {
|
|
645
|
+
fontSize: 24,
|
|
646
|
+
fontWeight: 'bold',
|
|
647
|
+
color: '#000',
|
|
648
|
+
fontFamily: fontFamilies.phuduBold
|
|
649
|
+
},
|
|
650
|
+
headerTitleWithIcon: {
|
|
651
|
+
flexDirection: 'column',
|
|
652
|
+
alignItems: 'flex-start',
|
|
653
|
+
flex: 1,
|
|
654
|
+
justifyContent: 'flex-start',
|
|
655
|
+
maxWidth: '90%'
|
|
656
|
+
},
|
|
657
|
+
headerTitleLarge: {
|
|
658
|
+
fontSize: 48,
|
|
659
|
+
fontWeight: '800',
|
|
660
|
+
color: '#000',
|
|
661
|
+
fontFamily: fontFamilies.phuduExtraBold,
|
|
662
|
+
textAlign: 'left'
|
|
663
|
+
},
|
|
664
|
+
headerIcon: {
|
|
665
|
+
marginBottom: 2
|
|
666
|
+
},
|
|
667
|
+
cancelButton: {
|
|
668
|
+
padding: 5
|
|
669
|
+
},
|
|
670
|
+
saveHeaderButton: {
|
|
671
|
+
paddingHorizontal: 16,
|
|
672
|
+
paddingVertical: 8,
|
|
673
|
+
borderRadius: 20,
|
|
674
|
+
minWidth: 60,
|
|
675
|
+
alignItems: 'center',
|
|
676
|
+
justifyContent: 'center'
|
|
677
|
+
},
|
|
678
|
+
saveIconButton: {
|
|
679
|
+
padding: 5
|
|
680
|
+
},
|
|
681
|
+
saveButtonText: {
|
|
682
|
+
color: '#fff',
|
|
683
|
+
fontSize: 16,
|
|
684
|
+
fontWeight: '600',
|
|
685
|
+
fontFamily: fontFamilies.phuduSemiBold
|
|
686
|
+
},
|
|
687
|
+
content: {
|
|
688
|
+
flex: 1,
|
|
689
|
+
padding: 16
|
|
690
|
+
},
|
|
691
|
+
contentEditing: {
|
|
692
|
+
flex: 1,
|
|
693
|
+
padding: 0
|
|
694
|
+
},
|
|
695
|
+
section: {
|
|
696
|
+
marginBottom: 24
|
|
697
|
+
},
|
|
698
|
+
sectionTitle: {
|
|
699
|
+
fontSize: 16,
|
|
700
|
+
fontWeight: '600',
|
|
701
|
+
color: '#333',
|
|
702
|
+
marginBottom: 12,
|
|
703
|
+
fontFamily: fontFamilies.phuduSemiBold
|
|
704
|
+
},
|
|
705
|
+
settingItem: {
|
|
706
|
+
backgroundColor: '#fff',
|
|
707
|
+
padding: 16,
|
|
708
|
+
flexDirection: 'row',
|
|
709
|
+
alignItems: 'center',
|
|
710
|
+
justifyContent: 'space-between',
|
|
711
|
+
marginBottom: 2
|
|
712
|
+
},
|
|
713
|
+
firstSettingItem: {
|
|
714
|
+
borderTopLeftRadius: 24,
|
|
715
|
+
borderTopRightRadius: 24
|
|
716
|
+
},
|
|
717
|
+
lastSettingItem: {
|
|
718
|
+
borderBottomLeftRadius: 24,
|
|
719
|
+
borderBottomRightRadius: 24,
|
|
720
|
+
marginBottom: 8
|
|
721
|
+
},
|
|
722
|
+
settingInfo: {
|
|
723
|
+
flexDirection: 'row',
|
|
724
|
+
alignItems: 'center',
|
|
725
|
+
flex: 1
|
|
726
|
+
},
|
|
727
|
+
settingIcon: {
|
|
728
|
+
marginRight: 12
|
|
729
|
+
},
|
|
730
|
+
settingLabel: {
|
|
731
|
+
fontSize: 16,
|
|
732
|
+
fontWeight: '500',
|
|
733
|
+
color: '#333',
|
|
734
|
+
marginBottom: 2
|
|
735
|
+
},
|
|
736
|
+
settingDescription: {
|
|
737
|
+
fontSize: 14,
|
|
738
|
+
color: '#666'
|
|
739
|
+
},
|
|
740
|
+
userIcon: {
|
|
741
|
+
marginRight: 12
|
|
742
|
+
},
|
|
743
|
+
// Inline editing styles
|
|
744
|
+
editingContainer: {
|
|
745
|
+
flex: 1
|
|
746
|
+
},
|
|
747
|
+
editingActions: {
|
|
748
|
+
flexDirection: 'row',
|
|
749
|
+
alignItems: 'center'
|
|
750
|
+
},
|
|
751
|
+
editingButton: {
|
|
752
|
+
padding: 8
|
|
753
|
+
},
|
|
754
|
+
editingButtonText: {
|
|
755
|
+
fontSize: 16,
|
|
756
|
+
fontWeight: '500'
|
|
757
|
+
},
|
|
758
|
+
inlineInput: {
|
|
759
|
+
backgroundColor: '#f8f8f8',
|
|
760
|
+
borderWidth: 1,
|
|
761
|
+
borderColor: '#e0e0e0',
|
|
762
|
+
borderRadius: 8,
|
|
763
|
+
padding: 12,
|
|
764
|
+
fontSize: 16,
|
|
765
|
+
minHeight: 44
|
|
766
|
+
},
|
|
767
|
+
inlineTextArea: {
|
|
768
|
+
backgroundColor: '#f8f8f8',
|
|
769
|
+
borderWidth: 1,
|
|
770
|
+
borderColor: '#e0e0e0',
|
|
771
|
+
borderRadius: 8,
|
|
772
|
+
padding: 12,
|
|
773
|
+
fontSize: 16,
|
|
774
|
+
minHeight: 100,
|
|
775
|
+
textAlignVertical: 'top'
|
|
776
|
+
},
|
|
777
|
+
// Editing-only mode styles
|
|
778
|
+
editingOnlyContainer: {
|
|
779
|
+
flex: 1
|
|
780
|
+
},
|
|
781
|
+
editingFieldContainer: {
|
|
782
|
+
backgroundColor: '#fff',
|
|
783
|
+
padding: 16,
|
|
784
|
+
flex: 1
|
|
785
|
+
},
|
|
786
|
+
editingFieldHeader: {
|
|
787
|
+
marginBottom: 16
|
|
788
|
+
},
|
|
789
|
+
editingFieldTitleContainer: {
|
|
790
|
+
flexDirection: 'row',
|
|
791
|
+
alignItems: 'center'
|
|
792
|
+
},
|
|
793
|
+
editingFieldIcon: {
|
|
794
|
+
marginRight: 12
|
|
795
|
+
},
|
|
796
|
+
editingFieldTitle: {
|
|
797
|
+
fontSize: 20,
|
|
798
|
+
fontWeight: '600',
|
|
799
|
+
color: '#000'
|
|
800
|
+
},
|
|
801
|
+
editingFieldContent: {
|
|
802
|
+
flex: 1
|
|
803
|
+
},
|
|
804
|
+
newValueSection: {
|
|
805
|
+
flex: 1
|
|
806
|
+
},
|
|
807
|
+
editingFieldLabel: {
|
|
808
|
+
fontSize: 16,
|
|
809
|
+
fontWeight: '600',
|
|
810
|
+
color: '#333',
|
|
811
|
+
marginBottom: 12,
|
|
812
|
+
fontFamily: fontFamilies.phuduSemiBold
|
|
813
|
+
},
|
|
814
|
+
editingFieldInput: {
|
|
815
|
+
backgroundColor: '#fff',
|
|
816
|
+
borderWidth: 2,
|
|
817
|
+
borderColor: '#e0e0e0',
|
|
818
|
+
borderRadius: 12,
|
|
819
|
+
padding: 16,
|
|
820
|
+
fontSize: 17,
|
|
821
|
+
minHeight: 52,
|
|
822
|
+
fontWeight: '400'
|
|
823
|
+
},
|
|
824
|
+
editingFieldTextArea: {
|
|
825
|
+
backgroundColor: '#fff',
|
|
826
|
+
borderWidth: 2,
|
|
827
|
+
borderColor: '#e0e0e0',
|
|
828
|
+
borderRadius: 12,
|
|
829
|
+
padding: 16,
|
|
830
|
+
fontSize: 17,
|
|
831
|
+
minHeight: 120,
|
|
832
|
+
textAlignVertical: 'top',
|
|
833
|
+
fontWeight: '400'
|
|
834
|
+
}
|
|
835
|
+
});
|
|
836
|
+
export default /*#__PURE__*/React.memo(AccountSettingsScreen);
|
|
837
|
+
//# sourceMappingURL=AccountSettingsScreen.js.map
|