@oxyhq/services 5.11.9 → 5.11.11
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/ui/components/AnimationExample.js +213 -0
- package/lib/commonjs/ui/components/AnimationExample.js.map +1 -0
- package/lib/commonjs/ui/components/FollowButton.js +58 -47
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedItem.js +2 -1
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedSection.js +3 -0
- package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js +26 -12
- package/lib/commonjs/ui/components/Header.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +69 -33
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js +5 -1
- package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
- package/lib/commonjs/ui/components/StepBasedScreen.README.md +337 -0
- package/lib/commonjs/ui/components/StepBasedScreen.js +361 -0
- package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -0
- package/lib/commonjs/ui/components/icon/OxyIcon.js +3 -3
- package/lib/commonjs/ui/components/icon/OxyIcon.js.map +1 -1
- package/lib/commonjs/ui/components/index.js +0 -7
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
- package/lib/commonjs/ui/components/internal/TextField.js +8 -4
- package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
- package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js +161 -0
- package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +103 -44
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.types.js +2 -0
- package/lib/commonjs/ui/hooks/useFollow.types.js.map +1 -0
- package/lib/commonjs/ui/navigation/OxyRouter.js +10 -0
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +26 -14
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +3 -3
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +64 -15
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +4 -4
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +72 -75
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +286 -126
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +322 -0
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/ProfileScreen.js +56 -56
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js +87 -219
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +176 -174
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +138 -244
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +143 -744
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +386 -0
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +25 -15
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +16 -9
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js +110 -0
- package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js +138 -0
- package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js +141 -0
- package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js +165 -0
- package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js +150 -0
- package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js +171 -0
- package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js +163 -0
- package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js +170 -0
- package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js +72 -0
- package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js.map +1 -0
- package/lib/commonjs/ui/styles/authStyles.js +1 -1
- package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
- package/lib/module/ui/components/AnimationExample.js +209 -0
- package/lib/module/ui/components/AnimationExample.js.map +1 -0
- package/lib/module/ui/components/FollowButton.js +58 -47
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/GroupedItem.js +2 -1
- package/lib/module/ui/components/GroupedItem.js.map +1 -1
- package/lib/module/ui/components/GroupedSection.js +3 -0
- package/lib/module/ui/components/GroupedSection.js.map +1 -1
- package/lib/module/ui/components/Header.js +26 -12
- package/lib/module/ui/components/Header.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +70 -34
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +5 -1
- package/lib/module/ui/components/ProfileCard.js.map +1 -1
- package/lib/module/ui/components/Section.js.map +1 -1
- package/lib/module/ui/components/SectionTitle.js.map +1 -1
- package/lib/module/ui/components/StepBasedScreen.README.md +337 -0
- package/lib/module/ui/components/StepBasedScreen.js +356 -0
- package/lib/module/ui/components/StepBasedScreen.js.map +1 -0
- package/lib/module/ui/components/icon/FAIRWalletIcon.js.map +1 -1
- package/lib/module/ui/components/icon/OxyIcon.js +3 -3
- package/lib/module/ui/components/icon/OxyIcon.js.map +1 -1
- package/lib/module/ui/components/index.js +0 -1
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/internal/PinInput.js +1 -1
- package/lib/module/ui/components/internal/PinInput.js.map +1 -1
- package/lib/module/ui/components/internal/TextField.js +8 -4
- package/lib/module/ui/components/internal/TextField.js.map +1 -1
- package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js +156 -0
- package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +103 -45
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/useFollow.types.js +2 -0
- package/lib/module/ui/hooks/useFollow.types.js.map +1 -0
- package/lib/module/ui/navigation/OxyRouter.js +10 -0
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +12 -1
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +3 -3
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +64 -15
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +4 -4
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +72 -75
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +285 -125
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +319 -0
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -0
- package/lib/module/ui/screens/ProfileScreen.js +56 -56
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/RecoverAccountScreen.js +91 -222
- package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +177 -175
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +140 -246
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +145 -745
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +382 -0
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -0
- package/lib/module/ui/screens/internal/SignInPasswordStep.js +23 -14
- package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInUsernameStep.js +15 -9
- package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/steps/RecoverRequestStep.js +105 -0
- package/lib/module/ui/screens/steps/RecoverRequestStep.js.map +1 -0
- package/lib/module/ui/screens/steps/RecoverSuccessStep.js +133 -0
- package/lib/module/ui/screens/steps/RecoverSuccessStep.js.map +1 -0
- package/lib/module/ui/screens/steps/RecoverVerifyStep.js +136 -0
- package/lib/module/ui/screens/steps/RecoverVerifyStep.js.map +1 -0
- package/lib/module/ui/screens/steps/SignInPasswordStep.js +160 -0
- package/lib/module/ui/screens/steps/SignInPasswordStep.js.map +1 -0
- package/lib/module/ui/screens/steps/SignInUsernameStep.js +145 -0
- package/lib/module/ui/screens/steps/SignInUsernameStep.js.map +1 -0
- package/lib/module/ui/screens/steps/SignUpIdentityStep.js +166 -0
- package/lib/module/ui/screens/steps/SignUpIdentityStep.js.map +1 -0
- package/lib/module/ui/screens/steps/SignUpSecurityStep.js +158 -0
- package/lib/module/ui/screens/steps/SignUpSecurityStep.js.map +1 -0
- package/lib/module/ui/screens/steps/SignUpSummaryStep.js +165 -0
- package/lib/module/ui/screens/steps/SignUpSummaryStep.js.map +1 -0
- package/lib/module/ui/screens/steps/SignUpWelcomeStep.js +67 -0
- package/lib/module/ui/screens/steps/SignUpWelcomeStep.js.map +1 -0
- package/lib/module/ui/styles/authStyles.js +1 -1
- package/lib/module/ui/styles/authStyles.js.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +5 -8
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/models/session.d.ts +1 -4
- package/lib/typescript/models/session.d.ts.map +1 -1
- package/lib/typescript/ui/components/AnimationExample.d.ts +4 -0
- package/lib/typescript/ui/components/AnimationExample.d.ts.map +1 -0
- package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
- package/lib/typescript/ui/components/Header.d.ts +9 -0
- package/lib/typescript/ui/components/Header.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyPayButton.d.ts +2 -2
- package/lib/typescript/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/ProfileCard.d.ts +1 -3
- package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -1
- package/lib/typescript/ui/components/Section.d.ts +2 -1
- package/lib/typescript/ui/components/Section.d.ts.map +1 -1
- package/lib/typescript/ui/components/SectionTitle.d.ts +2 -1
- package/lib/typescript/ui/components/SectionTitle.d.ts.map +1 -1
- package/lib/typescript/ui/components/StepBasedScreen.d.ts +24 -0
- package/lib/typescript/ui/components/StepBasedScreen.d.ts.map +1 -0
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts +2 -1
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts.map +1 -1
- package/lib/typescript/ui/components/icon/OxyIcon.d.ts +1 -1
- package/lib/typescript/ui/components/icon/OxyIcon.d.ts.map +1 -1
- package/lib/typescript/ui/components/index.d.ts +0 -1
- package/lib/typescript/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/PinInput.d.ts +9 -1
- package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
- package/lib/typescript/ui/components/photogrid/JustifiedPhotoGrid.d.ts +27 -0
- package/lib/typescript/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -0
- package/lib/typescript/ui/context/OxyContext.d.ts +8 -3
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useFollow.types.d.ts +33 -0
- package/lib/typescript/ui/hooks/useFollow.types.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +5 -0
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts +18 -1
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts +7 -0
- package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +2 -9
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignUpScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts +13 -0
- package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +5 -5
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +4 -4
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts +21 -0
- package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts +18 -0
- package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts +24 -0
- package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts +27 -0
- package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts +27 -0
- package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts +25 -0
- package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts +26 -0
- package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts +16 -0
- package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts +13 -0
- package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts.map +1 -0
- package/lib/typescript/ui/styles/authStyles.d.ts +1 -1
- package/package.json +10 -3
- package/src/models/interfaces.ts +7 -8
- package/src/models/session.ts +1 -4
- package/src/ui/components/AnimationExample.tsx +195 -0
- package/src/ui/components/FollowButton.tsx +65 -45
- package/src/ui/components/GroupedItem.tsx +1 -0
- package/src/ui/components/GroupedSection.tsx +1 -1
- package/src/ui/components/Header.tsx +37 -13
- package/src/ui/components/OxyPayButton.tsx +2 -2
- package/src/ui/components/OxyProvider.tsx +67 -33
- package/src/ui/components/ProfileCard.tsx +6 -8
- package/src/ui/components/Section.tsx +7 -7
- package/src/ui/components/SectionTitle.tsx +2 -2
- package/src/ui/components/StepBasedScreen.README.md +337 -0
- package/src/ui/components/StepBasedScreen.tsx +417 -0
- package/src/ui/components/icon/FAIRWalletIcon.tsx +2 -2
- package/src/ui/components/icon/OxyIcon.tsx +10 -11
- package/src/ui/components/index.ts +0 -1
- package/src/ui/components/internal/PinInput.tsx +13 -4
- package/src/ui/components/internal/TextField.tsx +12 -6
- package/src/ui/components/photogrid/JustifiedPhotoGrid.tsx +158 -0
- package/src/ui/context/OxyContext.tsx +90 -59
- package/src/ui/hooks/useFollow.types.ts +33 -0
- package/src/ui/navigation/OxyRouter.tsx +10 -0
- package/src/ui/navigation/types.ts +6 -0
- package/src/ui/screens/AccountCenterScreen.tsx +13 -7
- package/src/ui/screens/AccountOverviewScreen.tsx +3 -3
- package/src/ui/screens/AccountSettingsScreen.tsx +65 -13
- package/src/ui/screens/AccountSwitcherScreen.tsx +4 -4
- package/src/ui/screens/FeedbackScreen.tsx +57 -80
- package/src/ui/screens/FileManagementScreen.tsx +278 -175
- package/src/ui/screens/LanguageSelectorScreen.tsx +322 -0
- package/src/ui/screens/PaymentGatewayScreen.tsx +2 -2
- package/src/ui/screens/ProfileScreen.tsx +60 -55
- package/src/ui/screens/RecoverAccountScreen.tsx +98 -211
- package/src/ui/screens/SessionManagementScreen.tsx +148 -151
- package/src/ui/screens/SignInScreen.tsx +148 -290
- package/src/ui/screens/SignUpScreen.tsx +147 -751
- package/src/ui/screens/WelcomeNewUserScreen.tsx +272 -0
- package/src/ui/screens/internal/SignInPasswordStep.tsx +28 -13
- package/src/ui/screens/internal/SignInUsernameStep.tsx +21 -11
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +1 -1
- package/src/ui/screens/steps/RecoverRequestStep.tsx +130 -0
- package/src/ui/screens/steps/RecoverSuccessStep.tsx +131 -0
- package/src/ui/screens/steps/RecoverVerifyStep.tsx +153 -0
- package/src/ui/screens/steps/SignInPasswordStep.tsx +172 -0
- package/src/ui/screens/steps/SignInUsernameStep.tsx +176 -0
- package/src/ui/screens/steps/SignUpIdentityStep.tsx +204 -0
- package/src/ui/screens/steps/SignUpSecurityStep.tsx +191 -0
- package/src/ui/screens/steps/SignUpSummaryStep.tsx +130 -0
- package/src/ui/screens/steps/SignUpWelcomeStep.tsx +65 -0
- package/src/ui/styles/authStyles.ts +1 -1
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import {
|
|
4
|
+
View,
|
|
5
|
+
Text,
|
|
6
|
+
TouchableOpacity,
|
|
7
|
+
StyleSheet,
|
|
8
|
+
ScrollView,
|
|
9
|
+
Alert,
|
|
10
|
+
} from 'react-native';
|
|
11
|
+
import type { BaseScreenProps } from '../navigation/types';
|
|
12
|
+
import { useOxy } from '../context/OxyContext';
|
|
13
|
+
import { useThemeColors } from '../styles';
|
|
14
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
15
|
+
import { toast } from '../../lib/sonner';
|
|
16
|
+
import { Header, GroupedSection } from '../components';
|
|
17
|
+
|
|
18
|
+
// Supported languages with their metadata
|
|
19
|
+
const SUPPORTED_LANGUAGES = [
|
|
20
|
+
{
|
|
21
|
+
id: 'en',
|
|
22
|
+
name: 'English',
|
|
23
|
+
nativeName: 'English',
|
|
24
|
+
flag: '🇺🇸',
|
|
25
|
+
icon: 'language-outline',
|
|
26
|
+
color: '#007AFF',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: 'es',
|
|
30
|
+
name: 'Spanish',
|
|
31
|
+
nativeName: 'Español',
|
|
32
|
+
flag: '🇪🇸',
|
|
33
|
+
icon: 'language-outline',
|
|
34
|
+
color: '#FF3B30',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: 'fr',
|
|
38
|
+
name: 'French',
|
|
39
|
+
nativeName: 'Français',
|
|
40
|
+
flag: '🇫🇷',
|
|
41
|
+
icon: 'language-outline',
|
|
42
|
+
color: '#5856D6',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 'de',
|
|
46
|
+
name: 'German',
|
|
47
|
+
nativeName: 'Deutsch',
|
|
48
|
+
flag: '🇩🇪',
|
|
49
|
+
icon: 'language-outline',
|
|
50
|
+
color: '#FF9500',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: 'it',
|
|
54
|
+
name: 'Italian',
|
|
55
|
+
nativeName: 'Italiano',
|
|
56
|
+
flag: '🇮🇹',
|
|
57
|
+
icon: 'language-outline',
|
|
58
|
+
color: '#34C759',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: 'pt',
|
|
62
|
+
name: 'Portuguese',
|
|
63
|
+
nativeName: 'Português',
|
|
64
|
+
flag: '🇵🇹',
|
|
65
|
+
icon: 'language-outline',
|
|
66
|
+
color: '#AF52DE',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 'ja',
|
|
70
|
+
name: 'Japanese',
|
|
71
|
+
nativeName: '日本語',
|
|
72
|
+
flag: '🇯🇵',
|
|
73
|
+
icon: 'language-outline',
|
|
74
|
+
color: '#FF2D92',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'ko',
|
|
78
|
+
name: 'Korean',
|
|
79
|
+
nativeName: '한국어',
|
|
80
|
+
flag: '🇰🇷',
|
|
81
|
+
icon: 'language-outline',
|
|
82
|
+
color: '#32D74B',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 'zh',
|
|
86
|
+
name: 'Chinese',
|
|
87
|
+
nativeName: '中文',
|
|
88
|
+
flag: '🇨🇳',
|
|
89
|
+
icon: 'language-outline',
|
|
90
|
+
color: '#FF9F0A',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: 'ar',
|
|
94
|
+
name: 'Arabic',
|
|
95
|
+
nativeName: 'العربية',
|
|
96
|
+
flag: '🇸🇦',
|
|
97
|
+
icon: 'language-outline',
|
|
98
|
+
color: '#30B0C7',
|
|
99
|
+
},
|
|
100
|
+
];
|
|
101
|
+
|
|
102
|
+
interface LanguageSelectorScreenProps extends BaseScreenProps { }
|
|
103
|
+
|
|
104
|
+
const LanguageSelectorScreen: React.FC<LanguageSelectorScreenProps> = ({
|
|
105
|
+
goBack,
|
|
106
|
+
theme,
|
|
107
|
+
navigate,
|
|
108
|
+
}) => {
|
|
109
|
+
const { user, currentLanguage, setLanguage } = useOxy();
|
|
110
|
+
const colors = useThemeColors(theme);
|
|
111
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
112
|
+
|
|
113
|
+
const handleLanguageSelect = async (languageId: string) => {
|
|
114
|
+
if (languageId === currentLanguage) {
|
|
115
|
+
return; // Already selected
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
setIsLoading(true);
|
|
119
|
+
|
|
120
|
+
try {
|
|
121
|
+
// Use OxyContext to set language (this handles storage and app-wide updates)
|
|
122
|
+
await setLanguage(languageId);
|
|
123
|
+
|
|
124
|
+
const selectedLang = SUPPORTED_LANGUAGES.find(lang => lang.id === languageId);
|
|
125
|
+
toast.success(`Language changed to ${selectedLang?.name || languageId}`);
|
|
126
|
+
|
|
127
|
+
setIsLoading(false);
|
|
128
|
+
goBack();
|
|
129
|
+
|
|
130
|
+
} catch (error) {
|
|
131
|
+
console.error('Error saving language preference:', error);
|
|
132
|
+
toast.error('Failed to save language preference');
|
|
133
|
+
setIsLoading(false);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
// Create grouped items for the language list
|
|
138
|
+
const languageItems = SUPPORTED_LANGUAGES.map(language => ({
|
|
139
|
+
id: language.id,
|
|
140
|
+
title: language.name,
|
|
141
|
+
subtitle: language.nativeName,
|
|
142
|
+
icon: language.icon,
|
|
143
|
+
iconColor: language.color,
|
|
144
|
+
selected: currentLanguage === language.id,
|
|
145
|
+
onPress: () => handleLanguageSelect(language.id),
|
|
146
|
+
customContent: (
|
|
147
|
+
<View style={styles.languageFlag}>
|
|
148
|
+
<Text style={styles.flagEmoji}>{language.flag}</Text>
|
|
149
|
+
</View>
|
|
150
|
+
),
|
|
151
|
+
}));
|
|
152
|
+
|
|
153
|
+
return (
|
|
154
|
+
<View style={[styles.container, { backgroundColor: colors.background }]}>
|
|
155
|
+
<Header
|
|
156
|
+
title="Language"
|
|
157
|
+
subtitle="Choose your preferred language"
|
|
158
|
+
theme={theme}
|
|
159
|
+
onBack={goBack}
|
|
160
|
+
elevation="subtle"
|
|
161
|
+
/>
|
|
162
|
+
|
|
163
|
+
<ScrollView style={styles.content} showsVerticalScrollIndicator={false}>
|
|
164
|
+
<View style={styles.section}>
|
|
165
|
+
<Text style={[styles.sectionTitle, { color: colors.secondaryText }]}>
|
|
166
|
+
Available Languages
|
|
167
|
+
</Text>
|
|
168
|
+
<Text style={[styles.sectionDescription, { color: colors.secondaryText }]}>
|
|
169
|
+
Select your preferred language. Changes will be applied across the entire application.
|
|
170
|
+
</Text>
|
|
171
|
+
|
|
172
|
+
<View style={styles.languageList}>
|
|
173
|
+
<GroupedSection
|
|
174
|
+
items={languageItems}
|
|
175
|
+
theme={theme}
|
|
176
|
+
/>
|
|
177
|
+
</View>
|
|
178
|
+
</View>
|
|
179
|
+
|
|
180
|
+
{/* Information section */}
|
|
181
|
+
<View style={styles.infoSection}>
|
|
182
|
+
<View style={[styles.infoCard, {
|
|
183
|
+
backgroundColor: colors.inputBackground,
|
|
184
|
+
borderColor: colors.border
|
|
185
|
+
}]}>
|
|
186
|
+
<View style={styles.infoHeader}>
|
|
187
|
+
<Ionicons name="information-circle" size={20} color={colors.primary} />
|
|
188
|
+
<Text style={[styles.infoTitle, { color: colors.text }]}>
|
|
189
|
+
Language Settings
|
|
190
|
+
</Text>
|
|
191
|
+
</View>
|
|
192
|
+
<Text style={[styles.infoText, { color: colors.secondaryText }]}>
|
|
193
|
+
• Language changes apply immediately{'\n'}
|
|
194
|
+
• Your preference is saved automatically{'\n'}
|
|
195
|
+
• All text and interface elements will update{'\n'}
|
|
196
|
+
• You can change this setting anytime
|
|
197
|
+
</Text>
|
|
198
|
+
</View>
|
|
199
|
+
</View>
|
|
200
|
+
|
|
201
|
+
{/* Current selection indicator */}
|
|
202
|
+
{currentLanguage && (
|
|
203
|
+
<View style={styles.currentSection}>
|
|
204
|
+
<Text style={[styles.currentLabel, { color: colors.secondaryText }]}>
|
|
205
|
+
Current Language
|
|
206
|
+
</Text>
|
|
207
|
+
<View style={[styles.currentLanguage, {
|
|
208
|
+
backgroundColor: colors.inputBackground,
|
|
209
|
+
borderColor: colors.primary
|
|
210
|
+
}]}>
|
|
211
|
+
{(() => {
|
|
212
|
+
const current = SUPPORTED_LANGUAGES.find(lang => lang.id === currentLanguage);
|
|
213
|
+
return current ? (
|
|
214
|
+
<>
|
|
215
|
+
<Text style={styles.currentFlag}>{current.flag}</Text>
|
|
216
|
+
<View style={styles.currentInfo}>
|
|
217
|
+
<Text style={[styles.currentName, { color: colors.text }]}>
|
|
218
|
+
{current.name}
|
|
219
|
+
</Text>
|
|
220
|
+
<Text style={[styles.currentNative, { color: colors.secondaryText }]}>
|
|
221
|
+
{current.nativeName}
|
|
222
|
+
</Text>
|
|
223
|
+
</View>
|
|
224
|
+
<Ionicons name="checkmark-circle" size={20} color={colors.primary} />
|
|
225
|
+
</>
|
|
226
|
+
) : null;
|
|
227
|
+
})()}
|
|
228
|
+
</View>
|
|
229
|
+
</View>
|
|
230
|
+
)}
|
|
231
|
+
</ScrollView>
|
|
232
|
+
</View>
|
|
233
|
+
);
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
const styles = StyleSheet.create({
|
|
237
|
+
container: {
|
|
238
|
+
flex: 1,
|
|
239
|
+
},
|
|
240
|
+
content: {
|
|
241
|
+
flex: 1,
|
|
242
|
+
padding: 16,
|
|
243
|
+
},
|
|
244
|
+
section: {
|
|
245
|
+
marginBottom: 24,
|
|
246
|
+
},
|
|
247
|
+
sectionTitle: {
|
|
248
|
+
fontSize: 16,
|
|
249
|
+
fontWeight: '600',
|
|
250
|
+
marginBottom: 4,
|
|
251
|
+
},
|
|
252
|
+
sectionDescription: {
|
|
253
|
+
fontSize: 14,
|
|
254
|
+
lineHeight: 20,
|
|
255
|
+
marginBottom: 16,
|
|
256
|
+
},
|
|
257
|
+
languageList: {
|
|
258
|
+
marginTop: 8,
|
|
259
|
+
},
|
|
260
|
+
languageFlag: {
|
|
261
|
+
alignItems: 'center',
|
|
262
|
+
justifyContent: 'center',
|
|
263
|
+
marginRight: 8,
|
|
264
|
+
},
|
|
265
|
+
flagEmoji: {
|
|
266
|
+
fontSize: 24,
|
|
267
|
+
},
|
|
268
|
+
infoSection: {
|
|
269
|
+
marginBottom: 24,
|
|
270
|
+
},
|
|
271
|
+
infoCard: {
|
|
272
|
+
padding: 16,
|
|
273
|
+
borderRadius: 12,
|
|
274
|
+
borderWidth: 1,
|
|
275
|
+
},
|
|
276
|
+
infoHeader: {
|
|
277
|
+
flexDirection: 'row',
|
|
278
|
+
alignItems: 'center',
|
|
279
|
+
marginBottom: 8,
|
|
280
|
+
},
|
|
281
|
+
infoTitle: {
|
|
282
|
+
fontSize: 16,
|
|
283
|
+
fontWeight: '600',
|
|
284
|
+
marginLeft: 8,
|
|
285
|
+
},
|
|
286
|
+
infoText: {
|
|
287
|
+
fontSize: 14,
|
|
288
|
+
lineHeight: 20,
|
|
289
|
+
},
|
|
290
|
+
currentSection: {
|
|
291
|
+
marginBottom: 24,
|
|
292
|
+
},
|
|
293
|
+
currentLabel: {
|
|
294
|
+
fontSize: 14,
|
|
295
|
+
fontWeight: '500',
|
|
296
|
+
marginBottom: 8,
|
|
297
|
+
},
|
|
298
|
+
currentLanguage: {
|
|
299
|
+
flexDirection: 'row',
|
|
300
|
+
alignItems: 'center',
|
|
301
|
+
padding: 16,
|
|
302
|
+
borderRadius: 12,
|
|
303
|
+
borderWidth: 2,
|
|
304
|
+
},
|
|
305
|
+
currentFlag: {
|
|
306
|
+
fontSize: 24,
|
|
307
|
+
marginRight: 12,
|
|
308
|
+
},
|
|
309
|
+
currentInfo: {
|
|
310
|
+
flex: 1,
|
|
311
|
+
},
|
|
312
|
+
currentName: {
|
|
313
|
+
fontSize: 16,
|
|
314
|
+
fontWeight: '600',
|
|
315
|
+
},
|
|
316
|
+
currentNative: {
|
|
317
|
+
fontSize: 14,
|
|
318
|
+
marginTop: 2,
|
|
319
|
+
},
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
export default LanguageSelectorScreen;
|
|
@@ -58,9 +58,9 @@ export type PaymentItem = {
|
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
// Extend props to accept onPaymentResult, amount, and currency
|
|
61
|
-
interface PaymentGatewayResult {
|
|
61
|
+
export interface PaymentGatewayResult {
|
|
62
62
|
success: boolean;
|
|
63
|
-
details?:
|
|
63
|
+
details?: Record<string, string | number | boolean | null>;
|
|
64
64
|
error?: string;
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -3,6 +3,7 @@ import { useEffect, useState } from 'react';
|
|
|
3
3
|
import { View, Text, StyleSheet, ActivityIndicator, ScrollView, TouchableOpacity, Image } from 'react-native';
|
|
4
4
|
import type { BaseScreenProps } from '../navigation/types';
|
|
5
5
|
import { useOxy } from '../context/OxyContext';
|
|
6
|
+
import { useThemeColors } from '../styles';
|
|
6
7
|
import Avatar from '../components/Avatar';
|
|
7
8
|
import { FollowButton } from '../components';
|
|
8
9
|
import { useFollow } from '../hooks/useFollow';
|
|
@@ -39,10 +40,8 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
39
40
|
setFollowingCount,
|
|
40
41
|
} = useFollow(userId);
|
|
41
42
|
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const textColor = isDarkTheme ? '#FFFFFF' : '#000000';
|
|
45
|
-
const primaryColor = '#d169e5';
|
|
43
|
+
const colors = useThemeColors(theme);
|
|
44
|
+
const styles = createStyles(colors);
|
|
46
45
|
|
|
47
46
|
// Check if current user is viewing their own profile
|
|
48
47
|
const isOwnProfile = currentUser && currentUser.id === userId;
|
|
@@ -154,27 +153,27 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
154
153
|
|
|
155
154
|
if (isLoading) {
|
|
156
155
|
return (
|
|
157
|
-
<View style={[styles.container, { backgroundColor, justifyContent: 'center' }]}>
|
|
158
|
-
<ActivityIndicator size="large" color={
|
|
156
|
+
<View style={[styles.container, { backgroundColor: colors.background, justifyContent: 'center' }]}>
|
|
157
|
+
<ActivityIndicator size="large" color={colors.primary} />
|
|
159
158
|
</View>
|
|
160
159
|
);
|
|
161
160
|
}
|
|
162
161
|
|
|
163
162
|
if (error) {
|
|
164
163
|
return (
|
|
165
|
-
<View style={[styles.container, { backgroundColor }]}>
|
|
164
|
+
<View style={[styles.container, { backgroundColor: colors.background }]}>
|
|
166
165
|
<View style={styles.errorHeader}>
|
|
167
166
|
{goBack && (
|
|
168
167
|
<TouchableOpacity onPress={goBack} style={styles.backButton}>
|
|
169
|
-
<Ionicons name="arrow-back" size={24} color={
|
|
168
|
+
<Ionicons name="arrow-back" size={24} color={colors.text} />
|
|
170
169
|
</TouchableOpacity>
|
|
171
170
|
)}
|
|
172
|
-
<Text style={[styles.errorTitle, { color:
|
|
171
|
+
<Text style={[styles.errorTitle, { color: colors.text }]}>Profile Error</Text>
|
|
173
172
|
</View>
|
|
174
173
|
<View style={styles.errorContent}>
|
|
175
|
-
<Ionicons name="alert-circle" size={48} color=
|
|
176
|
-
<Text style={[styles.errorText, { color:
|
|
177
|
-
<Text style={[styles.errorSubtext, { color:
|
|
174
|
+
<Ionicons name="alert-circle" size={48} color={colors.error} style={styles.errorIcon} />
|
|
175
|
+
<Text style={[styles.errorText, { color: colors.error }]}>{error}</Text>
|
|
176
|
+
<Text style={[styles.errorSubtext, { color: colors.secondaryText }]}>
|
|
178
177
|
This could happen if the user doesn't exist or the profile service is unavailable.
|
|
179
178
|
</Text>
|
|
180
179
|
</View>
|
|
@@ -183,7 +182,7 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
183
182
|
}
|
|
184
183
|
|
|
185
184
|
return (
|
|
186
|
-
<View style={[styles.container, { backgroundColor }]}>
|
|
185
|
+
<View style={[styles.container, { backgroundColor: colors.background }]}>
|
|
187
186
|
<ScrollView contentContainerStyle={styles.scrollContainer}>
|
|
188
187
|
{/* Banner Image */}
|
|
189
188
|
<View style={styles.bannerContainer}>
|
|
@@ -192,7 +191,12 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
192
191
|
{/* Avatar overlapping banner */}
|
|
193
192
|
<View style={styles.avatarRow}>
|
|
194
193
|
<View style={styles.avatarWrapper}>
|
|
195
|
-
<Avatar
|
|
194
|
+
<Avatar
|
|
195
|
+
uri={profile?.avatar ? oxyServices.getFileDownloadUrl(profile.avatar as string, 'thumb') : undefined}
|
|
196
|
+
name={profile?.username || username}
|
|
197
|
+
size={96}
|
|
198
|
+
theme={theme}
|
|
199
|
+
/>
|
|
196
200
|
</View>
|
|
197
201
|
{/* Conditional Action Button */}
|
|
198
202
|
<View style={styles.actionButtonWrapper}>
|
|
@@ -217,55 +221,55 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
217
221
|
</View>
|
|
218
222
|
{/* Profile Info */}
|
|
219
223
|
<View style={styles.header}>
|
|
220
|
-
<Text style={[styles.displayName, { color:
|
|
224
|
+
<Text style={[styles.displayName, { color: colors.text }]}>{profile?.displayName || profile?.username || username || profile?.id}</Text>
|
|
221
225
|
{profile?.username && (
|
|
222
|
-
<Text style={[styles.subText, { color:
|
|
226
|
+
<Text style={[styles.subText, { color: colors.secondaryText }]}>@{profile.username}</Text>
|
|
223
227
|
)}
|
|
224
228
|
{/* Bio placeholder */}
|
|
225
|
-
<Text style={[styles.bio, { color:
|
|
229
|
+
<Text style={[styles.bio, { color: colors.text }]}>{profile?.bio || 'This user has no bio yet.'}</Text>
|
|
226
230
|
|
|
227
231
|
{/* Info Grid Row */}
|
|
228
232
|
<View style={styles.infoGrid}>
|
|
229
233
|
{profile?.createdAt && (
|
|
230
234
|
<View style={styles.infoGridItem}>
|
|
231
|
-
<Ionicons name="calendar-outline" size={16} color={
|
|
232
|
-
<Text style={[styles.infoGridText, { color:
|
|
235
|
+
<Ionicons name="calendar-outline" size={16} color={colors.secondaryText} style={{ marginRight: 6 }} />
|
|
236
|
+
<Text style={[styles.infoGridText, { color: colors.secondaryText }]}>Joined {new Date(profile.createdAt).toLocaleDateString()}</Text>
|
|
233
237
|
</View>
|
|
234
238
|
)}
|
|
235
239
|
{profile?.location && (
|
|
236
240
|
<View style={styles.infoGridItem}>
|
|
237
|
-
<Ionicons name="location-outline" size={16} color={
|
|
238
|
-
<Text style={[styles.infoGridText, { color:
|
|
241
|
+
<Ionicons name="location-outline" size={16} color={colors.secondaryText} style={{ marginRight: 6 }} />
|
|
242
|
+
<Text style={[styles.infoGridText, { color: colors.secondaryText }]} numberOfLines={1}>{profile.location}</Text>
|
|
239
243
|
</View>
|
|
240
244
|
)}
|
|
241
245
|
{profile?.website && (
|
|
242
246
|
<View style={styles.infoGridItem}>
|
|
243
|
-
<Ionicons name="globe-outline" size={16} color={
|
|
244
|
-
<Text style={[styles.infoGridText, { color:
|
|
247
|
+
<Ionicons name="globe-outline" size={16} color={colors.secondaryText} style={{ marginRight: 6 }} />
|
|
248
|
+
<Text style={[styles.infoGridText, { color: colors.secondaryText }]} numberOfLines={1}>{profile.website}</Text>
|
|
245
249
|
</View>
|
|
246
250
|
)}
|
|
247
251
|
{profile?.company && (
|
|
248
252
|
<View style={styles.infoGridItem}>
|
|
249
|
-
<Ionicons name="business-outline" size={16} color={
|
|
250
|
-
<Text style={[styles.infoGridText, { color:
|
|
253
|
+
<Ionicons name="business-outline" size={16} color={colors.secondaryText} style={{ marginRight: 6 }} />
|
|
254
|
+
<Text style={[styles.infoGridText, { color: colors.secondaryText }]} numberOfLines={1}>{profile.company}</Text>
|
|
251
255
|
</View>
|
|
252
256
|
)}
|
|
253
257
|
{profile?.jobTitle && (
|
|
254
258
|
<View style={styles.infoGridItem}>
|
|
255
|
-
<Ionicons name="briefcase-outline" size={16} color={
|
|
256
|
-
<Text style={[styles.infoGridText, { color:
|
|
259
|
+
<Ionicons name="briefcase-outline" size={16} color={colors.secondaryText} style={{ marginRight: 6 }} />
|
|
260
|
+
<Text style={[styles.infoGridText, { color: colors.secondaryText }]} numberOfLines={1}>{profile.jobTitle}</Text>
|
|
257
261
|
</View>
|
|
258
262
|
)}
|
|
259
263
|
{profile?.education && (
|
|
260
264
|
<View style={styles.infoGridItem}>
|
|
261
|
-
<Ionicons name="school-outline" size={16} color={
|
|
262
|
-
<Text style={[styles.infoGridText, { color:
|
|
265
|
+
<Ionicons name="school-outline" size={16} color={colors.secondaryText} style={{ marginRight: 6 }} />
|
|
266
|
+
<Text style={[styles.infoGridText, { color: colors.secondaryText }]} numberOfLines={1}>{profile.education}</Text>
|
|
263
267
|
</View>
|
|
264
268
|
)}
|
|
265
269
|
{profile?.birthday && (
|
|
266
270
|
<View style={styles.infoGridItem}>
|
|
267
|
-
<Ionicons name="gift-outline" size={16} color={
|
|
268
|
-
<Text style={[styles.infoGridText, { color:
|
|
271
|
+
<Ionicons name="gift-outline" size={16} color={colors.secondaryText} style={{ marginRight: 6 }} />
|
|
272
|
+
<Text style={[styles.infoGridText, { color: colors.secondaryText }]}>Born {new Date(profile.birthday).toLocaleDateString()}</Text>
|
|
269
273
|
</View>
|
|
270
274
|
)}
|
|
271
275
|
{links.length > 0 && (
|
|
@@ -273,12 +277,12 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
273
277
|
style={styles.infoGridItem}
|
|
274
278
|
onPress={() => navigate?.('UserLinks', { userId, links })}
|
|
275
279
|
>
|
|
276
|
-
<Ionicons name="link-outline" size={16} color={
|
|
277
|
-
<Text style={[styles.infoGridText, { color:
|
|
280
|
+
<Ionicons name="link-outline" size={16} color={colors.secondaryText} style={{ marginRight: 6 }} />
|
|
281
|
+
<Text style={[styles.infoGridText, { color: colors.secondaryText }]} numberOfLines={1}>
|
|
278
282
|
{links[0].url}
|
|
279
283
|
</Text>
|
|
280
284
|
{links.length > 1 && (
|
|
281
|
-
<Text style={[styles.linksMore, { color:
|
|
285
|
+
<Text style={[styles.linksMore, { color: colors.secondaryText }]}>
|
|
282
286
|
+ {links.length - 1} more
|
|
283
287
|
</Text>
|
|
284
288
|
)}
|
|
@@ -290,24 +294,24 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
290
294
|
{/* All Stats in one row */}
|
|
291
295
|
<View style={styles.statsRow}>
|
|
292
296
|
<View style={styles.statItem}>
|
|
293
|
-
<Text style={[styles.karmaAmount, { color:
|
|
294
|
-
<Text style={[styles.karmaLabel, { color:
|
|
297
|
+
<Text style={[styles.karmaAmount, { color: colors.primary }]}>{karmaTotal !== null && karmaTotal !== undefined ? karmaTotal : '--'}</Text>
|
|
298
|
+
<Text style={[styles.karmaLabel, { color: colors.secondaryText }]}>Karma</Text>
|
|
295
299
|
</View>
|
|
296
300
|
<View style={styles.statItem}>
|
|
297
301
|
{isLoadingCounts ? (
|
|
298
|
-
<ActivityIndicator size="small" color={
|
|
302
|
+
<ActivityIndicator size="small" color={colors.text} />
|
|
299
303
|
) : (
|
|
300
|
-
<Text style={[styles.karmaAmount, { color:
|
|
304
|
+
<Text style={[styles.karmaAmount, { color: colors.text }]}>{followerCount !== null ? followerCount : '--'}</Text>
|
|
301
305
|
)}
|
|
302
|
-
<Text style={[styles.karmaLabel, { color:
|
|
306
|
+
<Text style={[styles.karmaLabel, { color: colors.secondaryText }]}>Followers</Text>
|
|
303
307
|
</View>
|
|
304
308
|
<View style={styles.statItem}>
|
|
305
309
|
{isLoadingCounts ? (
|
|
306
|
-
<ActivityIndicator size="small" color={
|
|
310
|
+
<ActivityIndicator size="small" color={colors.text} />
|
|
307
311
|
) : (
|
|
308
|
-
<Text style={[styles.karmaAmount, { color:
|
|
312
|
+
<Text style={[styles.karmaAmount, { color: colors.text }]}>{followingCount !== null ? followingCount : '--'}</Text>
|
|
309
313
|
)}
|
|
310
|
-
<Text style={[styles.karmaLabel, { color:
|
|
314
|
+
<Text style={[styles.karmaLabel, { color: colors.secondaryText }]}>Following</Text>
|
|
311
315
|
</View>
|
|
312
316
|
</View>
|
|
313
317
|
</View>
|
|
@@ -316,37 +320,37 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
316
320
|
);
|
|
317
321
|
};
|
|
318
322
|
|
|
319
|
-
const
|
|
323
|
+
const createStyles = (colors: any) => StyleSheet.create({
|
|
320
324
|
container: { flex: 1 },
|
|
321
325
|
scrollContainer: { alignItems: 'stretch', paddingBottom: 40 },
|
|
322
|
-
bannerContainer: { height: 160, backgroundColor: '
|
|
323
|
-
bannerImage: { flex: 1, backgroundColor:
|
|
326
|
+
bannerContainer: { height: 160, backgroundColor: colors.primary + '20', position: 'relative', overflow: 'hidden' },
|
|
327
|
+
bannerImage: { flex: 1, backgroundColor: colors.primary }, // Placeholder, replace with Image if available
|
|
324
328
|
avatarRow: { flexDirection: 'row', alignItems: 'flex-end', marginTop: -56, paddingHorizontal: 20, justifyContent: 'space-between', zIndex: 2 },
|
|
325
|
-
avatarWrapper: { borderWidth: 5, borderColor:
|
|
329
|
+
avatarWrapper: { borderWidth: 5, borderColor: colors.background, borderRadius: 64, overflow: 'hidden', backgroundColor: colors.background },
|
|
326
330
|
actionButtonWrapper: { flex: 1, alignItems: 'flex-end', justifyContent: 'flex-end' },
|
|
327
331
|
actionButton: {
|
|
328
|
-
backgroundColor:
|
|
332
|
+
backgroundColor: colors.background,
|
|
329
333
|
borderWidth: 1,
|
|
330
|
-
borderColor:
|
|
334
|
+
borderColor: colors.primary,
|
|
331
335
|
borderRadius: 24,
|
|
332
336
|
paddingVertical: 7,
|
|
333
337
|
paddingHorizontal: 22,
|
|
334
338
|
marginBottom: 8,
|
|
335
339
|
elevation: 2,
|
|
336
|
-
shadowColor:
|
|
340
|
+
shadowColor: colors.primary,
|
|
337
341
|
shadowOffset: { width: 0, height: 1 },
|
|
338
342
|
shadowOpacity: 0.08,
|
|
339
343
|
shadowRadius: 2
|
|
340
344
|
},
|
|
341
345
|
actionButtonText: {
|
|
342
|
-
color:
|
|
346
|
+
color: colors.primary,
|
|
343
347
|
fontWeight: 'bold',
|
|
344
348
|
fontSize: 16
|
|
345
349
|
},
|
|
346
350
|
header: { alignItems: 'flex-start', width: '100%', paddingHorizontal: 20 },
|
|
347
351
|
displayName: { fontSize: 24, fontWeight: 'bold', marginTop: 10, marginBottom: 2, letterSpacing: 0.1 },
|
|
348
|
-
subText: { fontSize: 16, marginBottom: 2, color:
|
|
349
|
-
bio: { fontSize: 16, marginTop: 10, marginBottom: 10, color:
|
|
352
|
+
subText: { fontSize: 16, marginBottom: 2, color: colors.secondaryText },
|
|
353
|
+
bio: { fontSize: 16, marginTop: 10, marginBottom: 10, color: colors.text, lineHeight: 22 },
|
|
350
354
|
infoGrid: {
|
|
351
355
|
flexDirection: 'row',
|
|
352
356
|
alignItems: 'center',
|
|
@@ -360,16 +364,17 @@ const styles = StyleSheet.create({
|
|
|
360
364
|
marginBottom: 4
|
|
361
365
|
},
|
|
362
366
|
infoGridText: {
|
|
363
|
-
fontSize: 15
|
|
367
|
+
fontSize: 15,
|
|
368
|
+
color: colors.text
|
|
364
369
|
},
|
|
365
|
-
divider: { height: 1, backgroundColor:
|
|
370
|
+
divider: { height: 1, backgroundColor: colors.border, width: '100%', marginVertical: 14 },
|
|
366
371
|
linksMore: {
|
|
367
372
|
fontSize: 15,
|
|
368
373
|
marginLeft: 4
|
|
369
374
|
},
|
|
370
375
|
statsRow: { width: '100%', flex: 1, flexDirection: 'row', alignItems: 'center', marginTop: 6, marginBottom: 2, justifyContent: 'space-between' },
|
|
371
376
|
statItem: { flex: 1, alignItems: 'center', minWidth: 50, marginBottom: 12 },
|
|
372
|
-
karmaLabel: { fontSize: 14, marginBottom: 2, textAlign: 'center', color:
|
|
377
|
+
karmaLabel: { fontSize: 14, marginBottom: 2, textAlign: 'center', color: colors.secondaryText },
|
|
373
378
|
karmaAmount: { fontSize: 24, fontWeight: 'bold', textAlign: 'center', letterSpacing: 0.2 },
|
|
374
379
|
// Error handling styles
|
|
375
380
|
errorHeader: {
|