@oxyhq/services 11.0.0 → 11.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/index.js +7 -0
- 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/OxyLogo.js +1 -1
- package/lib/commonjs/ui/components/OxyLogo.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 +194 -333
- 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 +2 -0
- 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/OxyLogo.js +1 -1
- package/lib/module/ui/components/OxyLogo.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 +192 -331
- 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 +2 -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 +6 -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 +2 -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 +6 -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 +2 -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/OxyLogo.tsx +1 -1
- 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 +162 -246
- 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,16 +1,19 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
|
-
import { View,
|
|
3
|
+
import { View, StyleSheet, ActivityIndicator, ScrollView } from 'react-native';
|
|
4
4
|
import type { BaseScreenProps } from '../types/navigation';
|
|
5
5
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
6
|
+
import { Button } from '@oxyhq/bloom/button';
|
|
7
|
+
import { H2, Text } from '@oxyhq/bloom/typography';
|
|
8
|
+
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
6
9
|
import Avatar from '../components/Avatar';
|
|
7
10
|
import FollowButton from '../components/FollowButton';
|
|
8
11
|
import { useFollow } from '../hooks/useFollow';
|
|
9
12
|
import { Ionicons } from '@expo/vector-icons';
|
|
10
13
|
import { useI18n } from '../hooks/useI18n';
|
|
11
14
|
import { useOxy } from '../context/OxyContext';
|
|
12
|
-
import { getAccountDisplayName, logger } from '@oxyhq/core';
|
|
13
|
-
import type { User } from '@oxyhq/core';
|
|
15
|
+
import { getAccountDisplayName, logger, normalizeProfileLinks } from '@oxyhq/core';
|
|
16
|
+
import type { User, ProfileLink } from '@oxyhq/core';
|
|
14
17
|
import { extractErrorMessage } from '../utils/errorHandlers';
|
|
15
18
|
|
|
16
19
|
interface ProfileScreenProps extends BaseScreenProps {
|
|
@@ -18,15 +21,10 @@ interface ProfileScreenProps extends BaseScreenProps {
|
|
|
18
21
|
username?: string;
|
|
19
22
|
}
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
description?: string;
|
|
26
|
-
image?: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
type ProfileLink = string | { link: string } | LinkMetadata;
|
|
24
|
+
const AVATAR_SIZE = 96;
|
|
25
|
+
const BANNER_HEIGHT = 160;
|
|
26
|
+
const AVATAR_OVERLAP = -56;
|
|
27
|
+
const INFO_ICON_SIZE = 18;
|
|
30
28
|
|
|
31
29
|
const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme, goBack, navigate }) => {
|
|
32
30
|
// Use useOxy() hook for OxyContext values
|
|
@@ -37,13 +35,7 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
37
35
|
const [commentsCount, setCommentsCount] = useState<number | null>(null);
|
|
38
36
|
const [isLoading, setIsLoading] = useState(true);
|
|
39
37
|
const [error, setError] = useState<string | null>(null);
|
|
40
|
-
const [links, setLinks] = useState<
|
|
41
|
-
url: string;
|
|
42
|
-
title?: string;
|
|
43
|
-
description?: string;
|
|
44
|
-
image?: string;
|
|
45
|
-
id: string;
|
|
46
|
-
}>>([]);
|
|
38
|
+
const [links, setLinks] = useState<ProfileLink[]>([]);
|
|
47
39
|
|
|
48
40
|
// Use the follow hook for real follower data
|
|
49
41
|
const {
|
|
@@ -53,7 +45,6 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
53
45
|
} = useFollow(userId);
|
|
54
46
|
|
|
55
47
|
const bloomTheme = useTheme();
|
|
56
|
-
const styles = createStyles();
|
|
57
48
|
const { t, locale } = useI18n();
|
|
58
49
|
|
|
59
50
|
// Check if current user is viewing their own profile
|
|
@@ -107,34 +98,8 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
107
98
|
setProfile(profileRes);
|
|
108
99
|
setReputationTotal(typeof reputationRes.total === 'number' ? reputationRes.total : null);
|
|
109
100
|
|
|
110
|
-
//
|
|
111
|
-
|
|
112
|
-
const linksWithIds = profileRes.linksMetadata.map((link: LinkMetadata, index: number) => ({
|
|
113
|
-
...link,
|
|
114
|
-
id: link.id || `existing-${index}`
|
|
115
|
-
}));
|
|
116
|
-
setLinks(linksWithIds);
|
|
117
|
-
} else if (Array.isArray(profileRes.links)) {
|
|
118
|
-
const simpleLinks = profileRes.links.map((l: ProfileLink) => typeof l === 'string' ? l : (typeof l === 'object' && 'link' in l ? l.link : '')).filter(Boolean);
|
|
119
|
-
const linksWithMetadata = simpleLinks.map((url: string, index: number) => ({
|
|
120
|
-
url,
|
|
121
|
-
title: url.replace(/^https?:\/\//, '').replace(/\/$/, ''),
|
|
122
|
-
description: `Link to ${url}`,
|
|
123
|
-
image: undefined,
|
|
124
|
-
id: `existing-${index}`
|
|
125
|
-
}));
|
|
126
|
-
setLinks(linksWithMetadata);
|
|
127
|
-
} else if (profileRes.website) {
|
|
128
|
-
setLinks([{
|
|
129
|
-
url: profileRes.website,
|
|
130
|
-
title: profileRes.website.replace(/^https?:\/\//, '').replace(/\/$/, ''),
|
|
131
|
-
description: `Link to ${profileRes.website}`,
|
|
132
|
-
image: undefined,
|
|
133
|
-
id: 'existing-0'
|
|
134
|
-
}]);
|
|
135
|
-
} else {
|
|
136
|
-
setLinks([]);
|
|
137
|
-
}
|
|
101
|
+
// Normalize profile links via the shared @oxyhq/core helper.
|
|
102
|
+
setLinks(normalizeProfileLinks(profileRes.linksMetadata, profileRes.links));
|
|
138
103
|
|
|
139
104
|
// Follower/following counts are managed by the `useFollow` hook.
|
|
140
105
|
|
|
@@ -174,7 +139,7 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
174
139
|
|
|
175
140
|
if (isLoading) {
|
|
176
141
|
return (
|
|
177
|
-
<View style={
|
|
142
|
+
<View style={styles.centerContainer} className="bg-bg">
|
|
178
143
|
<ActivityIndicator size="large" color={bloomTheme.colors.primary} />
|
|
179
144
|
</View>
|
|
180
145
|
);
|
|
@@ -182,57 +147,63 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
182
147
|
|
|
183
148
|
if (error) {
|
|
184
149
|
return (
|
|
185
|
-
<View style={
|
|
186
|
-
<View style={
|
|
150
|
+
<View style={styles.container} className="bg-bg">
|
|
151
|
+
<View style={styles.errorHeader} className="px-screen-margin py-space-12 border-b border-border">
|
|
187
152
|
{goBack && (
|
|
188
|
-
<
|
|
189
|
-
|
|
190
|
-
|
|
153
|
+
<Button
|
|
154
|
+
variant="icon"
|
|
155
|
+
size="icon"
|
|
156
|
+
onPress={goBack}
|
|
157
|
+
accessibilityLabel={t('common.back') || 'Back'}
|
|
158
|
+
icon={<Ionicons name="arrow-back" size={22} color={bloomTheme.colors.text} />}
|
|
159
|
+
/>
|
|
191
160
|
)}
|
|
192
|
-
<
|
|
161
|
+
<H2 style={styles.errorTitle} className="text-text">
|
|
162
|
+
{t('profile.errorTitle') || 'Profile Error'}
|
|
163
|
+
</H2>
|
|
193
164
|
</View>
|
|
194
|
-
<View style={styles.errorContent}>
|
|
195
|
-
<Ionicons name="alert-circle" size={48} color={bloomTheme.colors.error}
|
|
196
|
-
<Text style={styles.errorText} className="text-
|
|
197
|
-
<Text style={styles.errorSubtext} className="text-
|
|
198
|
-
This could happen if the user doesn't exist or the profile service is unavailable.
|
|
165
|
+
<View style={styles.errorContent} className="px-space-32 gap-space-12">
|
|
166
|
+
<Ionicons name="alert-circle" size={48} color={bloomTheme.colors.error} />
|
|
167
|
+
<Text style={styles.errorText} className="text-text">{error}</Text>
|
|
168
|
+
<Text style={styles.errorSubtext} className="text-text-secondary">
|
|
169
|
+
{t('profile.errorSubtext') || "This could happen if the user doesn't exist or the profile service is unavailable."}
|
|
199
170
|
</Text>
|
|
200
171
|
</View>
|
|
201
172
|
</View>
|
|
202
173
|
);
|
|
203
174
|
}
|
|
204
175
|
|
|
176
|
+
const displayName = profile ? getAccountDisplayName(profile, locale) : username || '';
|
|
177
|
+
|
|
205
178
|
return (
|
|
206
|
-
<View style={
|
|
207
|
-
<ScrollView style={
|
|
179
|
+
<View style={styles.container} className="bg-bg">
|
|
180
|
+
<ScrollView style={styles.flex} contentContainerStyle={styles.scrollContainer}>
|
|
208
181
|
{/* Banner Image */}
|
|
209
|
-
<View style={styles.bannerContainer} className="bg-
|
|
210
|
-
<View style={styles.
|
|
182
|
+
<View style={styles.bannerContainer} className="bg-fill-brand/20">
|
|
183
|
+
<View style={styles.flex} className="bg-fill-brand" />
|
|
211
184
|
</View>
|
|
212
185
|
{/* Avatar overlapping banner */}
|
|
213
|
-
<View style={styles.avatarRow}>
|
|
214
|
-
<View style={styles.avatarWrapper} className="border-
|
|
186
|
+
<View style={styles.avatarRow} className="px-screen-margin">
|
|
187
|
+
<View style={styles.avatarWrapper} className="border-bg bg-bg rounded-radius-max">
|
|
215
188
|
<Avatar
|
|
216
189
|
uri={profile?.avatar ? oxyServices.getFileDownloadUrl(profile.avatar, 'thumb') : undefined}
|
|
217
|
-
name={
|
|
218
|
-
size={
|
|
219
|
-
|
|
190
|
+
name={displayName || username}
|
|
191
|
+
size={AVATAR_SIZE}
|
|
220
192
|
/>
|
|
221
193
|
</View>
|
|
222
194
|
{/* Conditional Action Button */}
|
|
223
195
|
<View style={styles.actionButtonWrapper}>
|
|
224
196
|
{isOwnProfile ? (
|
|
225
|
-
<
|
|
226
|
-
|
|
227
|
-
|
|
197
|
+
<Button
|
|
198
|
+
variant="secondary"
|
|
199
|
+
size="small"
|
|
228
200
|
onPress={() => navigate?.('ManageAccount')}
|
|
229
201
|
>
|
|
230
|
-
|
|
231
|
-
</
|
|
202
|
+
{t('editProfile.title') || 'Edit Profile'}
|
|
203
|
+
</Button>
|
|
232
204
|
) : (
|
|
233
205
|
<FollowButton
|
|
234
206
|
userId={userId}
|
|
235
|
-
|
|
236
207
|
onFollowChange={(isFollowing) => {
|
|
237
208
|
// The follow button will automatically update counts via Zustand
|
|
238
209
|
if (__DEV__) {
|
|
@@ -244,105 +215,99 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
244
215
|
</View>
|
|
245
216
|
</View>
|
|
246
217
|
{/* Profile Info */}
|
|
247
|
-
<View style={styles.header}>
|
|
248
|
-
<
|
|
249
|
-
{
|
|
250
|
-
</
|
|
218
|
+
<View style={styles.header} className="px-screen-margin">
|
|
219
|
+
<H2 style={styles.displayName} className="text-text">
|
|
220
|
+
{displayName}
|
|
221
|
+
</H2>
|
|
251
222
|
{profile?.username && (
|
|
252
|
-
<Text style={styles.subText} className="text-
|
|
223
|
+
<Text style={styles.subText} className="text-text-secondary">@{profile.username}</Text>
|
|
253
224
|
)}
|
|
254
|
-
{/* Bio
|
|
255
|
-
<Text style={styles.bio} className="text-
|
|
225
|
+
{/* Bio */}
|
|
226
|
+
<Text style={styles.bio} className="text-text">{profile?.bio || (t('profile.noBio') || 'This user has no bio yet.')}</Text>
|
|
227
|
+
</View>
|
|
256
228
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
<
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
229
|
+
{/* Info Grid as a settings list group */}
|
|
230
|
+
<SettingsListGroup>
|
|
231
|
+
{profile?.createdAt && (
|
|
232
|
+
<SettingsListItem
|
|
233
|
+
icon={<Ionicons name="calendar-outline" size={INFO_ICON_SIZE} color={bloomTheme.colors.textSecondary} />}
|
|
234
|
+
title={t('profile.joinedOn', { date: new Date(profile.createdAt).toLocaleDateString() }) || `Joined ${new Date(profile.createdAt).toLocaleDateString()}`}
|
|
235
|
+
showChevron={false}
|
|
236
|
+
/>
|
|
237
|
+
)}
|
|
238
|
+
{profile?.location && (
|
|
239
|
+
<SettingsListItem
|
|
240
|
+
icon={<Ionicons name="location-outline" size={INFO_ICON_SIZE} color={bloomTheme.colors.textSecondary} />}
|
|
241
|
+
title={profile.location}
|
|
242
|
+
showChevron={false}
|
|
243
|
+
/>
|
|
244
|
+
)}
|
|
245
|
+
{profile?.website && (
|
|
246
|
+
<SettingsListItem
|
|
247
|
+
icon={<Ionicons name="globe-outline" size={INFO_ICON_SIZE} color={bloomTheme.colors.textSecondary} />}
|
|
248
|
+
title={profile.website}
|
|
249
|
+
showChevron={false}
|
|
250
|
+
/>
|
|
251
|
+
)}
|
|
252
|
+
{profile && 'company' in profile && typeof profile.company === 'string' && profile.company && (
|
|
253
|
+
<SettingsListItem
|
|
254
|
+
icon={<Ionicons name="business-outline" size={INFO_ICON_SIZE} color={bloomTheme.colors.textSecondary} />}
|
|
255
|
+
title={profile.company}
|
|
256
|
+
showChevron={false}
|
|
257
|
+
/>
|
|
258
|
+
)}
|
|
259
|
+
{profile && 'jobTitle' in profile && typeof profile.jobTitle === 'string' && profile.jobTitle && (
|
|
260
|
+
<SettingsListItem
|
|
261
|
+
icon={<Ionicons name="briefcase-outline" size={INFO_ICON_SIZE} color={bloomTheme.colors.textSecondary} />}
|
|
262
|
+
title={profile.jobTitle}
|
|
263
|
+
showChevron={false}
|
|
264
|
+
/>
|
|
265
|
+
)}
|
|
266
|
+
{profile && 'education' in profile && typeof profile.education === 'string' && profile.education && (
|
|
267
|
+
<SettingsListItem
|
|
268
|
+
icon={<Ionicons name="school-outline" size={INFO_ICON_SIZE} color={bloomTheme.colors.textSecondary} />}
|
|
269
|
+
title={profile.education}
|
|
270
|
+
showChevron={false}
|
|
271
|
+
/>
|
|
272
|
+
)}
|
|
273
|
+
{profile && 'birthday' in profile && typeof profile.birthday === 'string' && profile.birthday && (
|
|
274
|
+
<SettingsListItem
|
|
275
|
+
icon={<Ionicons name="gift-outline" size={INFO_ICON_SIZE} color={bloomTheme.colors.textSecondary} />}
|
|
276
|
+
title={t('profile.bornOn', { date: new Date(profile.birthday).toLocaleDateString() }) || `Born ${new Date(profile.birthday).toLocaleDateString()}`}
|
|
277
|
+
showChevron={false}
|
|
278
|
+
/>
|
|
279
|
+
)}
|
|
280
|
+
{links.length > 0 && (
|
|
281
|
+
<SettingsListItem
|
|
282
|
+
icon={<Ionicons name="link-outline" size={INFO_ICON_SIZE} color={bloomTheme.colors.textSecondary} />}
|
|
283
|
+
title={links[0].url}
|
|
284
|
+
value={links.length > 1 ? (t('profile.more', { count: links.length - 1 }) || `+ ${links.length - 1} more`) : undefined}
|
|
285
|
+
onPress={() => navigate?.('UserLinks', { userId, links })}
|
|
286
|
+
/>
|
|
287
|
+
)}
|
|
288
|
+
</SettingsListGroup>
|
|
289
|
+
|
|
290
|
+
{/* All Stats in one row */}
|
|
291
|
+
<View style={styles.statsRow} className="px-screen-margin">
|
|
292
|
+
<View style={styles.statItem}>
|
|
293
|
+
<Text style={styles.statAmount} className="text-text-inverse">{reputationTotal !== null && reputationTotal !== undefined ? reputationTotal : '--'}</Text>
|
|
294
|
+
<Text style={styles.statLabel} className="text-text-secondary">{t('profile.reputation') || 'Reputation'}</Text>
|
|
295
|
+
</View>
|
|
296
|
+
<View style={styles.statItem}>
|
|
297
|
+
{isLoadingCounts ? (
|
|
298
|
+
<ActivityIndicator size="small" color={bloomTheme.colors.text} />
|
|
299
|
+
) : (
|
|
300
|
+
<Text style={styles.statAmount} className="text-text">{followerCount !== null ? followerCount : '--'}</Text>
|
|
320
301
|
)}
|
|
302
|
+
<Text style={styles.statLabel} className="text-text-secondary">{t('profile.followers') || 'Followers'}</Text>
|
|
321
303
|
</View>
|
|
322
|
-
{
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
</View>
|
|
330
|
-
<View style={styles.statItem}>
|
|
331
|
-
{isLoadingCounts ? (
|
|
332
|
-
<ActivityIndicator size="small" color={bloomTheme.colors.text} />
|
|
333
|
-
) : (
|
|
334
|
-
<Text style={styles.statAmount} className="text-foreground">{followerCount !== null ? followerCount : '--'}</Text>
|
|
335
|
-
)}
|
|
336
|
-
<Text style={styles.statLabel} className="text-muted-foreground">{t('profile.followers') || 'Followers'}</Text>
|
|
337
|
-
</View>
|
|
338
|
-
<View style={styles.statItem}>
|
|
339
|
-
{isLoadingCounts ? (
|
|
340
|
-
<ActivityIndicator size="small" color={bloomTheme.colors.text} />
|
|
341
|
-
) : (
|
|
342
|
-
<Text style={styles.statAmount} className="text-foreground">{followingCount !== null ? followingCount : '--'}</Text>
|
|
343
|
-
)}
|
|
344
|
-
<Text style={styles.statLabel} className="text-muted-foreground">{t('profile.following') || 'Following'}</Text>
|
|
345
|
-
</View>
|
|
304
|
+
<View style={styles.statItem}>
|
|
305
|
+
{isLoadingCounts ? (
|
|
306
|
+
<ActivityIndicator size="small" color={bloomTheme.colors.text} />
|
|
307
|
+
) : (
|
|
308
|
+
<Text style={styles.statAmount} className="text-text">{followingCount !== null ? followingCount : '--'}</Text>
|
|
309
|
+
)}
|
|
310
|
+
<Text style={styles.statLabel} className="text-text-secondary">{t('profile.following') || 'Following'}</Text>
|
|
346
311
|
</View>
|
|
347
312
|
</View>
|
|
348
313
|
</ScrollView>
|
|
@@ -350,93 +315,44 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
350
315
|
);
|
|
351
316
|
};
|
|
352
317
|
|
|
353
|
-
|
|
318
|
+
// Layout-only styles: flex, dimensions, and the measured banner/avatar overlap
|
|
319
|
+
// that no token class can express. Colors, spacing, radius, and typography roles
|
|
320
|
+
// live on Bloom components + NativeWind token classes.
|
|
321
|
+
const styles = StyleSheet.create({
|
|
354
322
|
container: { flex: 1 },
|
|
323
|
+
flex: { flex: 1 },
|
|
324
|
+
centerContainer: { flex: 1, justifyContent: 'center', alignItems: 'center' },
|
|
355
325
|
scrollContainer: { alignItems: 'stretch', paddingBottom: 40 },
|
|
356
|
-
bannerContainer: { height:
|
|
357
|
-
|
|
358
|
-
avatarRow: { flexDirection: 'row', alignItems: 'flex-end', marginTop: -56, paddingHorizontal: 20, justifyContent: 'space-between', zIndex: 2 },
|
|
359
|
-
avatarWrapper: { borderWidth: 5, borderRadius: 64, overflow: 'hidden' },
|
|
360
|
-
actionButtonWrapper: { flex: 1, alignItems: 'flex-end', justifyContent: 'flex-end' },
|
|
361
|
-
actionButton: {
|
|
362
|
-
borderWidth: 1,
|
|
363
|
-
borderRadius: 24,
|
|
364
|
-
paddingVertical: 7,
|
|
365
|
-
paddingHorizontal: 22,
|
|
366
|
-
marginBottom: 8,
|
|
367
|
-
elevation: 2,
|
|
368
|
-
shadowOffset: { width: 0, height: 1 },
|
|
369
|
-
shadowOpacity: 0.08,
|
|
370
|
-
shadowRadius: 2
|
|
371
|
-
},
|
|
372
|
-
actionButtonText: {
|
|
373
|
-
fontWeight: 'bold',
|
|
374
|
-
fontSize: 16
|
|
375
|
-
},
|
|
376
|
-
header: { alignItems: 'flex-start', width: '100%', paddingHorizontal: 20 },
|
|
377
|
-
displayName: { fontSize: 24, fontWeight: 'bold', marginTop: 10, marginBottom: 2, letterSpacing: 0.1 },
|
|
378
|
-
subText: { fontSize: 16, marginBottom: 2 },
|
|
379
|
-
bio: { fontSize: 16, marginTop: 10, marginBottom: 10, lineHeight: 22 },
|
|
380
|
-
infoGrid: {
|
|
326
|
+
bannerContainer: { height: BANNER_HEIGHT, position: 'relative', overflow: 'hidden' },
|
|
327
|
+
avatarRow: {
|
|
381
328
|
flexDirection: 'row',
|
|
382
|
-
alignItems: '
|
|
383
|
-
|
|
384
|
-
|
|
329
|
+
alignItems: 'flex-end',
|
|
330
|
+
marginTop: AVATAR_OVERLAP,
|
|
331
|
+
justifyContent: 'space-between',
|
|
332
|
+
zIndex: 2,
|
|
385
333
|
},
|
|
386
|
-
|
|
334
|
+
avatarWrapper: { borderWidth: 5, overflow: 'hidden' },
|
|
335
|
+
actionButtonWrapper: { flex: 1, alignItems: 'flex-end', justifyContent: 'flex-end', paddingBottom: 8 },
|
|
336
|
+
header: { alignItems: 'flex-start', width: '100%', marginTop: 10 },
|
|
337
|
+
displayName: { fontSize: 24, marginBottom: 2, letterSpacing: 0.1 },
|
|
338
|
+
subText: { fontSize: 16, marginBottom: 2 },
|
|
339
|
+
bio: { fontSize: 16, marginTop: 10, lineHeight: 22 },
|
|
340
|
+
statsRow: {
|
|
341
|
+
width: '100%',
|
|
387
342
|
flexDirection: 'row',
|
|
388
343
|
alignItems: 'center',
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
},
|
|
392
|
-
infoGridText: {
|
|
393
|
-
fontSize: 15,
|
|
344
|
+
marginTop: 14,
|
|
345
|
+
justifyContent: 'space-between',
|
|
394
346
|
},
|
|
395
|
-
divider: { height: 1, width: '100%', marginVertical: 14 },
|
|
396
|
-
linksMore: {
|
|
397
|
-
fontSize: 15,
|
|
398
|
-
marginLeft: 4
|
|
399
|
-
},
|
|
400
|
-
statsRow: { width: '100%', flex: 1, flexDirection: 'row', alignItems: 'center', marginTop: 6, marginBottom: 2, justifyContent: 'space-between' },
|
|
401
347
|
statItem: { flex: 1, alignItems: 'center', minWidth: 50, marginBottom: 12 },
|
|
402
348
|
statLabel: { fontSize: 14, marginBottom: 2, textAlign: 'center' },
|
|
403
349
|
statAmount: { fontSize: 24, fontWeight: 'bold', textAlign: 'center', letterSpacing: 0.2 },
|
|
404
|
-
// Error
|
|
405
|
-
errorHeader: {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
borderBottomWidth: 1,
|
|
411
|
-
},
|
|
412
|
-
backButton: {
|
|
413
|
-
padding: 8,
|
|
414
|
-
marginRight: 16,
|
|
415
|
-
},
|
|
416
|
-
errorTitle: {
|
|
417
|
-
fontSize: 20,
|
|
418
|
-
fontWeight: 'bold',
|
|
419
|
-
},
|
|
420
|
-
errorContent: {
|
|
421
|
-
flex: 1,
|
|
422
|
-
justifyContent: 'center',
|
|
423
|
-
alignItems: 'center',
|
|
424
|
-
paddingHorizontal: 32,
|
|
425
|
-
},
|
|
426
|
-
errorIcon: {
|
|
427
|
-
marginBottom: 16,
|
|
428
|
-
},
|
|
429
|
-
errorText: {
|
|
430
|
-
fontSize: 18,
|
|
431
|
-
fontWeight: '600',
|
|
432
|
-
textAlign: 'center',
|
|
433
|
-
marginBottom: 8,
|
|
434
|
-
},
|
|
435
|
-
errorSubtext: {
|
|
436
|
-
fontSize: 14,
|
|
437
|
-
textAlign: 'center',
|
|
438
|
-
opacity: 0.7,
|
|
439
|
-
},
|
|
350
|
+
// Error state layout
|
|
351
|
+
errorHeader: { flexDirection: 'row', alignItems: 'center', gap: 16 },
|
|
352
|
+
errorTitle: { fontSize: 20 },
|
|
353
|
+
errorContent: { flex: 1, justifyContent: 'center', alignItems: 'center' },
|
|
354
|
+
errorText: { fontSize: 18, fontWeight: '600', textAlign: 'center' },
|
|
355
|
+
errorSubtext: { fontSize: 14, textAlign: 'center' },
|
|
440
356
|
});
|
|
441
357
|
|
|
442
358
|
export default ProfileScreen;
|