@oxyhq/services 5.11.9 → 5.11.10
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 +25 -11
- 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/index.js +0 -7
- package/lib/commonjs/ui/components/index.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 +97 -38
- 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 +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.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 +43 -52
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +6 -4
- 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/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 +25 -11
- 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/index.js +0 -1
- package/lib/module/ui/components/index.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 +97 -39
- 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 +1 -1
- package/lib/module/ui/screens/ProfileScreen.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 +44 -53
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +6 -4
- 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/styles/authStyles.js +1 -1
- package/lib/module/ui/styles/authStyles.js.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +1 -5
- 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/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/index.d.ts +0 -1
- package/lib/typescript/ui/components/index.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 +6 -2
- 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/ProfileScreen.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.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/styles/authStyles.d.ts +1 -1
- package/package.json +10 -2
- package/src/models/interfaces.ts +2 -5
- package/src/models/session.ts +1 -4
- package/src/ui/components/AnimationExample.tsx +194 -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 +36 -12
- package/src/ui/components/OxyProvider.tsx +66 -32
- package/src/ui/components/ProfileCard.tsx +6 -8
- package/src/ui/components/index.ts +0 -1
- package/src/ui/components/internal/TextField.tsx +12 -6
- package/src/ui/components/photogrid/JustifiedPhotoGrid.tsx +158 -0
- package/src/ui/context/OxyContext.tsx +84 -54
- 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/ProfileScreen.tsx +6 -1
- package/src/ui/screens/SessionManagementScreen.tsx +148 -151
- package/src/ui/screens/SignInScreen.tsx +43 -62
- package/src/ui/screens/SignUpScreen.tsx +3 -5
- 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/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;
|
|
@@ -192,7 +192,12 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
192
192
|
{/* Avatar overlapping banner */}
|
|
193
193
|
<View style={styles.avatarRow}>
|
|
194
194
|
<View style={styles.avatarWrapper}>
|
|
195
|
-
<Avatar
|
|
195
|
+
<Avatar
|
|
196
|
+
uri={profile?.avatar ? oxyServices.getFileDownloadUrl(profile.avatar as string, 'thumb') : undefined}
|
|
197
|
+
name={profile?.username || username}
|
|
198
|
+
size={96}
|
|
199
|
+
theme={theme}
|
|
200
|
+
/>
|
|
196
201
|
</View>
|
|
197
202
|
{/* Conditional Action Button */}
|
|
198
203
|
<View style={styles.actionButtonWrapper}>
|