@oxyhq/services 11.0.0 → 11.1.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/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/AccountMenu.js +9 -5
- package/lib/commonjs/ui/components/AccountMenu.js.map +1 -1
- package/lib/commonjs/ui/components/AnotherDeviceQR.js +51 -56
- package/lib/commonjs/ui/components/AnotherDeviceQR.js.map +1 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +1 -0
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +18 -5
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +23 -7
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/SignInModal.js +20 -1
- package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +19 -9
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +4 -2
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +153 -19
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +6 -17
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +5 -5
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +38 -38
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +2 -2
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +3 -3
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +16 -12
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +10 -6
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queryClient.js +6 -5
- package/lib/commonjs/ui/hooks/queryClient.js.map +1 -1
- package/lib/commonjs/ui/hooks/useOxyAuthSession.js +40 -2
- package/lib/commonjs/ui/hooks/useOxyAuthSession.js.map +1 -1
- package/lib/commonjs/ui/hooks/useProfileEditing.js +21 -0
- package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +3 -3
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +100 -108
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +227 -273
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AvatarCropScreen.js +10 -4
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +20 -37
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js +89 -201
- package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +80 -208
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +56 -208
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +303 -352
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +20 -20
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +77 -89
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +43 -58
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +67 -90
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +77 -177
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +113 -107
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +55 -114
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/NotificationsScreen.js +67 -85
- package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +71 -135
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +15 -9
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PreferencesScreen.js +65 -83
- package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +378 -1023
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +294 -242
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +192 -305
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +57 -97
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +41 -41
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +17 -24
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +83 -214
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +115 -77
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js +70 -57
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +136 -332
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +47 -137
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +182 -115
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +138 -214
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +54 -92
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/utils/activeAuthuser.js +15 -9
- package/lib/commonjs/ui/utils/activeAuthuser.js.map +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/AccountMenu.js +10 -6
- package/lib/module/ui/components/AccountMenu.js.map +1 -1
- package/lib/module/ui/components/AnotherDeviceQR.js +50 -56
- package/lib/module/ui/components/AnotherDeviceQR.js.map +1 -1
- package/lib/module/ui/components/BottomSheetRouter.js +2 -1
- package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +18 -5
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +23 -7
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/SignInModal.js +20 -1
- package/lib/module/ui/components/SignInModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js +19 -9
- package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js +4 -2
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +154 -20
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +6 -17
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js +5 -5
- package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +38 -38
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js +2 -2
- package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +3 -3
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/usePaymentQueries.js +16 -12
- package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useServicesQueries.js +9 -6
- package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/module/ui/hooks/queryClient.js +6 -5
- package/lib/module/ui/hooks/queryClient.js.map +1 -1
- package/lib/module/ui/hooks/useOxyAuthSession.js +40 -2
- package/lib/module/ui/hooks/useOxyAuthSession.js.map +1 -1
- package/lib/module/ui/hooks/useProfileEditing.js +21 -0
- package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +4 -3
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +101 -109
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +228 -275
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js +10 -4
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +19 -39
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateManagedAccountScreen.js +90 -202
- package/lib/module/ui/screens/CreateManagedAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +77 -205
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +55 -207
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +301 -350
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +20 -20
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +78 -90
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +44 -59
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +68 -91
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +75 -177
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +116 -108
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +52 -112
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/NotificationsScreen.js +68 -86
- package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +69 -134
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +16 -10
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PreferencesScreen.js +66 -84
- package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +366 -1012
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +295 -243
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +189 -302
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +58 -98
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +42 -42
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +18 -25
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +81 -212
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +114 -76
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustAboutScreen.js +69 -57
- package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +135 -332
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustFAQScreen.js +48 -138
- package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +184 -117
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +132 -208
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRulesScreen.js +58 -94
- package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/module/ui/utils/activeAuthuser.js +15 -9
- package/lib/module/ui/utils/activeAuthuser.js.map +1 -1
- package/lib/module/ui/utils/avatarUtils.js +1 -1
- package/lib/module/ui/utils/avatarUtils.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +1 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts +2 -0
- package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AnotherDeviceQR.d.ts +12 -2
- package/lib/typescript/commonjs/ui/components/AnotherDeviceQR.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts +3 -2
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TouchableRipple/TouchableRipple.native.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +34 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +3 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +3 -3
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queryClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useOxyAuthSession.d.ts +22 -0
- package/lib/typescript/commonjs/ui/hooks/useOxyAuthSession.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts +3 -0
- package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts +2 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/CreateManagedAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +1 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AccountMenu.d.ts +2 -0
- package/lib/typescript/module/ui/components/AccountMenu.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AnotherDeviceQR.d.ts +12 -2
- package/lib/typescript/module/ui/components/AnotherDeviceQR.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts +3 -2
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts +1 -1
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts +34 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +3 -0
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +3 -3
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queryClient.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useOxyAuthSession.d.ts +22 -0
- package/lib/typescript/module/ui/hooks/useOxyAuthSession.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts +3 -0
- package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts +2 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/CreateManagedAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/activeAuthuser.d.ts.map +1 -1
- package/lib/typescript/types/expo-haptics.d.ts +42 -0
- package/package.json +8 -3
- package/src/index.ts +1 -0
- package/src/types/expo-haptics.d.ts +42 -0
- package/src/ui/components/AccountMenu.tsx +11 -5
- package/src/ui/components/AnotherDeviceQR.tsx +53 -45
- package/src/ui/components/BottomSheetRouter.tsx +2 -1
- package/src/ui/components/FollowButton.tsx +24 -5
- package/src/ui/components/OxyProvider.tsx +22 -8
- package/src/ui/components/SignInModal.tsx +21 -2
- package/src/ui/components/TouchableRipple/TouchableRipple.native.tsx +1 -1
- package/src/ui/components/fileManagement/FileViewer.tsx +9 -9
- package/src/ui/components/fileManagement/UploadPreview.tsx +2 -2
- package/src/ui/context/OxyContext.tsx +178 -21
- package/src/ui/context/hooks/useAuthOperations.ts +6 -17
- package/src/ui/hooks/mutations/mutationFactory.ts +5 -5
- package/src/ui/hooks/mutations/useAccountMutations.ts +38 -38
- package/src/ui/hooks/mutations/useServicesMutations.ts +2 -2
- package/src/ui/hooks/queries/queryKeys.ts +6 -3
- package/src/ui/hooks/queries/useAccountQueries.ts +1 -1
- package/src/ui/hooks/queries/usePaymentQueries.ts +12 -12
- package/src/ui/hooks/queries/useServicesQueries.ts +9 -6
- package/src/ui/hooks/queryClient.ts +5 -5
- package/src/ui/hooks/useOxyAuthSession.ts +76 -2
- package/src/ui/hooks/useProfileEditing.ts +24 -0
- package/src/ui/hooks/useSessionManagement.ts +9 -6
- package/src/ui/screens/AccountVerificationScreen.tsx +101 -113
- package/src/ui/screens/AppInfoScreen.tsx +200 -238
- package/src/ui/screens/AvatarCropScreen.tsx +17 -4
- package/src/ui/screens/ConnectedAppsScreen.tsx +16 -34
- package/src/ui/screens/CreateManagedAccountScreen.tsx +94 -170
- package/src/ui/screens/EditProfileFieldScreen.tsx +77 -190
- package/src/ui/screens/FAQScreen.tsx +77 -208
- package/src/ui/screens/FeedbackScreen.tsx +330 -239
- package/src/ui/screens/FileManagementScreen.tsx +20 -20
- package/src/ui/screens/HelpSupportScreen.tsx +67 -82
- package/src/ui/screens/HistoryViewScreen.tsx +32 -38
- package/src/ui/screens/LanguageSelectorScreen.tsx +79 -93
- package/src/ui/screens/LearnMoreUsernamesScreen.tsx +81 -164
- package/src/ui/screens/LegalDocumentsScreen.tsx +184 -123
- package/src/ui/screens/ManageAccountScreen.tsx +48 -114
- package/src/ui/screens/NotificationsScreen.tsx +107 -106
- package/src/ui/screens/OxyAuthScreen.tsx +76 -109
- package/src/ui/screens/PaymentGatewayScreen.tsx +16 -7
- package/src/ui/screens/PreferencesScreen.tsx +96 -116
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +419 -872
- package/src/ui/screens/PrivacySettingsScreen.tsx +203 -185
- package/src/ui/screens/ProfileScreen.tsx +158 -200
- package/src/ui/screens/SavesCollectionsScreen.tsx +78 -125
- package/src/ui/screens/SearchSettingsScreen.tsx +52 -41
- package/src/ui/screens/UserLinksScreen.tsx +18 -25
- package/src/ui/screens/UserListScreen.tsx +95 -188
- package/src/ui/screens/WelcomeNewUserScreen.tsx +109 -36
- package/src/ui/screens/trust/TrustAboutScreen.tsx +52 -41
- package/src/ui/screens/trust/TrustCenterScreen.tsx +184 -222
- package/src/ui/screens/trust/TrustFAQScreen.tsx +64 -124
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +190 -67
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +147 -182
- package/src/ui/screens/trust/TrustRulesScreen.tsx +77 -50
- package/src/ui/utils/activeAuthuser.ts +15 -9
- package/src/ui/utils/avatarUtils.ts +1 -1
- package/lib/commonjs/ui/components/feedback/FormInput.js +0 -72
- package/lib/commonjs/ui/components/feedback/FormInput.js.map +0 -1
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js +0 -261
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js.map +0 -1
- package/lib/module/ui/components/feedback/FormInput.js +0 -67
- package/lib/module/ui/components/feedback/FormInput.js.map +0 -1
- package/lib/module/ui/components/feedback/feedbackStyles.js +0 -256
- package/lib/module/ui/components/feedback/feedbackStyles.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/feedback/FormInput.d.ts +0 -20
- package/lib/typescript/commonjs/ui/components/feedback/FormInput.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.d.ts +0 -279
- package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/feedback/FormInput.d.ts +0 -20
- package/lib/typescript/module/ui/components/feedback/FormInput.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/feedback/feedbackStyles.d.ts +0 -279
- package/lib/typescript/module/ui/components/feedback/feedbackStyles.d.ts.map +0 -1
- package/src/ui/components/feedback/FormInput.tsx +0 -84
- package/src/ui/components/feedback/feedbackStyles.ts +0 -246
|
@@ -1,42 +1,88 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useMemo, useState, useEffect } from 'react';
|
|
3
|
-
import { View,
|
|
3
|
+
import { View, StyleSheet, ScrollView } from 'react-native';
|
|
4
4
|
import type { BaseScreenProps } from '../../types/navigation';
|
|
5
5
|
import Header from '../../components/Header';
|
|
6
6
|
import { Ionicons } from '@expo/vector-icons';
|
|
7
|
-
import { useI18n } from '../../hooks/useI18n';
|
|
8
7
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { Colors } from '../../constants/theme';
|
|
8
|
+
import { H1, H4, H5, Text } from '@oxyhq/bloom/typography';
|
|
9
|
+
import { useI18n } from '../../hooks/useI18n';
|
|
12
10
|
import { useOxy } from '../../context/OxyContext';
|
|
13
11
|
import { darkenColor, lightenColor } from '../../utils/colorUtils';
|
|
14
12
|
|
|
13
|
+
type IoniconName = React.ComponentProps<typeof Ionicons>['name'];
|
|
14
|
+
|
|
15
15
|
interface Achievement {
|
|
16
16
|
id: string;
|
|
17
17
|
name: string;
|
|
18
18
|
description: string;
|
|
19
19
|
category: 'milestone' | 'streak' | 'contribution' | 'special';
|
|
20
|
-
icon:
|
|
20
|
+
icon: IoniconName;
|
|
21
|
+
/** Identity tint for the unlocked badge — part of the achievement data model. */
|
|
21
22
|
iconColor: string;
|
|
22
23
|
unlocked: boolean;
|
|
23
24
|
unlockedDate?: string;
|
|
24
25
|
rarity: 'common' | 'rare' | 'epic' | 'legendary';
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Per-achievement identity tints. Like the trust-tier palette in `trustTier.ts`,
|
|
30
|
+
* these are data, not theme surfaces — they brand each badge regardless of theme.
|
|
31
|
+
*/
|
|
32
|
+
const ACHIEVEMENT_TINT = {
|
|
33
|
+
gray: '#8E8E93',
|
|
34
|
+
green: '#34C759',
|
|
35
|
+
blue: '#007AFF',
|
|
36
|
+
orange: '#FF9500',
|
|
37
|
+
purple: '#AF52DE',
|
|
38
|
+
pink: '#FF2D55',
|
|
39
|
+
gold: '#FFD700',
|
|
40
|
+
red: '#FF3B30',
|
|
41
|
+
indigo: '#5E5CE6',
|
|
42
|
+
} as const;
|
|
43
|
+
|
|
44
|
+
/** Rarity-tier identity tints for the corner rarity accent. */
|
|
45
|
+
const RARITY_TINT: Record<Achievement['rarity'], string> = {
|
|
46
|
+
legendary: ACHIEVEMENT_TINT.gold,
|
|
47
|
+
epic: ACHIEVEMENT_TINT.purple,
|
|
48
|
+
rare: ACHIEVEMENT_TINT.blue,
|
|
49
|
+
common: '',
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** Contrast-locked foreground for icons/value text painted over a colored badge fill. */
|
|
53
|
+
const BADGE_ON_COLOR = '#FFFFFF';
|
|
54
|
+
|
|
55
|
+
/** Reputation thresholds that unlock each milestone, and the value shown on its badge. */
|
|
56
|
+
const ACHIEVEMENT_VALUE: Record<string, number> = {
|
|
57
|
+
'first-step': 1,
|
|
58
|
+
novice: 10,
|
|
59
|
+
contributor: 50,
|
|
60
|
+
'rising-star': 100,
|
|
61
|
+
'early-adopter': 200,
|
|
62
|
+
'community-hero': 500,
|
|
63
|
+
legend: 1000,
|
|
64
|
+
phoenix: 2500,
|
|
65
|
+
unstoppable: 5000,
|
|
66
|
+
helper: 10,
|
|
67
|
+
'streak-master': 7,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const BADGE_BORDER_WIDTH = 5;
|
|
71
|
+
const BADGE_GLOW_OPACITY = 0.3;
|
|
72
|
+
const BADGE_DARKEN = 0.45;
|
|
73
|
+
const BADGE_LIGHTEN = 0.25;
|
|
74
|
+
const RARITY_DARKEN = 0.4;
|
|
75
|
+
const ACCENT_LIGHTEN = 0.1;
|
|
76
|
+
const LOCKED_OPACITY = 0.5;
|
|
77
|
+
|
|
78
|
+
const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack }) => {
|
|
28
79
|
const { t } = useI18n();
|
|
29
80
|
const { user, oxyServices, isAuthenticated } = useOxy();
|
|
30
81
|
const [reputationTotal, setReputationTotal] = useState<number>(0);
|
|
31
|
-
const [
|
|
82
|
+
const [, setIsLoading] = useState(true);
|
|
32
83
|
|
|
33
84
|
const bloomTheme = useTheme();
|
|
34
|
-
const
|
|
35
|
-
const normalizedColorScheme = normalizeColorScheme(colorScheme);
|
|
36
|
-
const colors = Colors[normalizedColorScheme];
|
|
37
|
-
const themeStyles = useMemo(() => ({
|
|
38
|
-
primaryColor: '#d169e5',
|
|
39
|
-
}), []);
|
|
85
|
+
const colors = bloomTheme.colors;
|
|
40
86
|
|
|
41
87
|
useEffect(() => {
|
|
42
88
|
if (!user || !isAuthenticated) {
|
|
@@ -61,7 +107,7 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
61
107
|
description: t('trust.achievements.firstStepDesc') || 'Earned your first reputation point',
|
|
62
108
|
category: 'milestone',
|
|
63
109
|
icon: 'footsteps',
|
|
64
|
-
iconColor:
|
|
110
|
+
iconColor: ACHIEVEMENT_TINT.gray,
|
|
65
111
|
unlocked: reputationTotal >= 1,
|
|
66
112
|
rarity: 'common',
|
|
67
113
|
},
|
|
@@ -71,7 +117,7 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
71
117
|
description: t('trust.achievements.noviceDesc') || 'Reached 10 reputation points',
|
|
72
118
|
category: 'milestone',
|
|
73
119
|
icon: 'leaf',
|
|
74
|
-
iconColor:
|
|
120
|
+
iconColor: ACHIEVEMENT_TINT.green,
|
|
75
121
|
unlocked: reputationTotal >= 10,
|
|
76
122
|
rarity: 'common',
|
|
77
123
|
},
|
|
@@ -80,8 +126,8 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
80
126
|
name: t('trust.achievements.contributor') || 'Contributor',
|
|
81
127
|
description: t('trust.achievements.contributorDesc') || 'Reached 50 reputation points',
|
|
82
128
|
category: 'contribution',
|
|
83
|
-
icon: '
|
|
84
|
-
iconColor:
|
|
129
|
+
icon: 'people',
|
|
130
|
+
iconColor: ACHIEVEMENT_TINT.blue,
|
|
85
131
|
unlocked: reputationTotal >= 50,
|
|
86
132
|
rarity: 'common',
|
|
87
133
|
},
|
|
@@ -91,7 +137,7 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
91
137
|
description: t('trust.achievements.risingStarDesc') || 'Reached 100 reputation points',
|
|
92
138
|
category: 'milestone',
|
|
93
139
|
icon: 'star',
|
|
94
|
-
iconColor:
|
|
140
|
+
iconColor: ACHIEVEMENT_TINT.orange,
|
|
95
141
|
unlocked: reputationTotal >= 100,
|
|
96
142
|
rarity: 'rare',
|
|
97
143
|
},
|
|
@@ -101,7 +147,7 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
101
147
|
description: t('trust.achievements.earlyAdopterDesc') || 'Been part of the community from the start',
|
|
102
148
|
category: 'special',
|
|
103
149
|
icon: 'rocket',
|
|
104
|
-
iconColor:
|
|
150
|
+
iconColor: ACHIEVEMENT_TINT.purple,
|
|
105
151
|
unlocked: reputationTotal >= 200,
|
|
106
152
|
rarity: 'rare',
|
|
107
153
|
},
|
|
@@ -111,7 +157,7 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
111
157
|
description: t('trust.achievements.communityHeroDesc') || 'Reached 500 reputation points',
|
|
112
158
|
category: 'contribution',
|
|
113
159
|
icon: 'shield',
|
|
114
|
-
iconColor:
|
|
160
|
+
iconColor: ACHIEVEMENT_TINT.pink,
|
|
115
161
|
unlocked: reputationTotal >= 500,
|
|
116
162
|
rarity: 'epic',
|
|
117
163
|
},
|
|
@@ -121,7 +167,7 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
121
167
|
description: t('trust.achievements.legendDesc') || 'Reached 1000 reputation points',
|
|
122
168
|
category: 'milestone',
|
|
123
169
|
icon: 'trophy',
|
|
124
|
-
iconColor:
|
|
170
|
+
iconColor: ACHIEVEMENT_TINT.gold,
|
|
125
171
|
unlocked: reputationTotal >= 1000,
|
|
126
172
|
rarity: 'legendary',
|
|
127
173
|
},
|
|
@@ -131,7 +177,7 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
131
177
|
description: t('trust.achievements.phoenixDesc') || 'Reached 2500 reputation points',
|
|
132
178
|
category: 'milestone',
|
|
133
179
|
icon: 'flame',
|
|
134
|
-
iconColor:
|
|
180
|
+
iconColor: ACHIEVEMENT_TINT.red,
|
|
135
181
|
unlocked: reputationTotal >= 2500,
|
|
136
182
|
rarity: 'legendary',
|
|
137
183
|
},
|
|
@@ -141,7 +187,7 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
141
187
|
description: t('trust.achievements.unstoppableDesc') || 'Reached 5000 reputation points',
|
|
142
188
|
category: 'milestone',
|
|
143
189
|
icon: 'infinite',
|
|
144
|
-
iconColor:
|
|
190
|
+
iconColor: ACHIEVEMENT_TINT.indigo,
|
|
145
191
|
unlocked: reputationTotal >= 5000,
|
|
146
192
|
rarity: 'legendary',
|
|
147
193
|
},
|
|
@@ -151,7 +197,7 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
151
197
|
description: t('trust.achievements.bugHunterDesc') || 'Reported helpful bugs',
|
|
152
198
|
category: 'contribution',
|
|
153
199
|
icon: 'bug',
|
|
154
|
-
iconColor:
|
|
200
|
+
iconColor: ACHIEVEMENT_TINT.orange,
|
|
155
201
|
unlocked: false,
|
|
156
202
|
rarity: 'rare',
|
|
157
203
|
},
|
|
@@ -161,7 +207,7 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
161
207
|
description: t('trust.achievements.helperDesc') || 'Helped 10 users',
|
|
162
208
|
category: 'contribution',
|
|
163
209
|
icon: 'hand-left',
|
|
164
|
-
iconColor:
|
|
210
|
+
iconColor: ACHIEVEMENT_TINT.green,
|
|
165
211
|
unlocked: false,
|
|
166
212
|
rarity: 'common',
|
|
167
213
|
},
|
|
@@ -171,67 +217,38 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
171
217
|
description: t('trust.achievements.streakMasterDesc') || '7 day activity streak',
|
|
172
218
|
category: 'streak',
|
|
173
219
|
icon: 'flash',
|
|
174
|
-
iconColor:
|
|
220
|
+
iconColor: ACHIEVEMENT_TINT.gold,
|
|
175
221
|
unlocked: false,
|
|
176
222
|
rarity: 'epic',
|
|
177
223
|
},
|
|
178
|
-
], [t, reputationTotal
|
|
224
|
+
], [t, reputationTotal]);
|
|
179
225
|
|
|
180
226
|
const unlockedAchievements = achievements.filter(a => a.unlocked);
|
|
181
227
|
const lockedAchievements = achievements.filter(a => !a.unlocked);
|
|
182
228
|
|
|
183
|
-
const getRarityColor = (rarity: Achievement['rarity']) =>
|
|
184
|
-
|
|
185
|
-
case 'legendary':
|
|
186
|
-
return '#FFD700';
|
|
187
|
-
case 'epic':
|
|
188
|
-
return '#AF52DE';
|
|
189
|
-
case 'rare':
|
|
190
|
-
return '#007AFF';
|
|
191
|
-
default:
|
|
192
|
-
return bloomTheme.colors.textTertiary;
|
|
193
|
-
}
|
|
194
|
-
};
|
|
229
|
+
const getRarityColor = (rarity: Achievement['rarity']): string =>
|
|
230
|
+
RARITY_TINT[rarity] || colors.textTertiary;
|
|
195
231
|
|
|
196
|
-
const getAchievementValue = (achievement: Achievement): number | null =>
|
|
197
|
-
|
|
198
|
-
const valueMap: Record<string, number> = {
|
|
199
|
-
'first-step': 1,
|
|
200
|
-
'novice': 10,
|
|
201
|
-
'contributor': 50,
|
|
202
|
-
'rising-star': 100,
|
|
203
|
-
'early-adopter': 200,
|
|
204
|
-
'community-hero': 500,
|
|
205
|
-
'legend': 1000,
|
|
206
|
-
'phoenix': 2500,
|
|
207
|
-
'unstoppable': 5000,
|
|
208
|
-
'helper': 10,
|
|
209
|
-
'streak-master': 7,
|
|
210
|
-
};
|
|
211
|
-
return valueMap[achievement.id] || null;
|
|
212
|
-
};
|
|
232
|
+
const getAchievementValue = (achievement: Achievement): number | null =>
|
|
233
|
+
ACHIEVEMENT_VALUE[achievement.id] ?? null;
|
|
213
234
|
|
|
214
235
|
const renderAchievement = (achievement: Achievement) => {
|
|
215
236
|
const rarityColor = getRarityColor(achievement.rarity);
|
|
216
237
|
const isLocked = !achievement.unlocked;
|
|
217
238
|
const achievementValue = getAchievementValue(achievement);
|
|
218
239
|
|
|
219
|
-
// Two-tone colors: darker for borders/shadow, lighter for highlights
|
|
220
|
-
// Use achievement
|
|
221
|
-
const baseColor = isLocked ?
|
|
222
|
-
const darkTone = darkenColor(baseColor,
|
|
223
|
-
const lightTone = lightenColor(baseColor,
|
|
224
|
-
const mediumTone = baseColor;
|
|
240
|
+
// Two-tone colors: darker for borders/shadow, lighter for highlights.
|
|
241
|
+
// Use the achievement identity tint for unlocked badges, neutral for locked.
|
|
242
|
+
const baseColor = isLocked ? colors.textTertiary : (achievement.iconColor || colors.textTertiary);
|
|
243
|
+
const darkTone = darkenColor(baseColor, BADGE_DARKEN);
|
|
244
|
+
const lightTone = lightenColor(baseColor, BADGE_LIGHTEN);
|
|
245
|
+
const mediumTone = baseColor;
|
|
225
246
|
|
|
226
247
|
return (
|
|
227
248
|
<View
|
|
228
249
|
key={achievement.id}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
{
|
|
232
|
-
backgroundColor: colors.card,
|
|
233
|
-
},
|
|
234
|
-
]}
|
|
250
|
+
className="bg-fill rounded-radius-20 items-center"
|
|
251
|
+
style={styles.achievementCard}
|
|
235
252
|
>
|
|
236
253
|
<View style={styles.badgeContainer}>
|
|
237
254
|
{/* Outer glow effect - larger and softer */}
|
|
@@ -242,7 +259,7 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
242
259
|
styles.badgeOrganic,
|
|
243
260
|
{
|
|
244
261
|
backgroundColor: darkTone,
|
|
245
|
-
opacity:
|
|
262
|
+
opacity: BADGE_GLOW_OPACITY,
|
|
246
263
|
},
|
|
247
264
|
]}
|
|
248
265
|
/>
|
|
@@ -254,9 +271,9 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
254
271
|
styles.badgeMain,
|
|
255
272
|
styles.badgeOrganic,
|
|
256
273
|
{
|
|
257
|
-
backgroundColor: isLocked ?
|
|
274
|
+
backgroundColor: isLocked ? colors.border : mediumTone,
|
|
258
275
|
borderColor: darkTone,
|
|
259
|
-
borderWidth:
|
|
276
|
+
borderWidth: BADGE_BORDER_WIDTH,
|
|
260
277
|
shadowColor: darkTone,
|
|
261
278
|
},
|
|
262
279
|
]}
|
|
@@ -267,18 +284,14 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
267
284
|
<View
|
|
268
285
|
style={[
|
|
269
286
|
styles.badgeHighlight,
|
|
270
|
-
{
|
|
271
|
-
backgroundColor: lightTone,
|
|
272
|
-
},
|
|
287
|
+
{ backgroundColor: lightTone },
|
|
273
288
|
]}
|
|
274
289
|
/>
|
|
275
290
|
{/* Additional highlight for more depth */}
|
|
276
291
|
<View
|
|
277
292
|
style={[
|
|
278
293
|
styles.badgeHighlightAccent,
|
|
279
|
-
{
|
|
280
|
-
backgroundColor: lightenColor(lightTone, 0.1),
|
|
281
|
-
},
|
|
294
|
+
{ backgroundColor: lightenColor(lightTone, ACCENT_LIGHTEN) },
|
|
282
295
|
]}
|
|
283
296
|
/>
|
|
284
297
|
</>
|
|
@@ -287,9 +300,9 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
287
300
|
{/* Icon container - positioned in upper area */}
|
|
288
301
|
<View style={styles.badgeIconContainer}>
|
|
289
302
|
{isLocked ? (
|
|
290
|
-
<Ionicons name="lock-closed" size={40} color={
|
|
303
|
+
<Ionicons name="lock-closed" size={40} color={colors.textTertiary} />
|
|
291
304
|
) : (
|
|
292
|
-
<Ionicons name={achievement.icon
|
|
305
|
+
<Ionicons name={achievement.icon} size={40} color={BADGE_ON_COLOR} />
|
|
293
306
|
)}
|
|
294
307
|
</View>
|
|
295
308
|
|
|
@@ -313,16 +326,30 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
313
326
|
|
|
314
327
|
{/* Rarity badge - small accent in corner */}
|
|
315
328
|
{achievement.unlocked && (
|
|
316
|
-
<View
|
|
317
|
-
|
|
329
|
+
<View
|
|
330
|
+
style={[
|
|
331
|
+
styles.rarityBadge,
|
|
332
|
+
{ backgroundColor: rarityColor, borderColor: darkenColor(rarityColor, RARITY_DARKEN) },
|
|
333
|
+
]}
|
|
334
|
+
>
|
|
335
|
+
<Text style={[styles.rarityText, { color: BADGE_ON_COLOR }]}>
|
|
336
|
+
{achievement.rarity[0].toUpperCase()}
|
|
337
|
+
</Text>
|
|
318
338
|
</View>
|
|
319
339
|
)}
|
|
320
340
|
</View>
|
|
321
341
|
|
|
322
|
-
<
|
|
342
|
+
<H5
|
|
343
|
+
className="text-text text-center"
|
|
344
|
+
style={isLocked ? styles.lockedDimmed : undefined}
|
|
345
|
+
numberOfLines={2}
|
|
346
|
+
>
|
|
323
347
|
{achievement.name}
|
|
324
|
-
</
|
|
325
|
-
<Text
|
|
348
|
+
</H5>
|
|
349
|
+
<Text
|
|
350
|
+
className="text-text-tertiary text-center text-xs mt-space-2"
|
|
351
|
+
style={isLocked ? styles.lockedDimmed : undefined}
|
|
352
|
+
>
|
|
326
353
|
{achievement.description}
|
|
327
354
|
</Text>
|
|
328
355
|
</View>
|
|
@@ -331,15 +358,15 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
331
358
|
|
|
332
359
|
if (!isAuthenticated) {
|
|
333
360
|
return (
|
|
334
|
-
<View
|
|
361
|
+
<View className="flex-1 bg-bg">
|
|
335
362
|
<Header
|
|
336
363
|
title={t('trust.rewards.title') || 'Trust Rewards'}
|
|
337
364
|
subtitle={t('trust.rewards.subtitle') || 'Unlock special features and recognition'}
|
|
338
365
|
onBack={goBack}
|
|
339
366
|
elevation="subtle"
|
|
340
367
|
/>
|
|
341
|
-
<View
|
|
342
|
-
<Text
|
|
368
|
+
<View className="flex-1 items-center justify-center px-screen-margin">
|
|
369
|
+
<Text className="text-text text-base text-center">
|
|
343
370
|
{t('common.status.notSignedIn') || 'Not signed in'}
|
|
344
371
|
</Text>
|
|
345
372
|
</View>
|
|
@@ -347,8 +374,12 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
347
374
|
);
|
|
348
375
|
}
|
|
349
376
|
|
|
377
|
+
const progressRatio = achievements.length > 0
|
|
378
|
+
? unlockedAchievements.length / achievements.length
|
|
379
|
+
: 0;
|
|
380
|
+
|
|
350
381
|
return (
|
|
351
|
-
<View
|
|
382
|
+
<View className="flex-1 bg-bg">
|
|
352
383
|
<Header
|
|
353
384
|
title={t('trust.rewards.title') || 'Trust Rewards'}
|
|
354
385
|
subtitle={t('trust.rewards.subtitle') || 'Unlock special features and recognition'}
|
|
@@ -356,42 +387,47 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
356
387
|
elevation="subtle"
|
|
357
388
|
/>
|
|
358
389
|
<ScrollView
|
|
359
|
-
|
|
390
|
+
className="flex-1"
|
|
391
|
+
contentContainerClassName="px-screen-margin pt-space-20 pb-space-40"
|
|
360
392
|
showsVerticalScrollIndicator={false}
|
|
361
393
|
>
|
|
362
394
|
{/* Stats Header */}
|
|
363
|
-
<View
|
|
364
|
-
<View
|
|
395
|
+
<View className="bg-fill rounded-radius-20 p-space-20 mb-space-24">
|
|
396
|
+
<View className="flex-row justify-between items-center mb-space-16">
|
|
365
397
|
<View>
|
|
366
|
-
<
|
|
398
|
+
<H1 className="text-text" style={{ color: colors.primary }}>
|
|
367
399
|
{reputationTotal}
|
|
368
|
-
</
|
|
369
|
-
<Text
|
|
400
|
+
</H1>
|
|
401
|
+
<Text className="text-text-tertiary text-sm">
|
|
370
402
|
{t('trust.center.balance') || 'Reputation Points'}
|
|
371
403
|
</Text>
|
|
372
404
|
</View>
|
|
373
|
-
<View
|
|
374
|
-
<
|
|
405
|
+
<View className="items-end">
|
|
406
|
+
<H1 className="text-text" style={{ color: colors.primary }}>
|
|
375
407
|
{unlockedAchievements.length}
|
|
376
|
-
</
|
|
377
|
-
<Text
|
|
408
|
+
</H1>
|
|
409
|
+
<Text className="text-text-tertiary text-sm">
|
|
378
410
|
{t('trust.achievements.unlocked') || 'Achievements'}
|
|
379
411
|
</Text>
|
|
380
412
|
</View>
|
|
381
413
|
</View>
|
|
382
|
-
<View
|
|
383
|
-
<View
|
|
414
|
+
<View className="mt-space-8">
|
|
415
|
+
<View
|
|
416
|
+
className="rounded-radius-full overflow-hidden mb-space-8"
|
|
417
|
+
style={[styles.progressBar, { backgroundColor: colors.border }]}
|
|
418
|
+
>
|
|
384
419
|
<View
|
|
420
|
+
className="rounded-radius-full"
|
|
385
421
|
style={[
|
|
386
422
|
styles.progressBarFill,
|
|
387
423
|
{
|
|
388
|
-
width: `${
|
|
389
|
-
backgroundColor:
|
|
424
|
+
width: `${progressRatio * 100}%`,
|
|
425
|
+
backgroundColor: colors.primary,
|
|
390
426
|
},
|
|
391
427
|
]}
|
|
392
428
|
/>
|
|
393
429
|
</View>
|
|
394
|
-
<Text
|
|
430
|
+
<Text className="text-text-tertiary text-xs text-right">
|
|
395
431
|
{unlockedAchievements.length} / {achievements.length}
|
|
396
432
|
</Text>
|
|
397
433
|
</View>
|
|
@@ -400,9 +436,9 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
400
436
|
{/* Unlocked Achievements */}
|
|
401
437
|
{unlockedAchievements.length > 0 && (
|
|
402
438
|
<>
|
|
403
|
-
<
|
|
439
|
+
<H4 className="text-text mt-space-8">
|
|
404
440
|
{t('trust.achievements.unlocked') || 'Unlocked Achievements'}
|
|
405
|
-
</
|
|
441
|
+
</H4>
|
|
406
442
|
<View style={styles.achievementsGrid}>
|
|
407
443
|
{unlockedAchievements.map(achievement => renderAchievement(achievement))}
|
|
408
444
|
</View>
|
|
@@ -412,9 +448,9 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
412
448
|
{/* Locked Achievements */}
|
|
413
449
|
{lockedAchievements.length > 0 && (
|
|
414
450
|
<>
|
|
415
|
-
<
|
|
451
|
+
<H4 className="text-text mt-space-8">
|
|
416
452
|
{t('trust.achievements.locked') || 'Locked Achievements'}
|
|
417
|
-
</
|
|
453
|
+
</H4>
|
|
418
454
|
<View style={styles.achievementsGrid}>
|
|
419
455
|
{lockedAchievements.map(achievement => renderAchievement(achievement))}
|
|
420
456
|
</View>
|
|
@@ -425,73 +461,16 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
|
|
|
425
461
|
);
|
|
426
462
|
};
|
|
427
463
|
|
|
464
|
+
// Measured/positioned layout only — no color, no theme surfaces.
|
|
428
465
|
const styles = StyleSheet.create({
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
paddingHorizontal: 24,
|
|
432
|
-
paddingTop: 20,
|
|
433
|
-
paddingBottom: 40,
|
|
434
|
-
},
|
|
435
|
-
centerContent: {
|
|
436
|
-
flex: 1,
|
|
437
|
-
justifyContent: 'center',
|
|
438
|
-
alignItems: 'center',
|
|
439
|
-
},
|
|
440
|
-
message: {
|
|
441
|
-
fontSize: 16,
|
|
442
|
-
textAlign: 'center',
|
|
443
|
-
},
|
|
444
|
-
statsCard: {
|
|
445
|
-
borderRadius: 18,
|
|
446
|
-
padding: 20,
|
|
447
|
-
marginBottom: 24,
|
|
448
|
-
},
|
|
449
|
-
statsHeader: {
|
|
450
|
-
flexDirection: 'row',
|
|
451
|
-
justifyContent: 'space-between',
|
|
452
|
-
alignItems: 'center',
|
|
453
|
-
marginBottom: 16,
|
|
454
|
-
},
|
|
455
|
-
currentReputation: {
|
|
456
|
-
fontSize: 36,
|
|
457
|
-
fontWeight: Platform.OS === 'web' ? 'bold' : undefined,
|
|
458
|
-
marginBottom: 4,
|
|
459
|
-
},
|
|
460
|
-
achievementStats: {
|
|
461
|
-
alignItems: 'flex-end',
|
|
462
|
-
},
|
|
463
|
-
achievementCount: {
|
|
464
|
-
fontSize: 36,
|
|
465
|
-
fontWeight: Platform.OS === 'web' ? 'bold' : undefined,
|
|
466
|
-
marginBottom: 4,
|
|
467
|
-
},
|
|
468
|
-
achievementCountLabel: {
|
|
469
|
-
fontSize: 14,
|
|
470
|
-
},
|
|
471
|
-
reputationLabel: {
|
|
472
|
-
fontSize: 14,
|
|
473
|
-
},
|
|
474
|
-
progressBarContainer: {
|
|
475
|
-
marginTop: 8,
|
|
466
|
+
lockedDimmed: {
|
|
467
|
+
opacity: LOCKED_OPACITY,
|
|
476
468
|
},
|
|
477
469
|
progressBar: {
|
|
478
470
|
height: 8,
|
|
479
|
-
borderRadius: 4,
|
|
480
|
-
overflow: 'hidden',
|
|
481
|
-
marginBottom: 8,
|
|
482
471
|
},
|
|
483
472
|
progressBarFill: {
|
|
484
473
|
height: '100%',
|
|
485
|
-
borderRadius: 4,
|
|
486
|
-
},
|
|
487
|
-
progressText: {
|
|
488
|
-
fontSize: 12,
|
|
489
|
-
textAlign: 'right',
|
|
490
|
-
},
|
|
491
|
-
sectionTitle: {
|
|
492
|
-
fontSize: 20,
|
|
493
|
-
fontWeight: Platform.OS === 'web' ? '600' : undefined,
|
|
494
|
-
marginTop: 8,
|
|
495
474
|
},
|
|
496
475
|
achievementsGrid: {
|
|
497
476
|
flexDirection: 'row',
|
|
@@ -503,10 +482,8 @@ const styles = StyleSheet.create({
|
|
|
503
482
|
achievementCard: {
|
|
504
483
|
width: '47%',
|
|
505
484
|
minWidth: 140,
|
|
506
|
-
borderRadius: 20,
|
|
507
485
|
padding: 20,
|
|
508
486
|
paddingTop: 24,
|
|
509
|
-
alignItems: 'center',
|
|
510
487
|
},
|
|
511
488
|
badgeContainer: {
|
|
512
489
|
alignItems: 'center',
|
|
@@ -610,18 +587,6 @@ const styles = StyleSheet.create({
|
|
|
610
587
|
fontSize: 14,
|
|
611
588
|
fontWeight: 'bold',
|
|
612
589
|
},
|
|
613
|
-
achievementName: {
|
|
614
|
-
fontSize: 15,
|
|
615
|
-
fontWeight: '700',
|
|
616
|
-
textAlign: 'center',
|
|
617
|
-
marginBottom: 6,
|
|
618
|
-
marginTop: 4,
|
|
619
|
-
},
|
|
620
|
-
achievementDescription: {
|
|
621
|
-
fontSize: 11,
|
|
622
|
-
textAlign: 'center',
|
|
623
|
-
lineHeight: 15,
|
|
624
|
-
},
|
|
625
590
|
});
|
|
626
591
|
|
|
627
592
|
export default TrustRewardsScreen;
|