@oxyhq/services 5.3.11 → 5.4.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/README.md +21 -0
- package/lib/commonjs/assets/assets/icons/OxyServices.tsx +67 -0
- package/lib/commonjs/assets/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/commonjs/assets/icons/OxyServices.js +53 -0
- package/lib/commonjs/assets/icons/OxyServices.js.map +1 -0
- package/lib/commonjs/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/commonjs/core/index.js +119 -23
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js +2 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/lib/sonner.js +15 -11
- package/lib/commonjs/lib/sonner.js.map +1 -1
- package/lib/commonjs/node/index.js +2 -0
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedItem.js +109 -0
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -0
- package/lib/commonjs/ui/components/GroupedSection.js +33 -0
- package/lib/commonjs/ui/components/GroupedSection.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +95 -112
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js +124 -0
- package/lib/commonjs/ui/components/ProfileCard.js.map +1 -0
- package/lib/commonjs/ui/components/QuickActions.js +87 -0
- package/lib/commonjs/ui/components/QuickActions.js.map +1 -0
- package/lib/commonjs/ui/components/Section.js +36 -0
- package/lib/commonjs/ui/components/Section.js.map +1 -0
- package/lib/commonjs/ui/components/SectionTitle.js +35 -0
- package/lib/commonjs/ui/components/SectionTitle.js.map +1 -0
- package/lib/commonjs/ui/components/bottomSheet/index.js +6 -6
- package/lib/commonjs/ui/components/index.js +97 -0
- package/lib/commonjs/ui/components/index.js.map +1 -0
- package/lib/commonjs/ui/navigation/OxyRouter.js +20 -3
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +190 -207
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountManagementDemo.js +299 -0
- package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +669 -401
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +695 -498
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +451 -488
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +498 -185
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/BillingManagementScreen.js +636 -0
- package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js +2497 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +1620 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/ProfileScreen.js +117 -13
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +1 -1
- package/lib/commonjs/utils/polyfills.js +42 -0
- package/lib/commonjs/utils/polyfills.js.map +1 -0
- package/lib/module/assets/assets/icons/OxyServices.tsx +67 -0
- package/lib/module/assets/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/module/assets/icons/OxyServices.js +46 -0
- package/lib/module/assets/icons/OxyServices.js.map +1 -0
- package/lib/module/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/module/core/index.js +119 -23
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/lib/sonner.js +13 -1
- package/lib/module/lib/sonner.js.map +1 -1
- package/lib/module/node/index.js +3 -0
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/ui/components/GroupedItem.js +104 -0
- package/lib/module/ui/components/GroupedItem.js.map +1 -0
- package/lib/module/ui/components/GroupedSection.js +28 -0
- package/lib/module/ui/components/GroupedSection.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +97 -114
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +119 -0
- package/lib/module/ui/components/ProfileCard.js.map +1 -0
- package/lib/module/ui/components/QuickActions.js +82 -0
- package/lib/module/ui/components/QuickActions.js.map +1 -0
- package/lib/module/ui/components/Section.js +31 -0
- package/lib/module/ui/components/Section.js.map +1 -0
- package/lib/module/ui/components/SectionTitle.js +30 -0
- package/lib/module/ui/components/SectionTitle.js.map +1 -0
- package/lib/module/ui/components/bottomSheet/index.js +2 -5
- package/lib/module/ui/components/bottomSheet/index.js.map +1 -1
- package/lib/module/ui/components/index.js +18 -0
- package/lib/module/ui/components/index.js.map +1 -0
- package/lib/module/ui/navigation/OxyRouter.js +20 -3
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +191 -208
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountManagementDemo.js +296 -0
- package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -0
- package/lib/module/ui/screens/AccountOverviewScreen.js +671 -403
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +698 -501
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +450 -488
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +498 -186
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/BillingManagementScreen.js +631 -0
- package/lib/module/ui/screens/BillingManagementScreen.js.map +1 -0
- package/lib/module/ui/screens/FileManagementScreen.js +2492 -0
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +1615 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
- package/lib/module/ui/screens/ProfileScreen.js +118 -14
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +1 -1
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +1 -1
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/utils/polyfills.js +36 -0
- package/lib/module/utils/polyfills.js.map +1 -0
- package/lib/typescript/assets/icons/OxyServices.d.ts +29 -0
- package/lib/typescript/assets/icons/OxyServices.d.ts.map +1 -0
- package/lib/typescript/core/index.d.ts +26 -1
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/lib/sonner.d.ts +5 -1
- package/lib/typescript/lib/sonner.d.ts.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +1 -2
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/node/index.d.ts +1 -0
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts +17 -0
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts +19 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/ProfileCard.d.ts +20 -0
- package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -0
- package/lib/typescript/ui/components/QuickActions.d.ts +15 -0
- package/lib/typescript/ui/components/QuickActions.d.ts.map +1 -0
- package/lib/typescript/ui/components/Section.d.ts +11 -0
- package/lib/typescript/ui/components/Section.d.ts.map +1 -0
- package/lib/typescript/ui/components/SectionTitle.d.ts +9 -0
- package/lib/typescript/ui/components/SectionTitle.d.ts.map +1 -0
- package/lib/typescript/ui/components/bottomSheet/index.d.ts +3 -2
- package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/index.d.ts +13 -0
- package/lib/typescript/ui/components/index.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +8 -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/AccountManagementDemo.d.ts +8 -0
- package/lib/typescript/ui/screens/AccountManagementDemo.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts +1 -4
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts +8 -0
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.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/utils/polyfills.d.ts +6 -0
- package/lib/typescript/utils/polyfills.d.ts.map +1 -0
- package/package.json +11 -3
- package/src/__tests__/polyfills.test.ts +30 -0
- package/src/__tests__/setup.ts +43 -0
- package/src/__tests__/ui/screens/AccountSettingsScreen.test.tsx +8 -8
- package/src/assets/icons/OxyServices.tsx +67 -0
- package/src/assets/icons/logo_OxyServices.svg +1 -0
- package/src/core/index.ts +127 -19
- package/src/index.ts +3 -0
- package/src/lib/sonner.ts +10 -1
- package/src/models/interfaces.ts +1 -2
- package/src/node/index.ts +3 -0
- package/src/ui/components/GroupedItem.tsx +118 -0
- package/src/ui/components/GroupedSection.tsx +45 -0
- package/src/ui/components/OxyProvider.tsx +95 -120
- package/src/ui/components/ProfileCard.tsx +129 -0
- package/src/ui/components/QuickActions.tsx +90 -0
- package/src/ui/components/Section.tsx +37 -0
- package/src/ui/components/SectionTitle.tsx +31 -0
- package/src/ui/components/bottomSheet/index.tsx +13 -11
- package/src/ui/components/index.ts +15 -0
- package/src/ui/navigation/OxyRouter.tsx +20 -3
- package/src/ui/navigation/types.ts +10 -1
- package/src/ui/screens/AccountCenterScreen.tsx +188 -159
- package/src/ui/screens/AccountManagementDemo.tsx +297 -0
- package/src/ui/screens/AccountOverviewScreen.tsx +474 -310
- package/src/ui/screens/AccountSettingsScreen.tsx +648 -463
- package/src/ui/screens/AccountSwitcherScreen.tsx +385 -449
- package/src/ui/screens/AppInfoScreen.tsx +571 -140
- package/src/ui/screens/BillingManagementScreen.tsx +589 -0
- package/src/ui/screens/FileManagementScreen.tsx +2513 -0
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +1628 -0
- package/src/ui/screens/ProfileScreen.tsx +101 -7
- package/src/ui/screens/SessionManagementScreen.tsx +1 -0
- package/src/ui/screens/SignInScreen.tsx +1 -1
- package/src/ui/screens/SignUpScreen.tsx +1 -1
- package/src/utils/polyfills.ts +34 -0
- package/lib/commonjs/lib/sonner.web.js +0 -17
- package/lib/commonjs/lib/sonner.web.js.map +0 -1
- package/lib/module/lib/sonner.web.js +0 -4
- package/lib/module/lib/sonner.web.js.map +0 -1
- package/lib/typescript/__tests__/ui/screens/AccountSettingsScreen.test.d.ts +0 -2
- package/lib/typescript/__tests__/ui/screens/AccountSettingsScreen.test.d.ts.map +0 -1
- package/lib/typescript/lib/sonner.web.d.ts +0 -2
- package/lib/typescript/lib/sonner.web.d.ts.map +0 -1
- package/src/lib/sonner.web.ts +0 -1
|
@@ -8,13 +8,20 @@ import {
|
|
|
8
8
|
ScrollView,
|
|
9
9
|
Alert,
|
|
10
10
|
Platform,
|
|
11
|
-
TextStyle,
|
|
12
11
|
} from 'react-native';
|
|
13
12
|
import { BaseScreenProps } from '../navigation/types';
|
|
14
13
|
import { useOxy } from '../context/OxyContext';
|
|
15
|
-
import { fontFamilies } from '../styles/fonts';
|
|
16
14
|
import { packageInfo } from '../../constants/version';
|
|
17
15
|
import { toast } from '../../lib/sonner';
|
|
16
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
17
|
+
import { fontFamilies } from '../styles/fonts';
|
|
18
|
+
import {
|
|
19
|
+
ProfileCard,
|
|
20
|
+
Section,
|
|
21
|
+
QuickActions,
|
|
22
|
+
GroupedSection,
|
|
23
|
+
GroupedItem
|
|
24
|
+
} from '../components';
|
|
18
25
|
|
|
19
26
|
const AccountCenterScreen: React.FC<BaseScreenProps> = ({
|
|
20
27
|
onClose,
|
|
@@ -25,8 +32,8 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
25
32
|
|
|
26
33
|
const isDarkTheme = theme === 'dark';
|
|
27
34
|
const textColor = isDarkTheme ? '#FFFFFF' : '#000000';
|
|
28
|
-
const backgroundColor = isDarkTheme ? '#121212' : '#
|
|
29
|
-
const secondaryBackgroundColor = isDarkTheme ? '#222222' : '#
|
|
35
|
+
const backgroundColor = isDarkTheme ? '#121212' : '#f2f2f2';
|
|
36
|
+
const secondaryBackgroundColor = isDarkTheme ? '#222222' : '#FFFFFF';
|
|
30
37
|
const borderColor = isDarkTheme ? '#444444' : '#E0E0E0';
|
|
31
38
|
const primaryColor = '#0066CC';
|
|
32
39
|
const dangerColor = '#D32F2F';
|
|
@@ -80,97 +87,184 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
80
87
|
|
|
81
88
|
return (
|
|
82
89
|
<View style={[styles.container, { backgroundColor }]}>
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
<Text style={[styles.userEmail, { color: isDarkTheme ? '#BBBBBB' : '#666666' }]}>
|
|
92
|
-
{user.email}
|
|
93
|
-
</Text>
|
|
94
|
-
)}
|
|
95
|
-
</View>
|
|
90
|
+
{/* Header with user profile */}
|
|
91
|
+
<ProfileCard
|
|
92
|
+
user={user}
|
|
93
|
+
theme={theme}
|
|
94
|
+
onEditPress={() => navigate('AccountSettings', { activeTab: 'profile' })}
|
|
95
|
+
onClosePress={onClose}
|
|
96
|
+
showCloseButton={!!onClose}
|
|
97
|
+
/>
|
|
96
98
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
onPress
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
99
|
+
<ScrollView style={styles.scrollView} contentContainerStyle={styles.scrollContainer} showsVerticalScrollIndicator={false}>
|
|
100
|
+
{/* Quick Actions */}
|
|
101
|
+
<Section title="Quick Actions" theme={theme} isFirst={true}>
|
|
102
|
+
<QuickActions
|
|
103
|
+
actions={[
|
|
104
|
+
{ id: 'overview', icon: 'person-circle', iconColor: '#007AFF', title: 'Overview', onPress: () => navigate('AccountOverview') },
|
|
105
|
+
{ id: 'settings', icon: 'settings', iconColor: '#5856D6', title: 'Settings', onPress: () => navigate('AccountSettings') },
|
|
106
|
+
{ id: 'sessions', icon: 'shield-checkmark', iconColor: '#30D158', title: 'Sessions', onPress: () => navigate('SessionManagement') },
|
|
107
|
+
{ id: 'premium', icon: 'star', iconColor: '#FFD700', title: 'Premium', onPress: () => navigate('PremiumSubscription') },
|
|
108
|
+
...(user?.isPremium ? [{ id: 'billing', icon: 'card', iconColor: '#34C759', title: 'Billing', onPress: () => navigate('BillingManagement') }] : []),
|
|
109
|
+
...(sessions && sessions.length > 1 ? [{ id: 'switch', icon: 'swap-horizontal', iconColor: '#FF9500', title: 'Switch', onPress: () => navigate('AccountSwitcher') }] : []),
|
|
110
|
+
]}
|
|
111
|
+
theme={theme}
|
|
112
|
+
/>
|
|
113
|
+
</Section>
|
|
109
114
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
{/* Account Management */}
|
|
116
|
+
<Section title="Account Management" theme={theme}>
|
|
117
|
+
<GroupedSection
|
|
118
|
+
items={[
|
|
119
|
+
{
|
|
120
|
+
id: 'overview',
|
|
121
|
+
icon: 'person-circle',
|
|
122
|
+
iconColor: '#007AFF',
|
|
123
|
+
title: 'Account Overview',
|
|
124
|
+
subtitle: 'Complete account information',
|
|
125
|
+
onPress: () => navigate('AccountOverview'),
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: 'settings',
|
|
129
|
+
icon: 'settings',
|
|
130
|
+
iconColor: '#5856D6',
|
|
131
|
+
title: 'Account Settings',
|
|
132
|
+
subtitle: 'Manage your preferences',
|
|
133
|
+
onPress: () => navigate('AccountSettings'),
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: 'sessions',
|
|
137
|
+
icon: 'shield-checkmark',
|
|
138
|
+
iconColor: '#30D158',
|
|
139
|
+
title: 'Manage Sessions',
|
|
140
|
+
subtitle: 'Security and active devices',
|
|
141
|
+
onPress: () => navigate('SessionManagement'),
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
id: 'files',
|
|
145
|
+
icon: 'folder',
|
|
146
|
+
iconColor: '#FF9500',
|
|
147
|
+
title: 'File Management',
|
|
148
|
+
subtitle: 'Upload, download, and manage your files',
|
|
149
|
+
onPress: () => navigate('FileManagement'),
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
id: 'premium',
|
|
153
|
+
icon: 'star',
|
|
154
|
+
iconColor: '#FFD700',
|
|
155
|
+
title: 'Oxy+ Subscriptions',
|
|
156
|
+
subtitle: user?.isPremium ? 'Manage your premium plan' : 'Upgrade to premium features',
|
|
157
|
+
onPress: () => navigate('PremiumSubscription'),
|
|
158
|
+
},
|
|
159
|
+
...(user?.isPremium ? [{
|
|
160
|
+
id: 'billing',
|
|
161
|
+
icon: 'card',
|
|
162
|
+
iconColor: '#34C759',
|
|
163
|
+
title: 'Billing Management',
|
|
164
|
+
subtitle: 'Payment methods and invoices',
|
|
165
|
+
onPress: () => navigate('BillingManagement'),
|
|
166
|
+
}] : []),
|
|
167
|
+
]}
|
|
168
|
+
theme={theme}
|
|
169
|
+
/>
|
|
170
|
+
</Section>
|
|
117
171
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
172
|
+
{/* Multi-Account Management */}
|
|
173
|
+
{sessions && sessions.length > 1 && (
|
|
174
|
+
<Section title="Multi-Account" theme={theme}>
|
|
175
|
+
<GroupedSection
|
|
176
|
+
items={[
|
|
177
|
+
{
|
|
178
|
+
id: 'switch',
|
|
179
|
+
icon: 'people',
|
|
180
|
+
iconColor: '#FF9500',
|
|
181
|
+
title: 'Switch Account',
|
|
182
|
+
subtitle: `${sessions.length} accounts available`,
|
|
183
|
+
onPress: () => navigate('AccountSwitcher'),
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
id: 'add',
|
|
187
|
+
icon: 'person-add',
|
|
188
|
+
iconColor: '#30D158',
|
|
189
|
+
title: 'Add Another Account',
|
|
190
|
+
subtitle: 'Sign in with a different account',
|
|
191
|
+
onPress: () => navigate('SignIn'),
|
|
192
|
+
},
|
|
193
|
+
]}
|
|
194
|
+
theme={theme}
|
|
195
|
+
/>
|
|
196
|
+
</Section>
|
|
197
|
+
)}
|
|
124
198
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
199
|
+
{/* Single Account Setup */}
|
|
200
|
+
{(!sessions || sessions.length <= 1) && (
|
|
201
|
+
<Section title="Add Account" theme={theme}>
|
|
202
|
+
<GroupedSection
|
|
203
|
+
items={[
|
|
204
|
+
{
|
|
205
|
+
id: 'add',
|
|
206
|
+
icon: 'person-add',
|
|
207
|
+
iconColor: '#30D158',
|
|
208
|
+
title: 'Add Another Account',
|
|
209
|
+
subtitle: 'Sign in with a different account',
|
|
210
|
+
onPress: () => navigate('SignIn'),
|
|
211
|
+
},
|
|
212
|
+
]}
|
|
213
|
+
theme={theme}
|
|
214
|
+
/>
|
|
215
|
+
</Section>
|
|
216
|
+
)}
|
|
131
217
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
218
|
+
{/* Additional Options */}
|
|
219
|
+
<Section title="More Options" theme={theme}>
|
|
220
|
+
<GroupedSection
|
|
221
|
+
items={[
|
|
222
|
+
...(Platform.OS !== 'web' ? [{
|
|
223
|
+
id: 'notifications',
|
|
224
|
+
icon: 'notifications',
|
|
225
|
+
iconColor: '#FF9500',
|
|
226
|
+
title: 'Notifications',
|
|
227
|
+
subtitle: 'Manage notification settings',
|
|
228
|
+
onPress: () => toast.info('Notifications feature coming soon!'),
|
|
229
|
+
}] : []),
|
|
230
|
+
{
|
|
231
|
+
id: 'help',
|
|
232
|
+
icon: 'help-circle',
|
|
233
|
+
iconColor: '#007AFF',
|
|
234
|
+
title: 'Help & Support',
|
|
235
|
+
subtitle: 'Get help and contact support',
|
|
236
|
+
onPress: () => toast.info('Help & Support feature coming soon!'),
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
id: 'appinfo',
|
|
240
|
+
icon: 'information-circle',
|
|
241
|
+
iconColor: '#8E8E93',
|
|
242
|
+
title: 'App Information',
|
|
243
|
+
subtitle: 'Version and system details',
|
|
244
|
+
onPress: () => navigate('AppInfo'),
|
|
245
|
+
},
|
|
246
|
+
]}
|
|
247
|
+
theme={theme}
|
|
248
|
+
/>
|
|
249
|
+
</Section>
|
|
162
250
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
251
|
+
{/* Sign Out Section */}
|
|
252
|
+
<Section theme={theme}>
|
|
253
|
+
<GroupedItem
|
|
254
|
+
icon="log-out"
|
|
255
|
+
iconColor={dangerColor}
|
|
256
|
+
title={isLoading ? "Signing out..." : "Sign Out"}
|
|
257
|
+
theme={theme}
|
|
258
|
+
onPress={confirmLogout}
|
|
259
|
+
isFirst={true}
|
|
260
|
+
isLast={true}
|
|
261
|
+
showChevron={false}
|
|
262
|
+
disabled={isLoading}
|
|
263
|
+
customContent={isLoading ? (
|
|
264
|
+
<ActivityIndicator color={dangerColor} size="small" style={{ marginRight: 16 }} />
|
|
265
|
+
) : null}
|
|
266
|
+
/>
|
|
267
|
+
</Section>
|
|
174
268
|
|
|
175
269
|
<View style={styles.versionContainer}>
|
|
176
270
|
<Text style={[styles.versionText, { color: isDarkTheme ? '#666666' : '#999999' }]}>
|
|
@@ -178,12 +272,6 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
178
272
|
</Text>
|
|
179
273
|
</View>
|
|
180
274
|
</ScrollView>
|
|
181
|
-
|
|
182
|
-
<View style={styles.footer}>
|
|
183
|
-
<TouchableOpacity style={styles.closeButton} onPress={onClose}>
|
|
184
|
-
<Text style={[styles.closeButtonText, { color: primaryColor }]}>Close</Text>
|
|
185
|
-
</TouchableOpacity>
|
|
186
|
-
</View>
|
|
187
275
|
</View>
|
|
188
276
|
);
|
|
189
277
|
};
|
|
@@ -196,76 +284,17 @@ const styles = StyleSheet.create({
|
|
|
196
284
|
flex: 1,
|
|
197
285
|
},
|
|
198
286
|
scrollContainer: {
|
|
199
|
-
padding:
|
|
200
|
-
|
|
201
|
-
header: {
|
|
202
|
-
marginBottom: 24,
|
|
203
|
-
alignItems: 'center',
|
|
204
|
-
},
|
|
205
|
-
title: {
|
|
206
|
-
fontFamily: Platform.OS === 'web'
|
|
207
|
-
? 'Phudu' // Use CSS font name directly for web
|
|
208
|
-
: 'Phudu-Bold', // Use exact font name as registered with Font.loadAsync
|
|
209
|
-
fontWeight: Platform.OS === 'web' ? 'bold' : undefined, // Only apply fontWeight on web
|
|
210
|
-
fontSize: 24,
|
|
211
|
-
},
|
|
212
|
-
userInfoContainer: {
|
|
213
|
-
padding: 20,
|
|
214
|
-
borderRadius: 35,
|
|
215
|
-
borderWidth: 1,
|
|
216
|
-
marginBottom: 24,
|
|
217
|
-
alignItems: 'center',
|
|
218
|
-
},
|
|
219
|
-
userName: {
|
|
220
|
-
fontSize: 20,
|
|
221
|
-
fontWeight: 'bold',
|
|
222
|
-
marginBottom: 8,
|
|
223
|
-
},
|
|
224
|
-
userEmail: {
|
|
225
|
-
fontSize: 16,
|
|
226
|
-
},
|
|
227
|
-
actionsContainer: {
|
|
228
|
-
marginBottom: 24,
|
|
229
|
-
},
|
|
230
|
-
actionButton: {
|
|
231
|
-
paddingVertical: 16,
|
|
232
|
-
paddingHorizontal: 20,
|
|
233
|
-
borderBottomWidth: 1,
|
|
234
|
-
},
|
|
235
|
-
actionButtonText: {
|
|
236
|
-
fontSize: 16,
|
|
237
|
-
},
|
|
238
|
-
logoutButton: {
|
|
239
|
-
height: 50,
|
|
240
|
-
borderRadius: 35,
|
|
241
|
-
alignItems: 'center',
|
|
242
|
-
justifyContent: 'center',
|
|
243
|
-
marginBottom: 24,
|
|
244
|
-
},
|
|
245
|
-
logoutButtonText: {
|
|
246
|
-
fontSize: 16,
|
|
247
|
-
fontWeight: '600',
|
|
287
|
+
padding: 16,
|
|
288
|
+
paddingBottom: 20,
|
|
248
289
|
},
|
|
249
290
|
versionContainer: {
|
|
250
291
|
alignItems: 'center',
|
|
292
|
+
marginTop: 20,
|
|
251
293
|
marginBottom: 20,
|
|
252
294
|
},
|
|
253
295
|
versionText: {
|
|
254
|
-
fontSize:
|
|
255
|
-
|
|
256
|
-
footer: {
|
|
257
|
-
padding: 16,
|
|
258
|
-
borderTopWidth: 1,
|
|
259
|
-
borderTopColor: '#E0E0E0',
|
|
260
|
-
alignItems: 'center',
|
|
261
|
-
},
|
|
262
|
-
closeButton: {
|
|
263
|
-
paddingVertical: 8,
|
|
264
|
-
paddingHorizontal: 16,
|
|
265
|
-
},
|
|
266
|
-
closeButtonText: {
|
|
267
|
-
fontSize: 16,
|
|
268
|
-
fontWeight: '600',
|
|
296
|
+
fontSize: 12,
|
|
297
|
+
fontFamily: fontFamilies.phudu,
|
|
269
298
|
},
|
|
270
299
|
message: {
|
|
271
300
|
fontSize: 16,
|