@oxyhq/services 5.5.8 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +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 +26 -23
- 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 +6 -14
- 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 +31 -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 +26 -23
- 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 +7 -15
- 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 +27 -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/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 -1
- 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 +14 -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/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 +26 -26
- 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 +7 -22
- 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 +24 -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 -216
- 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 -211
- 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/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
|
@@ -15,6 +15,7 @@ import { BaseScreenProps } from '../navigation/types';
|
|
|
15
15
|
import { useOxy } from '../context/OxyContext';
|
|
16
16
|
import { fontFamilies } from '../styles/fonts';
|
|
17
17
|
import { toast } from '../../lib/sonner';
|
|
18
|
+
import { confirmAction } from '../utils/confirmAction';
|
|
18
19
|
import { Ionicons } from '@expo/vector-icons';
|
|
19
20
|
import Avatar from '../components/Avatar';
|
|
20
21
|
|
|
@@ -307,35 +308,35 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
307
308
|
const detectCurrentApp = () => {
|
|
308
309
|
// In a real implementation, this would detect the actual app package name
|
|
309
310
|
// For now, we'll use a mock detection based on available methods
|
|
310
|
-
|
|
311
|
+
|
|
311
312
|
// Real app detection methods you could use:
|
|
312
313
|
// 1. Check bundle identifier in React Native:
|
|
313
314
|
// import DeviceInfo from 'react-native-device-info';
|
|
314
315
|
// const bundleId = DeviceInfo.getBundleId();
|
|
315
316
|
// Example: com.oxy.mention -> 'mention'
|
|
316
|
-
|
|
317
|
+
|
|
317
318
|
// 2. Environment variables or build configuration
|
|
318
319
|
// const appPackage = __DEV__ ? process.env.APP_PACKAGE : 'mention';
|
|
319
|
-
|
|
320
|
+
|
|
320
321
|
// 3. Check specific app capabilities or modules
|
|
321
322
|
// if (typeof MentionModule !== 'undefined') return 'mention';
|
|
322
323
|
// if (typeof OxyWorkspaceModule !== 'undefined') return 'oxy-workspace';
|
|
323
|
-
|
|
324
|
+
|
|
324
325
|
// 4. Use build-time configuration with Metro or similar
|
|
325
326
|
// const appPackage = require('../config/app.json').packageName;
|
|
326
|
-
|
|
327
|
+
|
|
327
328
|
// For demo purposes, we'll simulate different apps
|
|
328
329
|
// You would replace this with actual app detection logic
|
|
329
|
-
|
|
330
|
+
|
|
330
331
|
// IMPORTANT: This ensures subscription restrictions work properly:
|
|
331
332
|
// - Mention+ plan can only be subscribed to when app package == 'mention'
|
|
332
333
|
// - Other app-specific plans follow the same pattern
|
|
333
334
|
// - Ecosystem plans work across all apps
|
|
334
|
-
|
|
335
|
+
|
|
335
336
|
const detectedApp = 'mention'; // This would be dynamic in real implementation
|
|
336
|
-
|
|
337
|
+
|
|
337
338
|
setCurrentAppPackage(detectedApp);
|
|
338
|
-
|
|
339
|
+
|
|
339
340
|
// Log for debugging
|
|
340
341
|
console.log('Detected app package:', detectedApp);
|
|
341
342
|
console.log('Available plans for this app will be filtered accordingly');
|
|
@@ -344,13 +345,13 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
344
345
|
const loadSubscriptionData = async () => {
|
|
345
346
|
try {
|
|
346
347
|
setLoading(true);
|
|
347
|
-
|
|
348
|
+
|
|
348
349
|
// Filter plans available for current app
|
|
349
|
-
const availablePlans = mockPlans.filter(plan =>
|
|
350
|
+
const availablePlans = mockPlans.filter(plan =>
|
|
350
351
|
plan.applicableApps.includes(currentAppPackage)
|
|
351
352
|
);
|
|
352
353
|
setPlans(availablePlans);
|
|
353
|
-
|
|
354
|
+
|
|
354
355
|
// Mock current subscription
|
|
355
356
|
let currentSubscription: UserSubscription | null = null;
|
|
356
357
|
if (user?.isPremium) {
|
|
@@ -364,25 +365,25 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
364
365
|
};
|
|
365
366
|
setSubscription(currentSubscription);
|
|
366
367
|
}
|
|
367
|
-
|
|
368
|
+
|
|
368
369
|
// Filter features available for current app and update based on current subscription
|
|
369
|
-
const availableFeatures = mockIndividualFeatures.filter(feature =>
|
|
370
|
+
const availableFeatures = mockIndividualFeatures.filter(feature =>
|
|
370
371
|
feature.applicableApps.includes(currentAppPackage)
|
|
371
372
|
);
|
|
372
|
-
|
|
373
|
+
|
|
373
374
|
const updatedFeatures = availableFeatures.map(feature => {
|
|
374
|
-
const isIncludedInCurrentPlan = !!(currentSubscription &&
|
|
375
|
+
const isIncludedInCurrentPlan = !!(currentSubscription &&
|
|
375
376
|
feature.includedInPlans.includes(currentSubscription.planId));
|
|
376
|
-
|
|
377
|
+
|
|
377
378
|
return {
|
|
378
379
|
...feature,
|
|
379
380
|
isIncludedInCurrentPlan,
|
|
380
381
|
isSubscribed: isIncludedInCurrentPlan ? true : false // Mock some individual subscriptions
|
|
381
382
|
};
|
|
382
383
|
});
|
|
383
|
-
|
|
384
|
+
|
|
384
385
|
setIndividualFeatures(updatedFeatures);
|
|
385
|
-
|
|
386
|
+
|
|
386
387
|
} catch (error) {
|
|
387
388
|
console.error('Failed to load subscription data:', error);
|
|
388
389
|
toast.error('Failed to load subscription information');
|
|
@@ -404,23 +405,23 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
404
405
|
toast.error(`This plan is not available for the current app (${currentAppPackage})`);
|
|
405
406
|
return;
|
|
406
407
|
}
|
|
407
|
-
|
|
408
|
+
|
|
408
409
|
// Special restriction for Mention+ plan - only available in mention app
|
|
409
410
|
if (planId === 'mention-plus' && currentAppPackage !== 'mention') {
|
|
410
411
|
console.log(`❌ Subscription blocked: Mention+ plan requires app to be "mention", current app is "${currentAppPackage}"`);
|
|
411
412
|
toast.error('Mention+ is only available in the Mention app');
|
|
412
413
|
return;
|
|
413
414
|
}
|
|
414
|
-
|
|
415
|
+
|
|
415
416
|
console.log(`✅ Subscription allowed: Plan "${selectedPlan.name}" is available for app "${currentAppPackage}"`);
|
|
416
|
-
|
|
417
|
+
|
|
417
418
|
setProcessingPayment(true);
|
|
418
|
-
|
|
419
|
+
|
|
419
420
|
// Mock payment processing
|
|
420
421
|
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
421
|
-
|
|
422
|
+
|
|
422
423
|
toast.success('Subscription activated successfully!');
|
|
423
|
-
|
|
424
|
+
|
|
424
425
|
// Mock subscription update
|
|
425
426
|
setSubscription({
|
|
426
427
|
id: 'sub_' + Date.now(),
|
|
@@ -430,10 +431,10 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
430
431
|
currentPeriodEnd: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toISOString(),
|
|
431
432
|
cancelAtPeriodEnd: false
|
|
432
433
|
});
|
|
433
|
-
|
|
434
|
+
|
|
434
435
|
// Reload data to update feature states
|
|
435
436
|
loadSubscriptionData();
|
|
436
|
-
|
|
437
|
+
|
|
437
438
|
} catch (error) {
|
|
438
439
|
console.error('Payment failed:', error);
|
|
439
440
|
toast.error('Payment failed. Please try again.');
|
|
@@ -443,28 +444,20 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
443
444
|
};
|
|
444
445
|
|
|
445
446
|
const handleCancelSubscription = () => {
|
|
446
|
-
|
|
447
|
-
'Cancel Subscription',
|
|
447
|
+
confirmAction(
|
|
448
448
|
'Are you sure you want to cancel your subscription? You will lose access to premium features at the end of your current billing period.',
|
|
449
|
-
|
|
450
|
-
{
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
cancelAtPeriodEnd: true
|
|
460
|
-
} : null);
|
|
461
|
-
toast.success('Subscription will be canceled at the end of the billing period');
|
|
462
|
-
} catch (error) {
|
|
463
|
-
toast.error('Failed to cancel subscription');
|
|
464
|
-
}
|
|
465
|
-
}
|
|
449
|
+
async () => {
|
|
450
|
+
try {
|
|
451
|
+
// Mock cancellation
|
|
452
|
+
setSubscription(prev => prev ? {
|
|
453
|
+
...prev,
|
|
454
|
+
cancelAtPeriodEnd: true
|
|
455
|
+
} : null);
|
|
456
|
+
toast.success('Subscription will be canceled at the end of the billing period');
|
|
457
|
+
} catch (error) {
|
|
458
|
+
toast.error('Failed to cancel subscription');
|
|
466
459
|
}
|
|
467
|
-
|
|
460
|
+
}
|
|
468
461
|
);
|
|
469
462
|
};
|
|
470
463
|
|
|
@@ -483,7 +476,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
483
476
|
const formatPrice = (price: number, currency: string, interval: string) => {
|
|
484
477
|
const yearlyPrice = interval === 'year' ? price : price * 12 * 0.8; // 20% discount for yearly
|
|
485
478
|
const displayPrice = billingInterval === 'year' ? yearlyPrice : price;
|
|
486
|
-
|
|
479
|
+
|
|
487
480
|
return {
|
|
488
481
|
price: displayPrice,
|
|
489
482
|
formatted: `$${displayPrice.toFixed(2)}`,
|
|
@@ -504,35 +497,35 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
504
497
|
toast.error(`This feature is not available for the current app (${currentAppPackage})`);
|
|
505
498
|
return;
|
|
506
499
|
}
|
|
507
|
-
|
|
500
|
+
|
|
508
501
|
// Special restrictions for app-specific features
|
|
509
502
|
if (selectedFeature.appScope === 'specific') {
|
|
510
503
|
// For features that are only available in specific apps, enforce strict matching
|
|
511
|
-
const hasExactMatch = selectedFeature.applicableApps.length === 1 &&
|
|
512
|
-
|
|
504
|
+
const hasExactMatch = selectedFeature.applicableApps.length === 1 &&
|
|
505
|
+
selectedFeature.applicableApps[0] === currentAppPackage;
|
|
513
506
|
if (!hasExactMatch && selectedFeature.applicableApps.length === 1) {
|
|
514
507
|
const requiredApp = selectedFeature.applicableApps[0];
|
|
515
508
|
toast.error(`${selectedFeature.name} is only available in the ${requiredApp} app`);
|
|
516
509
|
return;
|
|
517
510
|
}
|
|
518
511
|
}
|
|
519
|
-
|
|
512
|
+
|
|
520
513
|
setProcessingPayment(true);
|
|
521
|
-
|
|
514
|
+
|
|
522
515
|
// Mock feature subscription
|
|
523
516
|
await new Promise(resolve => setTimeout(resolve, 1500));
|
|
524
|
-
|
|
525
|
-
setIndividualFeatures(prev =>
|
|
526
|
-
prev.map(feature =>
|
|
527
|
-
feature.id === featureId
|
|
517
|
+
|
|
518
|
+
setIndividualFeatures(prev =>
|
|
519
|
+
prev.map(feature =>
|
|
520
|
+
feature.id === featureId
|
|
528
521
|
? { ...feature, isSubscribed: true }
|
|
529
522
|
: feature
|
|
530
523
|
)
|
|
531
524
|
);
|
|
532
|
-
|
|
525
|
+
|
|
533
526
|
const feature = individualFeatures.find(f => f.id === featureId);
|
|
534
527
|
toast.success(`Subscribed to ${feature?.name} successfully!`);
|
|
535
|
-
|
|
528
|
+
|
|
536
529
|
} catch (error) {
|
|
537
530
|
console.error('Feature subscription failed:', error);
|
|
538
531
|
toast.error('Feature subscription failed. Please try again.');
|
|
@@ -543,30 +536,22 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
543
536
|
|
|
544
537
|
const handleFeatureUnsubscribe = async (featureId: string) => {
|
|
545
538
|
const feature = individualFeatures.find(f => f.id === featureId);
|
|
546
|
-
|
|
547
|
-
'Unsubscribe Feature',
|
|
539
|
+
confirmAction(
|
|
548
540
|
`Are you sure you want to unsubscribe from ${feature?.name}?`,
|
|
549
|
-
|
|
550
|
-
{
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
)
|
|
562
|
-
);
|
|
563
|
-
toast.success(`Unsubscribed from ${feature?.name}`);
|
|
564
|
-
} catch (error) {
|
|
565
|
-
toast.error('Failed to unsubscribe from feature');
|
|
566
|
-
}
|
|
567
|
-
}
|
|
541
|
+
async () => {
|
|
542
|
+
try {
|
|
543
|
+
setIndividualFeatures(prev =>
|
|
544
|
+
prev.map(f =>
|
|
545
|
+
f.id === featureId
|
|
546
|
+
? { ...f, isSubscribed: false }
|
|
547
|
+
: f
|
|
548
|
+
)
|
|
549
|
+
);
|
|
550
|
+
toast.success(`Unsubscribed from ${feature?.name}`);
|
|
551
|
+
} catch (error) {
|
|
552
|
+
toast.error('Failed to unsubscribe from feature');
|
|
568
553
|
}
|
|
569
|
-
|
|
554
|
+
}
|
|
570
555
|
);
|
|
571
556
|
};
|
|
572
557
|
|
|
@@ -605,19 +590,19 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
605
590
|
|
|
606
591
|
const renderCurrentSubscription = () => {
|
|
607
592
|
if (!subscription) return null;
|
|
608
|
-
|
|
593
|
+
|
|
609
594
|
const currentPlan = getCurrentPlan();
|
|
610
595
|
if (!currentPlan) return null;
|
|
611
596
|
|
|
612
|
-
const statusColor =
|
|
597
|
+
const statusColor =
|
|
613
598
|
subscription.status === 'active' ? successColor :
|
|
614
|
-
|
|
615
|
-
|
|
599
|
+
subscription.status === 'trialing' ? warningColor :
|
|
600
|
+
dangerColor;
|
|
616
601
|
|
|
617
602
|
return (
|
|
618
603
|
<View style={styles.section}>
|
|
619
604
|
<Text style={[styles.sectionTitle, { color: textColor }]}>Current Subscription</Text>
|
|
620
|
-
|
|
605
|
+
|
|
621
606
|
<View style={[styles.currentSubscriptionCard, { backgroundColor: secondaryBackgroundColor, borderColor }]}>
|
|
622
607
|
<View style={styles.subscriptionHeader}>
|
|
623
608
|
<View>
|
|
@@ -632,11 +617,11 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
632
617
|
</Text>
|
|
633
618
|
</View>
|
|
634
619
|
</View>
|
|
635
|
-
|
|
620
|
+
|
|
636
621
|
<Text style={[styles.subscriptionDetail, { color: isDarkTheme ? '#BBBBBB' : '#666666' }]}>
|
|
637
622
|
Renews on {new Date(subscription.currentPeriodEnd).toLocaleDateString()}
|
|
638
623
|
</Text>
|
|
639
|
-
|
|
624
|
+
|
|
640
625
|
{subscription.cancelAtPeriodEnd && (
|
|
641
626
|
<View style={styles.cancelNotice}>
|
|
642
627
|
<Ionicons name="warning" size={16} color={warningColor} />
|
|
@@ -645,7 +630,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
645
630
|
</Text>
|
|
646
631
|
</View>
|
|
647
632
|
)}
|
|
648
|
-
|
|
633
|
+
|
|
649
634
|
<View style={styles.subscriptionActions}>
|
|
650
635
|
{subscription.cancelAtPeriodEnd ? (
|
|
651
636
|
<TouchableOpacity
|
|
@@ -662,10 +647,10 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
662
647
|
<Text style={styles.actionButtonText}>Cancel Subscription</Text>
|
|
663
648
|
</TouchableOpacity>
|
|
664
649
|
)}
|
|
665
|
-
|
|
650
|
+
|
|
666
651
|
<TouchableOpacity
|
|
667
652
|
style={[styles.actionButton, styles.secondaryButton, { borderColor }]}
|
|
668
|
-
|
|
653
|
+
|
|
669
654
|
>
|
|
670
655
|
<Text style={[styles.actionButtonText, { color: textColor }]}>Manage Billing</Text>
|
|
671
656
|
</TouchableOpacity>
|
|
@@ -692,7 +677,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
692
677
|
Monthly
|
|
693
678
|
</Text>
|
|
694
679
|
</TouchableOpacity>
|
|
695
|
-
|
|
680
|
+
|
|
696
681
|
<TouchableOpacity
|
|
697
682
|
style={[
|
|
698
683
|
styles.billingOption,
|
|
@@ -708,7 +693,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
708
693
|
</Text>
|
|
709
694
|
</TouchableOpacity>
|
|
710
695
|
</View>
|
|
711
|
-
|
|
696
|
+
|
|
712
697
|
{billingInterval === 'year' && (
|
|
713
698
|
<Text style={[styles.savingsText, { color: successColor }]}>
|
|
714
699
|
💰 Save 20% with yearly billing
|
|
@@ -764,17 +749,17 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
764
749
|
<Text style={styles.popularText}>MOST POPULAR</Text>
|
|
765
750
|
</View>
|
|
766
751
|
)}
|
|
767
|
-
|
|
752
|
+
|
|
768
753
|
{isAppSpecific && (
|
|
769
|
-
<View style={[styles.appSpecificBadge, {
|
|
770
|
-
backgroundColor: isAvailableForCurrentApp ? successColor : warningColor
|
|
754
|
+
<View style={[styles.appSpecificBadge, {
|
|
755
|
+
backgroundColor: isAvailableForCurrentApp ? successColor : warningColor
|
|
771
756
|
}]}>
|
|
772
757
|
<Text style={styles.appSpecificText}>
|
|
773
758
|
{isAvailableForCurrentApp ? 'App Exclusive' : 'Not Available'}
|
|
774
759
|
</Text>
|
|
775
760
|
</View>
|
|
776
761
|
)}
|
|
777
|
-
|
|
762
|
+
|
|
778
763
|
<View style={styles.planHeader}>
|
|
779
764
|
<Text style={[styles.planName, { color: textColor }]}>{plan.name}</Text>
|
|
780
765
|
<Text style={[styles.planDescription, { color: isDarkTheme ? '#BBBBBB' : '#666666' }]}>
|
|
@@ -789,7 +774,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
789
774
|
</Text>
|
|
790
775
|
)}
|
|
791
776
|
</View>
|
|
792
|
-
|
|
777
|
+
|
|
793
778
|
<View style={styles.planPricing}>
|
|
794
779
|
<Text style={[styles.planPrice, { color: textColor }]}>
|
|
795
780
|
{pricing.formatted}
|
|
@@ -798,7 +783,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
798
783
|
per {pricing.interval}
|
|
799
784
|
</Text>
|
|
800
785
|
</View>
|
|
801
|
-
|
|
786
|
+
|
|
802
787
|
<View style={styles.planFeatures}>
|
|
803
788
|
{plan.features.map((feature, index) => (
|
|
804
789
|
<View key={index} style={styles.featureItem}>
|
|
@@ -807,7 +792,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
807
792
|
</View>
|
|
808
793
|
))}
|
|
809
794
|
</View>
|
|
810
|
-
|
|
795
|
+
|
|
811
796
|
{isCurrentPlan ? (
|
|
812
797
|
<View style={[styles.currentPlanButton, { backgroundColor: successColor }]}>
|
|
813
798
|
<Text style={styles.currentPlanText}>Current Plan</Text>
|
|
@@ -860,7 +845,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
860
845
|
Full Plans
|
|
861
846
|
</Text>
|
|
862
847
|
</TouchableOpacity>
|
|
863
|
-
|
|
848
|
+
|
|
864
849
|
<TouchableOpacity
|
|
865
850
|
style={[
|
|
866
851
|
styles.tab,
|
|
@@ -927,10 +912,10 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
927
912
|
>
|
|
928
913
|
<View style={styles.featureHeader}>
|
|
929
914
|
<View style={styles.featureIconContainer}>
|
|
930
|
-
<Ionicons
|
|
931
|
-
name={getCategoryIcon(feature.category) as any}
|
|
932
|
-
size={24}
|
|
933
|
-
color={getCategoryColor(feature.category)}
|
|
915
|
+
<Ionicons
|
|
916
|
+
name={getCategoryIcon(feature.category) as any}
|
|
917
|
+
size={24}
|
|
918
|
+
color={getCategoryColor(feature.category)}
|
|
934
919
|
/>
|
|
935
920
|
</View>
|
|
936
921
|
<View style={styles.featureInfo}>
|
|
@@ -950,7 +935,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
950
935
|
</Text>
|
|
951
936
|
</View>
|
|
952
937
|
</View>
|
|
953
|
-
|
|
938
|
+
|
|
954
939
|
{!isIncludedInCurrentPlan && (
|
|
955
940
|
<View style={styles.featurePricing}>
|
|
956
941
|
<Text style={[styles.featurePrice, { color: textColor }]}>
|
|
@@ -961,7 +946,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
961
946
|
</Text>
|
|
962
947
|
</View>
|
|
963
948
|
)}
|
|
964
|
-
|
|
949
|
+
|
|
965
950
|
{isIncludedInCurrentPlan ? (
|
|
966
951
|
<View style={[styles.includedInPlanButton, { backgroundColor: primaryColor }]}>
|
|
967
952
|
<Ionicons name="checkmark-circle" size={16} color="#FFFFFF" />
|
|
@@ -1005,18 +990,18 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
1005
990
|
|
|
1006
991
|
const renderIndividualFeatures = () => {
|
|
1007
992
|
const categories = ['analytics', 'customization', 'content', 'networking', 'productivity'];
|
|
1008
|
-
|
|
993
|
+
|
|
1009
994
|
return (
|
|
1010
995
|
<View style={styles.section}>
|
|
1011
996
|
<Text style={[styles.sectionTitle, { color: textColor }]}>Individual Features</Text>
|
|
1012
997
|
<Text style={[styles.sectionSubtitle, { color: isDarkTheme ? '#BBBBBB' : '#666666' }]}>
|
|
1013
998
|
Subscribe to specific features you need. Some features are included in subscription plans.
|
|
1014
999
|
</Text>
|
|
1015
|
-
|
|
1000
|
+
|
|
1016
1001
|
{categories.map(category => {
|
|
1017
1002
|
const categoryFeatures = individualFeatures.filter(f => f.category === category);
|
|
1018
1003
|
if (categoryFeatures.length === 0) return null;
|
|
1019
|
-
|
|
1004
|
+
|
|
1020
1005
|
return (
|
|
1021
1006
|
<View key={category} style={styles.categorySection}>
|
|
1022
1007
|
<Text style={[styles.categoryTitle, { color: textColor }]}>
|
|
@@ -1035,9 +1020,9 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
1035
1020
|
|
|
1036
1021
|
const renderAppSwitcher = () => {
|
|
1037
1022
|
if (!showAppSwitcher) return null;
|
|
1038
|
-
|
|
1023
|
+
|
|
1039
1024
|
const testApps = ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator'];
|
|
1040
|
-
|
|
1025
|
+
|
|
1041
1026
|
return (
|
|
1042
1027
|
<View style={[styles.appSwitcher, { backgroundColor: isDarkTheme ? '#333333' : '#F0F0F0', borderColor }]}>
|
|
1043
1028
|
<Text style={[styles.appSwitcherTitle, { color: textColor }]}>
|
|
@@ -1050,7 +1035,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
1050
1035
|
key={app}
|
|
1051
1036
|
style={[
|
|
1052
1037
|
styles.appSwitcherButton,
|
|
1053
|
-
{
|
|
1038
|
+
{
|
|
1054
1039
|
backgroundColor: currentAppPackage === app ? primaryColor : 'transparent',
|
|
1055
1040
|
borderColor: primaryColor,
|
|
1056
1041
|
}
|
|
@@ -1087,10 +1072,10 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
1087
1072
|
<View style={[styles.container, { backgroundColor }]}>
|
|
1088
1073
|
{renderHeader()}
|
|
1089
1074
|
{renderAppSwitcher()}
|
|
1090
|
-
|
|
1075
|
+
|
|
1091
1076
|
<ScrollView style={styles.content} showsVerticalScrollIndicator={false}>
|
|
1092
1077
|
{subscription && renderCurrentSubscription()}
|
|
1093
|
-
|
|
1078
|
+
|
|
1094
1079
|
{!subscription && (
|
|
1095
1080
|
<View style={styles.section}>
|
|
1096
1081
|
<Text style={[styles.sectionTitle, { color: textColor }]}>Choose Your Plan</Text>
|
|
@@ -1099,27 +1084,27 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
1099
1084
|
</Text>
|
|
1100
1085
|
</View>
|
|
1101
1086
|
)}
|
|
1102
|
-
|
|
1087
|
+
|
|
1103
1088
|
{!subscription && renderTabNavigation()}
|
|
1104
|
-
|
|
1089
|
+
|
|
1105
1090
|
{!subscription && activeTab === 'plans' && renderBillingToggle()}
|
|
1106
|
-
|
|
1091
|
+
|
|
1107
1092
|
{activeTab === 'plans' ? (
|
|
1108
1093
|
<View style={styles.section}>
|
|
1109
1094
|
{!subscription && (
|
|
1110
1095
|
<Text style={[styles.sectionTitle, { color: textColor }]}>Available Plans</Text>
|
|
1111
1096
|
)}
|
|
1112
|
-
|
|
1097
|
+
|
|
1113
1098
|
{plans.map(renderPlanCard)}
|
|
1114
1099
|
</View>
|
|
1115
1100
|
) : (
|
|
1116
1101
|
renderIndividualFeatures()
|
|
1117
1102
|
)}
|
|
1118
|
-
|
|
1103
|
+
|
|
1119
1104
|
{/* Features Comparison */}
|
|
1120
1105
|
<View style={styles.section}>
|
|
1121
1106
|
<Text style={[styles.sectionTitle, { color: textColor }]}>Why Go Premium?</Text>
|
|
1122
|
-
|
|
1107
|
+
|
|
1123
1108
|
<View style={[styles.benefitsCard, { backgroundColor: secondaryBackgroundColor, borderColor }]}>
|
|
1124
1109
|
<View style={styles.benefitItem}>
|
|
1125
1110
|
<Ionicons name="flash" size={24} color={primaryColor} />
|
|
@@ -1130,7 +1115,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
1130
1115
|
</Text>
|
|
1131
1116
|
</View>
|
|
1132
1117
|
</View>
|
|
1133
|
-
|
|
1118
|
+
|
|
1134
1119
|
<View style={styles.benefitItem}>
|
|
1135
1120
|
<Ionicons name="shield-checkmark" size={24} color={successColor} />
|
|
1136
1121
|
<View style={styles.benefitContent}>
|
|
@@ -1140,7 +1125,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
1140
1125
|
</Text>
|
|
1141
1126
|
</View>
|
|
1142
1127
|
</View>
|
|
1143
|
-
|
|
1128
|
+
|
|
1144
1129
|
<View style={styles.benefitItem}>
|
|
1145
1130
|
<Ionicons name="headset" size={24} color={warningColor} />
|
|
1146
1131
|
<View style={styles.benefitContent}>
|
|
@@ -1152,7 +1137,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
1152
1137
|
</View>
|
|
1153
1138
|
</View>
|
|
1154
1139
|
</View>
|
|
1155
|
-
|
|
1140
|
+
|
|
1156
1141
|
<View style={styles.bottomSpacing} />
|
|
1157
1142
|
</ScrollView>
|
|
1158
1143
|
</View>
|