@oxyhq/services 5.5.9 → 5.6.1
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 +16 -2
- package/lib/commonjs/core/index.js +69 -82
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js +24 -183
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/node/index.js +0 -2
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +100 -229
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyPayButton.js +131 -0
- package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +41 -198
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +15 -2
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js +66 -0
- package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js.map +1 -0
- package/lib/commonjs/ui/components/icon/index.js +7 -0
- package/lib/commonjs/ui/components/icon/index.js.map +1 -1
- package/lib/commonjs/ui/components/index.js +7 -0
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +14 -7
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js +108 -0
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -0
- package/lib/commonjs/ui/components/internal/TextField.js +20 -0
- package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +116 -84
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/index.js +2 -15
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.js +52 -136
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionSocket.js +52 -0
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -0
- package/lib/commonjs/ui/index.js +8 -191
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js +52 -60
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +18 -30
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +4 -22
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +90 -39
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +37 -66
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +21 -44
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +44 -23
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +59 -78
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +1588 -0
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +22 -36
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js +269 -0
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +47 -69
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +99 -333
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +136 -340
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +192 -0
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +135 -0
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +108 -0
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +126 -0
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js +84 -0
- package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js +59 -0
- package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +15 -2
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +66 -0
- package/lib/commonjs/ui/stores/authStore.js.map +1 -0
- package/lib/commonjs/ui/stores/followStore.js +124 -0
- package/lib/commonjs/ui/stores/followStore.js.map +1 -0
- package/lib/commonjs/ui/styles/index.js +0 -11
- package/lib/commonjs/ui/styles/index.js.map +1 -1
- package/lib/commonjs/ui/utils/confirmAction.js +28 -0
- package/lib/commonjs/ui/utils/confirmAction.js.map +1 -0
- package/lib/module/core/index.js +69 -81
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +14 -17
- package/lib/module/index.js.map +1 -1
- package/lib/module/node/index.js +0 -3
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +100 -229
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/OxyPayButton.js +125 -0
- package/lib/module/ui/components/OxyPayButton.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +42 -199
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +15 -2
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/icon/FAIRWalletIcon.js +60 -0
- package/lib/module/ui/components/icon/FAIRWalletIcon.js.map +1 -0
- package/lib/module/ui/components/icon/index.js +1 -0
- package/lib/module/ui/components/icon/index.js.map +1 -1
- package/lib/module/ui/components/index.js +1 -0
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +15 -8
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/module/ui/components/internal/PinInput.js +103 -0
- package/lib/module/ui/components/internal/PinInput.js.map +1 -0
- package/lib/module/ui/components/internal/TextField.js +20 -0
- package/lib/module/ui/components/internal/TextField.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +117 -85
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/index.js +1 -2
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/useFollow.js +52 -137
- package/lib/module/ui/hooks/useFollow.js.map +1 -1
- package/lib/module/ui/hooks/useSessionSocket.js +47 -0
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -0
- package/lib/module/ui/index.js +2 -13
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/OxyRouter.js +53 -61
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +6 -18
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +5 -23
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +91 -40
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +38 -67
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +22 -45
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +44 -23
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +59 -78
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +1583 -0
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +23 -37
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/RecoverAccountScreen.js +263 -0
- package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -0
- package/lib/module/ui/screens/SessionManagementScreen.js +47 -69
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +100 -334
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +137 -341
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInPasswordStep.js +186 -0
- package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignInUsernameStep.js +129 -0
- package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js +102 -0
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js +120 -0
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpSummaryStep.js +79 -0
- package/lib/module/ui/screens/internal/SignUpSummaryStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpWelcomeStep.js +54 -0
- package/lib/module/ui/screens/internal/SignUpWelcomeStep.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +16 -3
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +62 -0
- package/lib/module/ui/stores/authStore.js.map +1 -0
- package/lib/module/ui/stores/followStore.js +120 -0
- package/lib/module/ui/stores/followStore.js.map +1 -0
- package/lib/module/ui/styles/index.js +0 -1
- package/lib/module/ui/styles/index.js.map +1 -1
- package/lib/module/ui/utils/confirmAction.js +25 -0
- package/lib/module/ui/utils/confirmAction.js.map +1 -0
- package/lib/typescript/core/index.d.ts +28 -10
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +5 -4
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +6 -0
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/models/secureSession.d.ts +0 -1
- package/lib/typescript/models/secureSession.d.ts.map +1 -1
- package/lib/typescript/node/index.d.ts +0 -1
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/FollowButton.d.ts +1 -77
- package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyPayButton.d.ts +29 -0
- package/lib/typescript/ui/components/OxyPayButton.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts +8 -0
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts.map +1 -0
- package/lib/typescript/ui/components/icon/index.d.ts +1 -0
- package/lib/typescript/ui/components/icon/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/index.d.ts +1 -0
- package/lib/typescript/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/PinInput.d.ts +12 -0
- package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts +1 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +0 -2
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/index.d.ts +1 -2
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useFollow.d.ts +14 -15
- package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts +11 -0
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -0
- package/lib/typescript/ui/index.d.ts +2 -5
- package/lib/typescript/ui/index.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +5 -23
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +27 -0
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +8 -0
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +27 -0
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +26 -0
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts +20 -0
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts +24 -0
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts +15 -0
- package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts +13 -0
- package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts +16 -0
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -0
- package/lib/typescript/ui/stores/followStore.d.ts +15 -0
- package/lib/typescript/ui/stores/followStore.d.ts.map +1 -0
- package/lib/typescript/ui/styles/index.d.ts +0 -1
- package/lib/typescript/ui/styles/index.d.ts.map +1 -1
- package/lib/typescript/ui/utils/confirmAction.d.ts +7 -0
- package/lib/typescript/ui/utils/confirmAction.d.ts.map +1 -0
- package/package.json +12 -7
- package/src/core/index.ts +78 -88
- package/src/index.ts +8 -45
- package/src/models/interfaces.ts +7 -1
- package/src/models/secureSession.ts +1 -2
- package/src/node/index.ts +0 -3
- package/src/ui/components/FollowButton.tsx +100 -322
- package/src/ui/components/OxyPayButton.tsx +133 -0
- package/src/ui/components/OxyProvider.tsx +39 -201
- package/src/ui/components/OxySignInButton.tsx +13 -2
- package/src/ui/components/icon/FAIRWalletIcon.tsx +49 -0
- package/src/ui/components/icon/index.ts +1 -0
- package/src/ui/components/index.ts +1 -0
- package/src/ui/components/internal/GroupedPillButtons.tsx +12 -8
- package/src/ui/components/internal/PinInput.tsx +102 -0
- package/src/ui/components/internal/TextField.tsx +9 -0
- package/src/ui/context/OxyContext.tsx +74 -91
- package/src/ui/hooks/index.ts +1 -2
- package/src/ui/hooks/useFollow.ts +58 -129
- package/src/ui/hooks/useSessionSocket.ts +50 -0
- package/src/ui/index.ts +2 -37
- package/src/ui/navigation/OxyRouter.tsx +47 -63
- package/src/ui/navigation/types.ts +5 -26
- package/src/ui/screens/AccountCenterScreen.tsx +12 -21
- package/src/ui/screens/AccountOverviewScreen.tsx +6 -30
- package/src/ui/screens/AccountSettingsScreen.tsx +75 -46
- package/src/ui/screens/AccountSwitcherScreen.tsx +46 -88
- package/src/ui/screens/AppInfoScreen.tsx +27 -47
- package/src/ui/screens/FeedbackScreen.tsx +34 -19
- package/src/ui/screens/FileManagementScreen.tsx +293 -321
- package/src/ui/screens/PaymentGatewayScreen.tsx +1315 -0
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +109 -124
- package/src/ui/screens/RecoverAccountScreen.tsx +260 -0
- package/src/ui/screens/SessionManagementScreen.tsx +65 -137
- package/src/ui/screens/SignInScreen.tsx +89 -283
- package/src/ui/screens/SignUpScreen.tsx +138 -291
- package/src/ui/screens/internal/SignInPasswordStep.tsx +179 -0
- package/src/ui/screens/internal/SignInUsernameStep.tsx +139 -0
- package/src/ui/screens/internal/SignUpIdentityStep.tsx +114 -0
- package/src/ui/screens/internal/SignUpSecurityStep.tsx +132 -0
- package/src/ui/screens/internal/SignUpSummaryStep.tsx +66 -0
- package/src/ui/screens/internal/SignUpWelcomeStep.tsx +52 -0
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +13 -3
- package/src/ui/stores/authStore.ts +45 -0
- package/src/ui/stores/followStore.ts +80 -0
- package/src/ui/styles/index.ts +0 -1
- package/src/ui/utils/confirmAction.ts +23 -0
- package/lib/commonjs/ui/components/bottomSheet/index.js +0 -37
- package/lib/commonjs/ui/components/bottomSheet/index.js.map +0 -1
- package/lib/commonjs/ui/hooks/useAuthFetch.js +0 -217
- package/lib/commonjs/ui/hooks/useAuthFetch.js.map +0 -1
- package/lib/commonjs/ui/hooks/useOxyFollow.js +0 -190
- package/lib/commonjs/ui/hooks/useOxyFollow.js.map +0 -1
- package/lib/commonjs/ui/screens/BillingManagementScreen.js +0 -636
- package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +0 -1
- package/lib/commonjs/ui/store/index.js +0 -67
- package/lib/commonjs/ui/store/index.js.map +0 -1
- package/lib/commonjs/ui/store/setupOxyStore.js +0 -63
- package/lib/commonjs/ui/store/setupOxyStore.js.map +0 -1
- package/lib/commonjs/ui/store/slices/authSlice.js +0 -56
- package/lib/commonjs/ui/store/slices/authSlice.js.map +0 -1
- package/lib/commonjs/ui/store/slices/followSlice.js +0 -238
- package/lib/commonjs/ui/store/slices/followSlice.js.map +0 -1
- package/lib/commonjs/ui/store/slices/index.js +0 -129
- package/lib/commonjs/ui/store/slices/index.js.map +0 -1
- package/lib/commonjs/ui/store/slices/types.js +0 -19
- package/lib/commonjs/ui/store/slices/types.js.map +0 -1
- package/lib/commonjs/ui/styles/shadows.js +0 -123
- package/lib/commonjs/ui/styles/shadows.js.map +0 -1
- package/lib/commonjs/utils/polyfills.js +0 -42
- package/lib/commonjs/utils/polyfills.js.map +0 -1
- package/lib/module/ui/components/bottomSheet/index.js +0 -5
- package/lib/module/ui/components/bottomSheet/index.js.map +0 -1
- package/lib/module/ui/hooks/useAuthFetch.js +0 -212
- package/lib/module/ui/hooks/useAuthFetch.js.map +0 -1
- package/lib/module/ui/hooks/useOxyFollow.js +0 -186
- package/lib/module/ui/hooks/useOxyFollow.js.map +0 -1
- package/lib/module/ui/screens/BillingManagementScreen.js +0 -631
- package/lib/module/ui/screens/BillingManagementScreen.js.map +0 -1
- package/lib/module/ui/store/index.js +0 -33
- package/lib/module/ui/store/index.js.map +0 -1
- package/lib/module/ui/store/setupOxyStore.js +0 -59
- package/lib/module/ui/store/setupOxyStore.js.map +0 -1
- package/lib/module/ui/store/slices/authSlice.js +0 -48
- package/lib/module/ui/store/slices/authSlice.js.map +0 -1
- package/lib/module/ui/store/slices/followSlice.js +0 -232
- package/lib/module/ui/store/slices/followSlice.js.map +0 -1
- package/lib/module/ui/store/slices/index.js +0 -11
- package/lib/module/ui/store/slices/index.js.map +0 -1
- package/lib/module/ui/store/slices/types.js +0 -15
- package/lib/module/ui/store/slices/types.js.map +0 -1
- package/lib/module/ui/styles/shadows.js +0 -119
- package/lib/module/ui/styles/shadows.js.map +0 -1
- package/lib/module/utils/polyfills.js +0 -36
- package/lib/module/utils/polyfills.js.map +0 -1
- package/lib/typescript/types/react-redux.d.ts +0 -5
- package/lib/typescript/ui/components/bottomSheet/index.d.ts +0 -4
- package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useAuthFetch.d.ts +0 -34
- package/lib/typescript/ui/hooks/useAuthFetch.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useOxyFollow.d.ts +0 -81
- package/lib/typescript/ui/hooks/useOxyFollow.d.ts.map +0 -1
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +0 -1
- package/lib/typescript/ui/store/index.d.ts +0 -27
- package/lib/typescript/ui/store/index.d.ts.map +0 -1
- package/lib/typescript/ui/store/setupOxyStore.d.ts +0 -29
- package/lib/typescript/ui/store/setupOxyStore.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/authSlice.d.ts +0 -32
- package/lib/typescript/ui/store/slices/authSlice.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/followSlice.d.ts +0 -120
- package/lib/typescript/ui/store/slices/followSlice.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/index.d.ts +0 -9
- package/lib/typescript/ui/store/slices/index.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/types.d.ts +0 -16
- package/lib/typescript/ui/store/slices/types.d.ts.map +0 -1
- package/lib/typescript/ui/styles/shadows.d.ts +0 -233
- package/lib/typescript/ui/styles/shadows.d.ts.map +0 -1
- package/lib/typescript/utils/polyfills.d.ts +0 -6
- package/lib/typescript/utils/polyfills.d.ts.map +0 -1
- package/src/__tests__/backend-middleware.test.ts +0 -209
- package/src/__tests__/polyfills.test.ts +0 -30
- package/src/__tests__/setup.ts +0 -43
- package/src/__tests__/ui/hooks/authfetch-integration.test.ts +0 -197
- package/src/__tests__/ui/hooks/backward-compatibility.test.ts +0 -159
- package/src/__tests__/ui/hooks/real-world-scenarios.test.ts +0 -224
- package/src/__tests__/ui/hooks/url-resolution.test.ts +0 -129
- package/src/__tests__/ui/hooks/useAuthFetch-separation.test.ts +0 -69
- package/src/__tests__/ui/hooks/useAuthFetch.test.ts +0 -70
- package/src/__tests__/ui/hooks/useOxyFollow.test.tsx +0 -92
- package/src/__tests__/ui/screens/AccountSettingsScreen.test.tsx +0 -112
- package/src/__tests__/ui/store/setupOxyStore.test.ts +0 -50
- package/src/__tests__/validate-structure.js +0 -91
- package/src/__tests__/validation.js +0 -42
- package/src/types/react-redux.d.ts +0 -5
- package/src/ui/components/bottomSheet/index.tsx +0 -14
- package/src/ui/hooks/useAuthFetch.ts +0 -238
- package/src/ui/hooks/useOxyFollow.ts +0 -188
- package/src/ui/screens/BillingManagementScreen.tsx +0 -589
- package/src/ui/store/index.ts +0 -36
- package/src/ui/store/setupOxyStore.ts +0 -58
- package/src/ui/store/slices/authSlice.ts +0 -43
- package/src/ui/store/slices/followSlice.ts +0 -207
- package/src/ui/store/slices/index.ts +0 -31
- package/src/ui/store/slices/types.ts +0 -33
- package/src/ui/styles/shadows.ts +0 -112
- package/src/utils/polyfills.ts +0 -34
|
@@ -16,13 +16,16 @@ import {
|
|
|
16
16
|
import { BaseScreenProps } from '../navigation/types';
|
|
17
17
|
import { useOxy } from '../context/OxyContext';
|
|
18
18
|
import { useThemeColors, createCommonStyles } from '../styles';
|
|
19
|
-
import { BottomSheetScrollView } from '../components/bottomSheet';
|
|
20
19
|
import { Ionicons } from '@expo/vector-icons';
|
|
21
20
|
import Svg, { Path, Circle } from 'react-native-svg';
|
|
22
21
|
import { toast } from '../../lib/sonner';
|
|
23
22
|
import HighFive from '../../assets/illustrations/HighFive';
|
|
24
23
|
import GroupedPillButtons from '../components/internal/GroupedPillButtons';
|
|
25
24
|
import TextField from '../components/internal/TextField';
|
|
25
|
+
import SignUpIdentityStep from './internal/SignUpIdentityStep';
|
|
26
|
+
import SignUpSecurityStep from './internal/SignUpSecurityStep';
|
|
27
|
+
import SignUpSummaryStep from './internal/SignUpSummaryStep';
|
|
28
|
+
import SignUpWelcomeStep from './internal/SignUpWelcomeStep';
|
|
26
29
|
|
|
27
30
|
// Types for better type safety
|
|
28
31
|
interface FormData {
|
|
@@ -75,9 +78,9 @@ const createStyles = (colors: any, theme: string) => StyleSheet.create({
|
|
|
75
78
|
modernTitle: {
|
|
76
79
|
fontFamily: Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
|
|
77
80
|
fontWeight: Platform.OS === 'web' ? 'bold' : undefined,
|
|
78
|
-
fontSize:
|
|
81
|
+
fontSize: 62,
|
|
79
82
|
lineHeight: 48,
|
|
80
|
-
marginBottom:
|
|
83
|
+
marginBottom: 18,
|
|
81
84
|
textAlign: 'left',
|
|
82
85
|
letterSpacing: -1,
|
|
83
86
|
},
|
|
@@ -158,6 +161,17 @@ const createStyles = (colors: any, theme: string) => StyleSheet.create({
|
|
|
158
161
|
marginTop: 8,
|
|
159
162
|
gap: 8,
|
|
160
163
|
},
|
|
164
|
+
belowInputMessage: {
|
|
165
|
+
flexDirection: 'row',
|
|
166
|
+
alignItems: 'center',
|
|
167
|
+
marginTop: 4,
|
|
168
|
+
marginBottom: 0,
|
|
169
|
+
gap: 6,
|
|
170
|
+
},
|
|
171
|
+
belowInputText: {
|
|
172
|
+
fontSize: 13,
|
|
173
|
+
fontWeight: '500',
|
|
174
|
+
},
|
|
161
175
|
validationIconContainer: {
|
|
162
176
|
width: 32,
|
|
163
177
|
height: 32,
|
|
@@ -193,15 +207,19 @@ const createStyles = (colors: any, theme: string) => StyleSheet.create({
|
|
|
193
207
|
paddingHorizontal: 32,
|
|
194
208
|
borderRadius: 16,
|
|
195
209
|
marginVertical: 8,
|
|
196
|
-
shadowOffset: {
|
|
197
|
-
width: 0,
|
|
198
|
-
height: 4,
|
|
199
|
-
},
|
|
200
|
-
shadowOpacity: 0.3,
|
|
201
|
-
shadowRadius: 8,
|
|
202
|
-
elevation: 6,
|
|
203
210
|
gap: 8,
|
|
204
211
|
width: '100%',
|
|
212
|
+
...Platform.select({
|
|
213
|
+
web: {
|
|
214
|
+
boxShadow: '0 4px 8px rgba(0,0,0,0.3)',
|
|
215
|
+
},
|
|
216
|
+
default: {
|
|
217
|
+
shadowOffset: { width: 0, height: 4 },
|
|
218
|
+
shadowOpacity: 0.3,
|
|
219
|
+
shadowRadius: 8,
|
|
220
|
+
elevation: 6,
|
|
221
|
+
}
|
|
222
|
+
}),
|
|
205
223
|
},
|
|
206
224
|
buttonText: {
|
|
207
225
|
color: '#FFFFFF',
|
|
@@ -228,11 +246,18 @@ const createStyles = (colors: any, theme: string) => StyleSheet.create({
|
|
|
228
246
|
marginVertical: 20,
|
|
229
247
|
borderRadius: 24,
|
|
230
248
|
alignItems: 'center',
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
249
|
+
...Platform.select({
|
|
250
|
+
web: {
|
|
251
|
+
boxShadow: '0 1px 4px rgba(0,0,0,0.04)',
|
|
252
|
+
},
|
|
253
|
+
default: {
|
|
254
|
+
shadowColor: '#000',
|
|
255
|
+
shadowOpacity: 0.04,
|
|
256
|
+
shadowOffset: { width: 0, height: 1 },
|
|
257
|
+
shadowRadius: 4,
|
|
258
|
+
elevation: 1,
|
|
259
|
+
}
|
|
260
|
+
}),
|
|
236
261
|
},
|
|
237
262
|
userInfoText: {
|
|
238
263
|
fontSize: 16,
|
|
@@ -258,13 +283,17 @@ const createStyles = (colors: any, theme: string) => StyleSheet.create({
|
|
|
258
283
|
gap: 6,
|
|
259
284
|
minWidth: 70,
|
|
260
285
|
borderWidth: 1,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
286
|
+
...Platform.select({
|
|
287
|
+
web: {
|
|
288
|
+
boxShadow: '0 2px 4px rgba(0,0,0,0.1)',
|
|
289
|
+
},
|
|
290
|
+
default: {
|
|
291
|
+
shadowOffset: { width: 0, height: 2 },
|
|
292
|
+
shadowOpacity: 0.1,
|
|
293
|
+
shadowRadius: 4,
|
|
294
|
+
elevation: 2,
|
|
295
|
+
}
|
|
296
|
+
}),
|
|
268
297
|
},
|
|
269
298
|
backButton: {
|
|
270
299
|
backgroundColor: 'transparent',
|
|
@@ -297,11 +326,18 @@ const createStyles = (colors: any, theme: string) => StyleSheet.create({
|
|
|
297
326
|
marginHorizontal: 6,
|
|
298
327
|
borderWidth: 2,
|
|
299
328
|
borderColor: '#fff',
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
329
|
+
...Platform.select({
|
|
330
|
+
web: {
|
|
331
|
+
boxShadow: '0 1px 2px rgba(0,0,0,0.08)',
|
|
332
|
+
},
|
|
333
|
+
default: {
|
|
334
|
+
shadowColor: colors.primary,
|
|
335
|
+
shadowOpacity: 0.08,
|
|
336
|
+
shadowOffset: { width: 0, height: 1 },
|
|
337
|
+
shadowRadius: 2,
|
|
338
|
+
elevation: 1,
|
|
339
|
+
}
|
|
340
|
+
}),
|
|
305
341
|
},
|
|
306
342
|
summaryContainer: {
|
|
307
343
|
padding: 0,
|
|
@@ -704,271 +740,84 @@ const SignUpScreen: React.FC<BaseScreenProps> = ({
|
|
|
704
740
|
}
|
|
705
741
|
}, [formData, isIdentityStepValid, isSecurityStepValid, signUp, onAuthenticated, resetForm]);
|
|
706
742
|
|
|
707
|
-
//
|
|
708
|
-
const
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
{
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
success={validationState.status === 'valid'}
|
|
773
|
-
/>
|
|
774
|
-
|
|
775
|
-
<ValidationMessage validationState={validationState} colors={colors} styles={styles} />
|
|
776
|
-
|
|
777
|
-
<TextField
|
|
778
|
-
icon="mail-outline"
|
|
779
|
-
label="Email"
|
|
780
|
-
value={formData.email}
|
|
781
|
-
onChangeText={(text) => {
|
|
782
|
-
updateField('email', text);
|
|
783
|
-
}}
|
|
784
|
-
keyboardType="email-address"
|
|
785
|
-
autoCapitalize="none"
|
|
786
|
-
autoCorrect={false}
|
|
787
|
-
testID="email-input"
|
|
788
|
-
colors={colors}
|
|
789
|
-
variant="filled"
|
|
790
|
-
error={formData.email && !validateEmail(formData.email) ? 'Please enter a valid email address' : undefined}
|
|
791
|
-
/>
|
|
792
|
-
|
|
793
|
-
<GroupedPillButtons
|
|
794
|
-
buttons={[
|
|
795
|
-
{
|
|
796
|
-
text: 'Back',
|
|
797
|
-
onPress: prevStep,
|
|
798
|
-
icon: 'arrow-back',
|
|
799
|
-
variant: 'transparent',
|
|
800
|
-
},
|
|
801
|
-
{
|
|
802
|
-
text: 'Next',
|
|
803
|
-
onPress: handleIdentityNext,
|
|
804
|
-
icon: 'arrow-forward',
|
|
805
|
-
variant: 'primary',
|
|
806
|
-
},
|
|
807
|
-
]}
|
|
808
|
-
colors={colors}
|
|
809
|
-
/>
|
|
810
|
-
</Animated.View>
|
|
811
|
-
), [fadeAnim, slideAnim, colors, formData, validationState, updateField, setErrorMessage, prevStep, handleIdentityNext, styles]);
|
|
812
|
-
|
|
813
|
-
const renderSecurityStep = useCallback(() => (
|
|
814
|
-
<Animated.View style={[
|
|
815
|
-
styles.stepContainer,
|
|
816
|
-
{ opacity: fadeAnim, transform: [{ translateX: slideAnim }] }
|
|
817
|
-
]}>
|
|
818
|
-
<View style={styles.modernHeader}>
|
|
819
|
-
<Text style={[styles.stepTitle, { color: colors.text }]}>Secure your account</Text>
|
|
820
|
-
</View>
|
|
821
|
-
|
|
822
|
-
<TextField
|
|
823
|
-
icon="lock-closed-outline"
|
|
824
|
-
label="Password"
|
|
825
|
-
value={formData.password}
|
|
826
|
-
onChangeText={(text) => {
|
|
827
|
-
updateField('password', text);
|
|
828
|
-
}}
|
|
829
|
-
secureTextEntry={!passwordVisibility.password}
|
|
830
|
-
autoCapitalize="none"
|
|
831
|
-
autoCorrect={false}
|
|
832
|
-
testID="password-input"
|
|
833
|
-
colors={colors}
|
|
834
|
-
variant="filled"
|
|
835
|
-
error={formData.password && !validatePassword(formData.password) ? `Password must be at least ${PASSWORD_MIN_LENGTH} characters` : undefined}
|
|
836
|
-
/>
|
|
743
|
+
// Memoized step components
|
|
744
|
+
const updateFieldString = (field: string, value: string) => updateField(field as keyof FormData, value);
|
|
745
|
+
const validatePasswordsMatchNoArgs = () => validatePasswordsMatch(formData.password, formData.confirmPassword);
|
|
746
|
+
const togglePasswordVisibilityNoArgs = () => togglePasswordVisibility('password');
|
|
747
|
+
|
|
748
|
+
const renderWelcomeStep = useMemo(() => (
|
|
749
|
+
<SignUpWelcomeStep
|
|
750
|
+
styles={styles}
|
|
751
|
+
fadeAnim={fadeAnim}
|
|
752
|
+
slideAnim={slideAnim}
|
|
753
|
+
colors={colors}
|
|
754
|
+
nextStep={nextStep}
|
|
755
|
+
navigate={navigate}
|
|
756
|
+
/>
|
|
757
|
+
), [styles, fadeAnim, slideAnim, colors, nextStep, navigate]);
|
|
758
|
+
|
|
759
|
+
const renderIdentityStep = useMemo(() => (
|
|
760
|
+
<SignUpIdentityStep
|
|
761
|
+
styles={styles}
|
|
762
|
+
fadeAnim={fadeAnim}
|
|
763
|
+
slideAnim={slideAnim}
|
|
764
|
+
colors={colors}
|
|
765
|
+
formData={formData}
|
|
766
|
+
validationState={validationState}
|
|
767
|
+
updateField={updateFieldString}
|
|
768
|
+
setErrorMessage={setErrorMessage}
|
|
769
|
+
prevStep={prevStep}
|
|
770
|
+
handleIdentityNext={handleIdentityNext}
|
|
771
|
+
ValidationMessage={ValidationMessage}
|
|
772
|
+
validateEmail={validateEmail}
|
|
773
|
+
navigate={navigate}
|
|
774
|
+
/>
|
|
775
|
+
), [styles, fadeAnim, slideAnim, colors, formData, validationState, updateFieldString, setErrorMessage, prevStep, handleIdentityNext, ValidationMessage, validateEmail, navigate]);
|
|
776
|
+
|
|
777
|
+
const renderSecurityStep = useMemo(() => (
|
|
778
|
+
<SignUpSecurityStep
|
|
779
|
+
styles={styles}
|
|
780
|
+
fadeAnim={fadeAnim}
|
|
781
|
+
slideAnim={slideAnim}
|
|
782
|
+
colors={colors}
|
|
783
|
+
formData={formData}
|
|
784
|
+
passwordVisibility={passwordVisibility}
|
|
785
|
+
updateField={updateFieldString}
|
|
786
|
+
validatePassword={validatePassword}
|
|
787
|
+
validatePasswordsMatch={validatePasswordsMatchNoArgs}
|
|
788
|
+
prevStep={prevStep}
|
|
789
|
+
handleSecurityNext={handleSecurityNext}
|
|
790
|
+
setErrorMessage={setErrorMessage}
|
|
791
|
+
togglePasswordVisibility={togglePasswordVisibilityNoArgs}
|
|
792
|
+
PASSWORD_MIN_LENGTH={PASSWORD_MIN_LENGTH}
|
|
793
|
+
/>
|
|
794
|
+
), [styles, fadeAnim, slideAnim, colors, formData, passwordVisibility, updateFieldString, validatePassword, validatePasswordsMatchNoArgs, prevStep, handleSecurityNext, setErrorMessage, togglePasswordVisibilityNoArgs, PASSWORD_MIN_LENGTH]);
|
|
795
|
+
|
|
796
|
+
const renderSummaryStep = useMemo(() => (
|
|
797
|
+
<SignUpSummaryStep
|
|
798
|
+
styles={styles}
|
|
799
|
+
fadeAnim={fadeAnim}
|
|
800
|
+
slideAnim={slideAnim}
|
|
801
|
+
colors={colors}
|
|
802
|
+
formData={formData}
|
|
803
|
+
isLoading={isLoading}
|
|
804
|
+
handleSignUp={handleSignUp}
|
|
805
|
+
prevStep={prevStep}
|
|
806
|
+
/>
|
|
807
|
+
), [styles, fadeAnim, slideAnim, colors, formData, isLoading, handleSignUp, prevStep]);
|
|
837
808
|
|
|
838
|
-
<Text style={[styles.passwordHint, { color: colors.secondaryText }]}>Password must be at least {PASSWORD_MIN_LENGTH} characters long</Text>
|
|
839
|
-
|
|
840
|
-
<TextField
|
|
841
|
-
icon="lock-closed-outline"
|
|
842
|
-
label="Confirm Password"
|
|
843
|
-
value={formData.confirmPassword}
|
|
844
|
-
onChangeText={(text) => {
|
|
845
|
-
updateField('confirmPassword', text);
|
|
846
|
-
}}
|
|
847
|
-
secureTextEntry={!passwordVisibility.confirmPassword}
|
|
848
|
-
autoCapitalize="none"
|
|
849
|
-
autoCorrect={false}
|
|
850
|
-
testID="confirm-password-input"
|
|
851
|
-
colors={colors}
|
|
852
|
-
variant="filled"
|
|
853
|
-
error={formData.confirmPassword && !validatePasswordsMatch(formData.password, formData.confirmPassword) ? 'Passwords do not match' : undefined}
|
|
854
|
-
/>
|
|
855
|
-
|
|
856
|
-
<GroupedPillButtons
|
|
857
|
-
buttons={[
|
|
858
|
-
{
|
|
859
|
-
text: 'Back',
|
|
860
|
-
onPress: prevStep,
|
|
861
|
-
icon: 'arrow-back',
|
|
862
|
-
variant: 'transparent',
|
|
863
|
-
},
|
|
864
|
-
{
|
|
865
|
-
text: 'Next',
|
|
866
|
-
onPress: handleSecurityNext,
|
|
867
|
-
icon: 'arrow-forward',
|
|
868
|
-
variant: 'primary',
|
|
869
|
-
},
|
|
870
|
-
]}
|
|
871
|
-
colors={colors}
|
|
872
|
-
/>
|
|
873
|
-
</Animated.View>
|
|
874
|
-
), [fadeAnim, slideAnim, colors, formData, passwordVisibility, updateField, setErrorMessage, togglePasswordVisibility, prevStep, handleSecurityNext, styles]);
|
|
875
|
-
|
|
876
|
-
const renderSummaryStep = useCallback(() => (
|
|
877
|
-
<Animated.View style={[
|
|
878
|
-
styles.stepContainer,
|
|
879
|
-
{ opacity: fadeAnim, transform: [{ translateX: slideAnim }] }
|
|
880
|
-
]}>
|
|
881
|
-
<View style={styles.modernHeader}>
|
|
882
|
-
<Text style={[styles.stepTitle, { color: colors.text }]}>Ready to join</Text>
|
|
883
|
-
</View>
|
|
884
|
-
|
|
885
|
-
<View style={styles.summaryContainer}>
|
|
886
|
-
<View style={styles.summaryRow}>
|
|
887
|
-
<Text style={[styles.summaryLabel, { color: colors.secondaryText }]}>Username:</Text>
|
|
888
|
-
<Text style={[styles.summaryValue, { color: colors.text }]}>{formData.username}</Text>
|
|
889
|
-
</View>
|
|
890
|
-
|
|
891
|
-
<View style={styles.summaryRow}>
|
|
892
|
-
<Text style={[styles.summaryLabel, { color: colors.secondaryText }]}>Email:</Text>
|
|
893
|
-
<Text style={[styles.summaryValue, { color: colors.text }]}>{formData.email}</Text>
|
|
894
|
-
</View>
|
|
895
|
-
</View>
|
|
896
|
-
|
|
897
|
-
<GroupedPillButtons
|
|
898
|
-
buttons={[
|
|
899
|
-
{
|
|
900
|
-
text: 'Back',
|
|
901
|
-
onPress: prevStep,
|
|
902
|
-
icon: 'arrow-back',
|
|
903
|
-
variant: 'transparent',
|
|
904
|
-
},
|
|
905
|
-
{
|
|
906
|
-
text: 'Create Account',
|
|
907
|
-
onPress: handleSignUp,
|
|
908
|
-
icon: 'checkmark',
|
|
909
|
-
variant: 'primary',
|
|
910
|
-
disabled: isLoading,
|
|
911
|
-
loading: isLoading,
|
|
912
|
-
testID: 'signup-button',
|
|
913
|
-
},
|
|
914
|
-
]}
|
|
915
|
-
colors={colors}
|
|
916
|
-
/>
|
|
917
|
-
</Animated.View>
|
|
918
|
-
), [fadeAnim, slideAnim, colors, formData, isLoading, handleSignUp, prevStep, styles]);
|
|
919
|
-
|
|
920
|
-
// If user is already authenticated, show user info
|
|
921
|
-
if (user && isAuthenticated) {
|
|
922
|
-
return (
|
|
923
|
-
<KeyboardAvoidingView
|
|
924
|
-
style={[styles.container, { backgroundColor: colors.background }]}
|
|
925
|
-
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
926
|
-
>
|
|
927
|
-
<StatusBar
|
|
928
|
-
barStyle={theme === 'dark' ? 'light-content' : 'dark-content'}
|
|
929
|
-
backgroundColor={colors.background}
|
|
930
|
-
/>
|
|
931
|
-
|
|
932
|
-
<ScrollView
|
|
933
|
-
contentContainerStyle={styles.scrollContent}
|
|
934
|
-
showsVerticalScrollIndicator={false}
|
|
935
|
-
>
|
|
936
|
-
<Text style={[styles.welcomeTitle, { color: colors.text }]}>
|
|
937
|
-
Welcome, {user.username}!
|
|
938
|
-
</Text>
|
|
939
|
-
|
|
940
|
-
<View style={[styles.userInfoContainer, { backgroundColor: colors.inputBackground }]}>
|
|
941
|
-
<Text style={[styles.userInfoText, { color: colors.text }]}>
|
|
942
|
-
You are already signed in.
|
|
943
|
-
</Text>
|
|
944
|
-
{user.email && (
|
|
945
|
-
<Text style={[styles.userInfoText, { color: colors.secondaryText }]}>
|
|
946
|
-
Email: {user.email}
|
|
947
|
-
</Text>
|
|
948
|
-
)}
|
|
949
|
-
</View>
|
|
950
|
-
|
|
951
|
-
<View style={styles.actionButtonsContainer}>
|
|
952
|
-
<TouchableOpacity
|
|
953
|
-
style={[styles.button, { backgroundColor: colors.primary }]}
|
|
954
|
-
onPress={() => navigate('AccountCenter')}
|
|
955
|
-
>
|
|
956
|
-
<Text style={styles.buttonText}>Go to Account Center</Text>
|
|
957
|
-
</TouchableOpacity>
|
|
958
|
-
</View>
|
|
959
|
-
</ScrollView>
|
|
960
|
-
</KeyboardAvoidingView>
|
|
961
|
-
);
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
// Render current step
|
|
965
809
|
const renderCurrentStep = useCallback(() => {
|
|
966
810
|
switch (currentStep) {
|
|
967
|
-
case 0:
|
|
968
|
-
|
|
969
|
-
case
|
|
970
|
-
|
|
971
|
-
|
|
811
|
+
case 0:
|
|
812
|
+
return renderWelcomeStep;
|
|
813
|
+
case 1:
|
|
814
|
+
return renderIdentityStep;
|
|
815
|
+
case 2:
|
|
816
|
+
return renderSecurityStep;
|
|
817
|
+
case 3:
|
|
818
|
+
return renderSummaryStep;
|
|
819
|
+
default:
|
|
820
|
+
return renderWelcomeStep;
|
|
972
821
|
}
|
|
973
822
|
}, [currentStep, renderWelcomeStep, renderIdentityStep, renderSecurityStep, renderSummaryStep]);
|
|
974
823
|
|
|
@@ -981,13 +830,11 @@ const SignUpScreen: React.FC<BaseScreenProps> = ({
|
|
|
981
830
|
barStyle={theme === 'dark' ? 'light-content' : 'dark-content'}
|
|
982
831
|
backgroundColor={colors.background}
|
|
983
832
|
/>
|
|
984
|
-
|
|
985
833
|
<ScrollView
|
|
986
834
|
contentContainerStyle={styles.scrollContent}
|
|
987
835
|
showsVerticalScrollIndicator={false}
|
|
988
836
|
keyboardShouldPersistTaps="handled"
|
|
989
837
|
>
|
|
990
|
-
<ProgressIndicator currentStep={currentStep} totalSteps={4} colors={colors} styles={styles} />
|
|
991
838
|
{renderCurrentStep()}
|
|
992
839
|
</ScrollView>
|
|
993
840
|
</KeyboardAvoidingView>
|