@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
|
@@ -17,6 +17,9 @@ import { SecureClientSession } from '../../models/secureSession';
|
|
|
17
17
|
import { fontFamilies } from '../styles/fonts';
|
|
18
18
|
import { User } from '../../models/interfaces';
|
|
19
19
|
import { toast } from '../../lib/sonner';
|
|
20
|
+
import OxyIcon from '../components/icon/OxyIcon';
|
|
21
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
22
|
+
import Avatar from '../components/Avatar';
|
|
20
23
|
|
|
21
24
|
interface SessionWithUser extends SecureClientSession {
|
|
22
25
|
userProfile?: User;
|
|
@@ -214,44 +217,6 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
214
217
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
215
218
|
toast.error(`There was a problem signing out: ${errorMessage}`);
|
|
216
219
|
}
|
|
217
|
-
|
|
218
|
-
/* ORIGINAL CODE WITH CONFIRMATION - TEMPORARILY DISABLED
|
|
219
|
-
Alert.alert(
|
|
220
|
-
'Sign Out All',
|
|
221
|
-
'Are you sure you want to sign out of all accounts on this device?',
|
|
222
|
-
[
|
|
223
|
-
{
|
|
224
|
-
text: 'Cancel',
|
|
225
|
-
style: 'cancel',
|
|
226
|
-
onPress: () => {
|
|
227
|
-
console.log('🔴 User cancelled logout');
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
text: 'Sign Out All',
|
|
232
|
-
style: 'destructive',
|
|
233
|
-
onPress: async () => {
|
|
234
|
-
console.log('🔴 CONFIRMATION: User confirmed logout all - proceeding...');
|
|
235
|
-
try {
|
|
236
|
-
console.log('🔴 CONFIRMATION: About to call logoutAll()');
|
|
237
|
-
await logoutAll();
|
|
238
|
-
console.log('🔴 CONFIRMATION: logoutAll() completed successfully');
|
|
239
|
-
toast.success('All accounts signed out successfully!');
|
|
240
|
-
if (onClose) {
|
|
241
|
-
console.log('🔴 CONFIRMATION: Calling onClose');
|
|
242
|
-
onClose();
|
|
243
|
-
}
|
|
244
|
-
} catch (error) {
|
|
245
|
-
console.error('🔴 CONFIRMATION: Logout all failed:', error);
|
|
246
|
-
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
247
|
-
toast.error(`There was a problem signing out: ${errorMessage}`);
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
},
|
|
251
|
-
],
|
|
252
|
-
{ cancelable: true }
|
|
253
|
-
);
|
|
254
|
-
*/
|
|
255
220
|
};
|
|
256
221
|
|
|
257
222
|
// Device session management functions
|
|
@@ -342,331 +307,293 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
342
307
|
);
|
|
343
308
|
};
|
|
344
309
|
|
|
345
|
-
const renderDeviceSessionItem = (deviceSession: DeviceSession) => {
|
|
346
|
-
const isLoggingOut = remotingLogoutSessionId === deviceSession.sessionId;
|
|
347
|
-
|
|
348
|
-
return (
|
|
349
|
-
<View
|
|
350
|
-
key={deviceSession.sessionId}
|
|
351
|
-
style={[
|
|
352
|
-
styles.sessionCard,
|
|
353
|
-
{
|
|
354
|
-
backgroundColor: deviceSession.isCurrent ? colors.activeCard : colors.card,
|
|
355
|
-
borderColor: deviceSession.isCurrent ? colors.accent : colors.border,
|
|
356
|
-
borderWidth: deviceSession.isCurrent ? 2 : 1,
|
|
357
|
-
},
|
|
358
|
-
]}
|
|
359
|
-
>
|
|
360
|
-
<View style={styles.sessionHeader}>
|
|
361
|
-
<View style={styles.userInfo}>
|
|
362
|
-
<Text style={[styles.displayName, { color: colors.text }]} numberOfLines={1}>
|
|
363
|
-
{deviceSession.deviceName}
|
|
364
|
-
{deviceSession.isCurrent && (
|
|
365
|
-
<Text style={[styles.username, { color: colors.accent }]}>
|
|
366
|
-
{' (This Device)'}
|
|
367
|
-
</Text>
|
|
368
|
-
)}
|
|
369
|
-
</Text>
|
|
370
|
-
<Text style={[styles.username, { color: colors.secondaryText }]} numberOfLines={1}>
|
|
371
|
-
ID: ...{deviceSession.deviceId.slice(-8)}
|
|
372
|
-
</Text>
|
|
373
|
-
<Text style={[styles.lastActive, { color: colors.secondaryText }]} numberOfLines={1}>
|
|
374
|
-
Last active: {new Date(deviceSession.lastActive).toLocaleDateString()}
|
|
375
|
-
</Text>
|
|
376
|
-
</View>
|
|
377
|
-
|
|
378
|
-
{!deviceSession.isCurrent && (
|
|
379
|
-
<TouchableOpacity
|
|
380
|
-
style={[styles.removeButton, {
|
|
381
|
-
borderColor: colors.destructive,
|
|
382
|
-
backgroundColor: colors.background,
|
|
383
|
-
}]}
|
|
384
|
-
onPress={() => handleRemoteSessionLogout(deviceSession.sessionId, deviceSession.deviceName)}
|
|
385
|
-
disabled={isLoggingOut}
|
|
386
|
-
>
|
|
387
|
-
{isLoggingOut ? (
|
|
388
|
-
<ActivityIndicator color={colors.destructive} size="small" />
|
|
389
|
-
) : (
|
|
390
|
-
<Text style={[styles.removeButtonText, { color: colors.destructive }]}>
|
|
391
|
-
Sign Out
|
|
392
|
-
</Text>
|
|
393
|
-
)}
|
|
394
|
-
</TouchableOpacity>
|
|
395
|
-
)}
|
|
396
|
-
</View>
|
|
397
|
-
</View>
|
|
398
|
-
);
|
|
399
|
-
};
|
|
400
|
-
|
|
401
|
-
// Load device sessions when device management is shown
|
|
402
|
-
useEffect(() => {
|
|
403
|
-
if (showDeviceManagement && deviceSessions.length === 0) {
|
|
404
|
-
loadAllDeviceSessions();
|
|
405
|
-
}
|
|
406
|
-
}, [showDeviceManagement]);
|
|
407
|
-
|
|
408
|
-
const renderSessionItem = (sessionWithUser: SessionWithUser) => {
|
|
409
|
-
const isActive = sessionWithUser.sessionId === activeSessionId;
|
|
410
|
-
const isSwitching = switchingToUserId === sessionWithUser.sessionId;
|
|
411
|
-
const isRemoving = removingUserId === sessionWithUser.sessionId;
|
|
412
|
-
const { userProfile, isLoadingProfile } = sessionWithUser;
|
|
413
|
-
|
|
414
|
-
const displayName = typeof userProfile?.name === 'object'
|
|
415
|
-
? userProfile.name.full || userProfile.name.first || userProfile.username
|
|
416
|
-
: userProfile?.name || userProfile?.username || 'Unknown User';
|
|
417
|
-
const username = userProfile?.username || 'unknown';
|
|
418
|
-
const avatarUrl = userProfile?.avatar?.url;
|
|
419
|
-
|
|
420
|
-
return (
|
|
421
|
-
<View
|
|
422
|
-
key={sessionWithUser.sessionId}
|
|
423
|
-
style={[
|
|
424
|
-
styles.sessionCard,
|
|
425
|
-
{
|
|
426
|
-
backgroundColor: isActive ? colors.activeCard : colors.card,
|
|
427
|
-
borderColor: isActive ? colors.accent : colors.border,
|
|
428
|
-
borderWidth: isActive ? 2 : 1,
|
|
429
|
-
shadowColor: colors.shadow,
|
|
430
|
-
},
|
|
431
|
-
]}
|
|
432
|
-
>
|
|
433
|
-
<View style={styles.sessionHeader}>
|
|
434
|
-
<View style={styles.avatarContainer}>
|
|
435
|
-
{isLoadingProfile ? (
|
|
436
|
-
<View style={[styles.avatarPlaceholder, { backgroundColor: colors.surface }]}>
|
|
437
|
-
<ActivityIndicator size="small" color={colors.accent} />
|
|
438
|
-
</View>
|
|
439
|
-
) : avatarUrl ? (
|
|
440
|
-
<Image
|
|
441
|
-
source={{ uri: avatarUrl }}
|
|
442
|
-
style={styles.avatar}
|
|
443
|
-
/>
|
|
444
|
-
) : (
|
|
445
|
-
<View style={[styles.avatarPlaceholder, { backgroundColor: colors.surface }]}>
|
|
446
|
-
<Text style={[styles.avatarText, { color: colors.accent }]}>
|
|
447
|
-
{displayName.charAt(0).toUpperCase()}
|
|
448
|
-
</Text>
|
|
449
|
-
</View>
|
|
450
|
-
)}
|
|
451
|
-
{isActive && (
|
|
452
|
-
<View style={[styles.activeBadge, { backgroundColor: colors.success }]}>
|
|
453
|
-
<Text style={styles.activeBadgeText}>✓</Text>
|
|
454
|
-
</View>
|
|
455
|
-
)}
|
|
456
|
-
</View>
|
|
457
|
-
|
|
458
|
-
<View style={styles.userInfo}>
|
|
459
|
-
<Text style={[styles.displayName, { color: colors.text }]} numberOfLines={1}>
|
|
460
|
-
{displayName}
|
|
461
|
-
</Text>
|
|
462
|
-
<Text style={[styles.username, { color: colors.secondaryText }]} numberOfLines={1}>
|
|
463
|
-
@{username}
|
|
464
|
-
</Text>
|
|
465
|
-
<Text style={[styles.lastActive, { color: colors.secondaryText }]} numberOfLines={1}>
|
|
466
|
-
Last active: {new Date(sessionWithUser.lastActive).toLocaleDateString()}
|
|
467
|
-
</Text>
|
|
468
|
-
</View>
|
|
469
|
-
</View>
|
|
470
|
-
|
|
471
|
-
<View style={styles.sessionActions}>
|
|
472
|
-
{!isActive && (
|
|
473
|
-
<TouchableOpacity
|
|
474
|
-
style={[styles.switchButton, {
|
|
475
|
-
borderColor: colors.accent,
|
|
476
|
-
backgroundColor: colors.background,
|
|
477
|
-
}]}
|
|
478
|
-
onPress={() => handleSwitchSession(sessionWithUser.sessionId)}
|
|
479
|
-
disabled={isSwitching || isRemoving}
|
|
480
|
-
>
|
|
481
|
-
{isSwitching ? (
|
|
482
|
-
<ActivityIndicator color={colors.accent} size="small" />
|
|
483
|
-
) : (
|
|
484
|
-
<Text style={[styles.switchButtonText, { color: colors.accent }]}>
|
|
485
|
-
Switch
|
|
486
|
-
</Text>
|
|
487
|
-
)}
|
|
488
|
-
</TouchableOpacity>
|
|
489
|
-
)}
|
|
490
|
-
|
|
491
|
-
<TouchableOpacity
|
|
492
|
-
style={[styles.removeButton, {
|
|
493
|
-
borderColor: colors.destructive,
|
|
494
|
-
backgroundColor: colors.background,
|
|
495
|
-
}]}
|
|
496
|
-
onPress={() => handleRemoveSession(sessionWithUser.sessionId)}
|
|
497
|
-
disabled={isSwitching || isRemoving}
|
|
498
|
-
>
|
|
499
|
-
{isRemoving ? (
|
|
500
|
-
<ActivityIndicator color={colors.destructive} size="small" />
|
|
501
|
-
) : (
|
|
502
|
-
<Text style={[styles.removeButtonText, { color: colors.destructive }]}>
|
|
503
|
-
Remove
|
|
504
|
-
</Text>
|
|
505
|
-
)}
|
|
506
|
-
</TouchableOpacity>
|
|
507
|
-
</View>
|
|
508
|
-
</View>
|
|
509
|
-
);
|
|
510
|
-
};
|
|
511
|
-
|
|
512
310
|
return (
|
|
513
|
-
<View style={[styles.container, { backgroundColor:
|
|
311
|
+
<View style={[styles.container, { backgroundColor: '#f2f2f2' }]}>
|
|
312
|
+
{/* Header */}
|
|
514
313
|
<View style={styles.header}>
|
|
515
314
|
<TouchableOpacity style={styles.backButton} onPress={goBack}>
|
|
516
|
-
<
|
|
315
|
+
<OxyIcon name="chevron-back" size={24} color="#007AFF" />
|
|
517
316
|
</TouchableOpacity>
|
|
518
|
-
<Text style={
|
|
519
|
-
|
|
317
|
+
<Text style={styles.headerTitle}>Account Switcher</Text>
|
|
318
|
+
{onClose && (
|
|
319
|
+
<TouchableOpacity style={styles.closeButton} onPress={onClose}>
|
|
320
|
+
<Text style={styles.closeButtonText}>×</Text>
|
|
321
|
+
</TouchableOpacity>
|
|
322
|
+
)}
|
|
520
323
|
</View>
|
|
521
324
|
|
|
522
|
-
<ScrollView
|
|
523
|
-
style={styles.content}
|
|
524
|
-
showsVerticalScrollIndicator={false}
|
|
525
|
-
contentContainerStyle={styles.scrollContent}
|
|
526
|
-
>
|
|
325
|
+
<ScrollView style={styles.content}>
|
|
527
326
|
{isLoading ? (
|
|
528
327
|
<View style={styles.loadingContainer}>
|
|
529
|
-
<ActivityIndicator size="large" color=
|
|
530
|
-
<Text style={
|
|
531
|
-
Loading accounts...
|
|
532
|
-
</Text>
|
|
328
|
+
<ActivityIndicator size="large" color="#007AFF" />
|
|
329
|
+
<Text style={styles.loadingText}>Loading accounts...</Text>
|
|
533
330
|
</View>
|
|
534
331
|
) : (
|
|
535
332
|
<>
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
333
|
+
{/* Current Account */}
|
|
334
|
+
{user && (
|
|
335
|
+
<View style={styles.section}>
|
|
336
|
+
<Text style={styles.sectionTitle}>Current Account</Text>
|
|
337
|
+
|
|
338
|
+
<View style={[styles.settingItem, styles.firstSettingItem, styles.lastSettingItem, styles.currentAccountCard]}>
|
|
339
|
+
<View style={styles.userIcon}>
|
|
340
|
+
{user.avatar?.url ? (
|
|
341
|
+
<Image source={{ uri: user.avatar.url }} style={styles.accountAvatarImage} />
|
|
342
|
+
) : (
|
|
343
|
+
<View style={styles.accountAvatarFallback}>
|
|
344
|
+
<Text style={styles.accountAvatarText}>
|
|
345
|
+
{(typeof user.name === 'string' ? user.name : user.name?.first || user.username)?.charAt(0).toUpperCase()}
|
|
346
|
+
</Text>
|
|
347
|
+
</View>
|
|
348
|
+
)}
|
|
349
|
+
<View style={styles.activeBadge}>
|
|
350
|
+
<OxyIcon name="checkmark" size={12} color="#fff" />
|
|
351
|
+
</View>
|
|
352
|
+
</View>
|
|
353
|
+
<View style={styles.settingInfo}>
|
|
354
|
+
<View>
|
|
355
|
+
<Text style={styles.settingLabel}>
|
|
356
|
+
{typeof user.name === 'string' ? user.name : user.name?.full || user.name?.first || user.username}
|
|
357
|
+
</Text>
|
|
358
|
+
<Text style={styles.settingDescription}>{user.email || user.username}</Text>
|
|
359
|
+
</View>
|
|
360
|
+
</View>
|
|
361
|
+
<View style={styles.currentBadge}>
|
|
362
|
+
<Text style={styles.currentBadgeText}>Current</Text>
|
|
363
|
+
</View>
|
|
364
|
+
</View>
|
|
365
|
+
</View>
|
|
366
|
+
)}
|
|
367
|
+
|
|
368
|
+
{/* Other Accounts */}
|
|
369
|
+
{sessionsWithUsers.filter(s => s.sessionId !== activeSessionId).length > 0 && (
|
|
370
|
+
<View style={styles.section}>
|
|
371
|
+
<Text style={styles.sectionTitle}>
|
|
372
|
+
Other Accounts ({sessionsWithUsers.filter(s => s.sessionId !== activeSessionId).length})
|
|
544
373
|
</Text>
|
|
374
|
+
|
|
375
|
+
{sessionsWithUsers
|
|
376
|
+
.filter(s => s.sessionId !== activeSessionId)
|
|
377
|
+
.map((sessionWithUser, index, filteredArray) => {
|
|
378
|
+
const isFirst = index === 0;
|
|
379
|
+
const isLast = index === filteredArray.length - 1;
|
|
380
|
+
const isSwitching = switchingToUserId === sessionWithUser.sessionId;
|
|
381
|
+
const isRemoving = removingUserId === sessionWithUser.sessionId;
|
|
382
|
+
const { userProfile, isLoadingProfile } = sessionWithUser;
|
|
383
|
+
|
|
384
|
+
const displayName = typeof userProfile?.name === 'object'
|
|
385
|
+
? userProfile.name.full || userProfile.name.first || userProfile.username
|
|
386
|
+
: userProfile?.name || userProfile?.username || 'Unknown User';
|
|
387
|
+
|
|
388
|
+
return (
|
|
389
|
+
<View
|
|
390
|
+
key={sessionWithUser.sessionId}
|
|
391
|
+
style={[
|
|
392
|
+
styles.settingItem,
|
|
393
|
+
isFirst && styles.firstSettingItem,
|
|
394
|
+
isLast && styles.lastSettingItem,
|
|
395
|
+
]}
|
|
396
|
+
>
|
|
397
|
+
<View style={styles.userIcon}>
|
|
398
|
+
{isLoadingProfile ? (
|
|
399
|
+
<View style={styles.accountAvatarFallback}>
|
|
400
|
+
<ActivityIndicator size="small" color="#007AFF" />
|
|
401
|
+
</View>
|
|
402
|
+
) : userProfile?.avatar?.url ? (
|
|
403
|
+
<Image source={{ uri: userProfile.avatar.url }} style={styles.accountAvatarImage} />
|
|
404
|
+
) : (
|
|
405
|
+
<View style={styles.accountAvatarFallback}>
|
|
406
|
+
<Text style={styles.accountAvatarText}>
|
|
407
|
+
{displayName.charAt(0).toUpperCase()}
|
|
408
|
+
</Text>
|
|
409
|
+
</View>
|
|
410
|
+
)}
|
|
411
|
+
</View>
|
|
412
|
+
<View style={styles.settingInfo}>
|
|
413
|
+
<View>
|
|
414
|
+
<Text style={styles.settingLabel}>{displayName}</Text>
|
|
415
|
+
<Text style={styles.settingDescription}>
|
|
416
|
+
@{userProfile?.username || 'unknown'}
|
|
417
|
+
</Text>
|
|
418
|
+
</View>
|
|
419
|
+
</View>
|
|
420
|
+
<View style={styles.accountActions}>
|
|
421
|
+
<TouchableOpacity
|
|
422
|
+
style={styles.switchButton}
|
|
423
|
+
onPress={() => handleSwitchSession(sessionWithUser.sessionId)}
|
|
424
|
+
disabled={isSwitching || isRemoving}
|
|
425
|
+
>
|
|
426
|
+
{isSwitching ? (
|
|
427
|
+
<ActivityIndicator size="small" color="#007AFF" />
|
|
428
|
+
) : (
|
|
429
|
+
<Text style={styles.switchButtonText}>Switch</Text>
|
|
430
|
+
)}
|
|
431
|
+
</TouchableOpacity>
|
|
432
|
+
<TouchableOpacity
|
|
433
|
+
style={styles.removeButton}
|
|
434
|
+
onPress={() => handleRemoveSession(sessionWithUser.sessionId)}
|
|
435
|
+
disabled={isSwitching || isRemoving}
|
|
436
|
+
>
|
|
437
|
+
{isRemoving ? (
|
|
438
|
+
<ActivityIndicator size="small" color="#FF3B30" />
|
|
439
|
+
) : (
|
|
440
|
+
<OxyIcon name="trash" size={16} color="#FF3B30" />
|
|
441
|
+
)}
|
|
442
|
+
</TouchableOpacity>
|
|
443
|
+
</View>
|
|
444
|
+
</View>
|
|
445
|
+
);
|
|
446
|
+
})}
|
|
545
447
|
</View>
|
|
546
|
-
) : (
|
|
547
|
-
sessionsWithUsers.map(renderSessionItem)
|
|
548
448
|
)}
|
|
549
449
|
|
|
550
|
-
|
|
450
|
+
{/* Quick Actions */}
|
|
451
|
+
<View style={styles.section}>
|
|
452
|
+
<Text style={styles.sectionTitle}>Quick Actions</Text>
|
|
453
|
+
|
|
551
454
|
<TouchableOpacity
|
|
552
|
-
style={[styles.
|
|
553
|
-
borderColor: colors.border,
|
|
554
|
-
backgroundColor: colors.card,
|
|
555
|
-
}]}
|
|
455
|
+
style={[styles.settingItem, styles.firstSettingItem]}
|
|
556
456
|
onPress={() => navigate?.('SignIn')}
|
|
557
457
|
>
|
|
558
|
-
<
|
|
559
|
-
|
|
560
|
-
|
|
458
|
+
<View style={styles.settingInfo}>
|
|
459
|
+
<OxyIcon name="person-add" size={20} color="#007AFF" style={styles.settingIcon} />
|
|
460
|
+
<View>
|
|
461
|
+
<Text style={styles.settingLabel}>Add Another Account</Text>
|
|
462
|
+
<Text style={styles.settingDescription}>Sign in with a different account</Text>
|
|
463
|
+
</View>
|
|
464
|
+
</View>
|
|
465
|
+
<OxyIcon name="chevron-forward" size={16} color="#ccc" />
|
|
561
466
|
</TouchableOpacity>
|
|
562
467
|
|
|
563
|
-
{sessionsWithUsers.length > 0 && (
|
|
564
|
-
<TouchableOpacity
|
|
565
|
-
style={[styles.actionButton, styles.dangerButton, {
|
|
566
|
-
borderColor: colors.destructive,
|
|
567
|
-
backgroundColor: colors.background,
|
|
568
|
-
}]}
|
|
569
|
-
onPress={handleLogoutAll}
|
|
570
|
-
>
|
|
571
|
-
<Text style={[styles.dangerButtonText, { color: colors.destructive }]}>
|
|
572
|
-
Sign Out All Accounts
|
|
573
|
-
</Text>
|
|
574
|
-
</TouchableOpacity>
|
|
575
|
-
)}
|
|
576
|
-
</View>
|
|
577
|
-
|
|
578
|
-
{/* Device Management Section */}
|
|
579
|
-
<View style={styles.actionsSection}>
|
|
580
468
|
<TouchableOpacity
|
|
581
|
-
style={
|
|
582
|
-
borderColor: colors.border,
|
|
583
|
-
backgroundColor: colors.card,
|
|
584
|
-
}]}
|
|
469
|
+
style={styles.settingItem}
|
|
585
470
|
onPress={() => setShowDeviceManagement(!showDeviceManagement)}
|
|
586
471
|
>
|
|
587
|
-
<
|
|
588
|
-
|
|
589
|
-
|
|
472
|
+
<View style={styles.settingInfo}>
|
|
473
|
+
<OxyIcon name="devices" size={20} color="#5856D6" style={styles.settingIcon} />
|
|
474
|
+
<View>
|
|
475
|
+
<Text style={styles.settingLabel}>
|
|
476
|
+
{showDeviceManagement ? 'Hide' : 'Manage'} Device Sessions
|
|
477
|
+
</Text>
|
|
478
|
+
<Text style={styles.settingDescription}>
|
|
479
|
+
View and manage sessions on other devices
|
|
480
|
+
</Text>
|
|
481
|
+
</View>
|
|
482
|
+
</View>
|
|
483
|
+
<OxyIcon name="chevron-forward" size={16} color="#ccc" />
|
|
484
|
+
</TouchableOpacity>
|
|
485
|
+
|
|
486
|
+
<TouchableOpacity
|
|
487
|
+
style={[styles.settingItem, styles.lastSettingItem]}
|
|
488
|
+
onPress={handleLogoutAll}
|
|
489
|
+
disabled={sessionsWithUsers.length === 0}
|
|
490
|
+
>
|
|
491
|
+
<View style={styles.settingInfo}>
|
|
492
|
+
<OxyIcon name="log-out" size={20} color="#FF3B30" style={styles.settingIcon} />
|
|
493
|
+
<View>
|
|
494
|
+
<Text style={[styles.settingLabel, { color: sessionsWithUsers.length === 0 ? '#ccc' : '#FF3B30' }]}>
|
|
495
|
+
Sign Out All Accounts
|
|
496
|
+
</Text>
|
|
497
|
+
<Text style={styles.settingDescription}>
|
|
498
|
+
Remove all accounts from this device
|
|
499
|
+
</Text>
|
|
500
|
+
</View>
|
|
501
|
+
</View>
|
|
502
|
+
<OxyIcon name="chevron-forward" size={16} color="#ccc" />
|
|
590
503
|
</TouchableOpacity>
|
|
591
504
|
</View>
|
|
592
505
|
|
|
506
|
+
{/* Device Management Section */}
|
|
593
507
|
{showDeviceManagement && (
|
|
594
|
-
<View style={
|
|
595
|
-
|
|
596
|
-
borderColor: colors.border,
|
|
597
|
-
}]}>
|
|
598
|
-
<Text style={[styles.sectionTitle, { color: colors.text }]}>
|
|
599
|
-
Device Sessions
|
|
600
|
-
</Text>
|
|
508
|
+
<View style={styles.section}>
|
|
509
|
+
<Text style={styles.sectionTitle}>Device Sessions</Text>
|
|
601
510
|
|
|
602
511
|
{loadingDeviceSessions ? (
|
|
603
|
-
<View style={styles.
|
|
604
|
-
<
|
|
605
|
-
|
|
606
|
-
Loading device sessions
|
|
607
|
-
</
|
|
512
|
+
<View style={[styles.settingItem, styles.firstSettingItem, styles.lastSettingItem]}>
|
|
513
|
+
<View style={styles.loadingContainer}>
|
|
514
|
+
<ActivityIndicator size="small" color="#007AFF" />
|
|
515
|
+
<Text style={styles.loadingText}>Loading device sessions...</Text>
|
|
516
|
+
</View>
|
|
608
517
|
</View>
|
|
609
518
|
) : deviceSessions.length === 0 ? (
|
|
610
|
-
<View style={styles.
|
|
611
|
-
<
|
|
612
|
-
|
|
613
|
-
|
|
519
|
+
<View style={[styles.settingItem, styles.firstSettingItem, styles.lastSettingItem]}>
|
|
520
|
+
<View style={styles.settingInfo}>
|
|
521
|
+
<OxyIcon name="phone-portrait" size={20} color="#ccc" style={styles.settingIcon} />
|
|
522
|
+
<View>
|
|
523
|
+
<Text style={styles.settingLabel}>No device sessions found</Text>
|
|
524
|
+
<Text style={styles.settingDescription}>
|
|
525
|
+
Device session management not available
|
|
526
|
+
</Text>
|
|
527
|
+
</View>
|
|
528
|
+
</View>
|
|
614
529
|
</View>
|
|
615
530
|
) : (
|
|
616
531
|
<>
|
|
617
|
-
{deviceSessions.map(
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
}]}
|
|
626
|
-
onPress={handleLogoutAllDevices}
|
|
627
|
-
disabled={loggingOutAllDevices}
|
|
532
|
+
{deviceSessions.map((session, index) => (
|
|
533
|
+
<View
|
|
534
|
+
key={session.sessionId}
|
|
535
|
+
style={[
|
|
536
|
+
styles.settingItem,
|
|
537
|
+
index === 0 && styles.firstSettingItem,
|
|
538
|
+
index === deviceSessions.length - 1 && styles.lastSettingItem,
|
|
539
|
+
]}
|
|
628
540
|
>
|
|
629
|
-
{
|
|
630
|
-
<
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
541
|
+
<View style={styles.settingInfo}>
|
|
542
|
+
<OxyIcon
|
|
543
|
+
name={session.isCurrent ? "phone-portrait" : "phone-portrait-outline"}
|
|
544
|
+
size={20}
|
|
545
|
+
color={session.isCurrent ? "#34C759" : "#8E8E93"}
|
|
546
|
+
style={styles.settingIcon}
|
|
547
|
+
/>
|
|
548
|
+
<View>
|
|
549
|
+
<Text style={styles.settingLabel}>
|
|
550
|
+
{session.deviceName} {session.isCurrent ? '(This device)' : ''}
|
|
551
|
+
</Text>
|
|
552
|
+
<Text style={styles.settingDescription}>
|
|
553
|
+
Last active: {new Date(session.lastActive).toLocaleDateString()}
|
|
554
|
+
</Text>
|
|
555
|
+
</View>
|
|
556
|
+
</View>
|
|
557
|
+
{!session.isCurrent && (
|
|
558
|
+
<TouchableOpacity
|
|
559
|
+
style={styles.removeButton}
|
|
560
|
+
onPress={() => handleRemoteSessionLogout(session.sessionId, session.deviceName)}
|
|
561
|
+
disabled={remotingLogoutSessionId === session.sessionId}
|
|
562
|
+
>
|
|
563
|
+
{remotingLogoutSessionId === session.sessionId ? (
|
|
564
|
+
<ActivityIndicator size="small" color="#FF3B30" />
|
|
565
|
+
) : (
|
|
566
|
+
<OxyIcon name="log-out" size={16} color="#FF3B30" />
|
|
567
|
+
)}
|
|
568
|
+
</TouchableOpacity>
|
|
635
569
|
)}
|
|
636
|
-
</
|
|
637
|
-
)}
|
|
570
|
+
</View>
|
|
571
|
+
))}
|
|
638
572
|
</>
|
|
639
573
|
)}
|
|
640
574
|
</View>
|
|
641
575
|
)}
|
|
642
576
|
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
>
|
|
664
|
-
<Text style={[styles.dangerButtonText, { color: colors.destructive }]}>
|
|
665
|
-
Sign Out All Accounts
|
|
666
|
-
</Text>
|
|
667
|
-
</TouchableOpacity>
|
|
668
|
-
)}
|
|
669
|
-
</View>
|
|
577
|
+
{/* Empty State */}
|
|
578
|
+
{sessionsWithUsers.length === 0 && (
|
|
579
|
+
<View style={styles.section}>
|
|
580
|
+
<View style={[styles.settingItem, styles.firstSettingItem, styles.lastSettingItem]}>
|
|
581
|
+
<View style={styles.emptyStateContainer}>
|
|
582
|
+
<OxyIcon name="person-outline" size={48} color="#ccc" />
|
|
583
|
+
<Text style={styles.emptyStateTitle}>No saved accounts</Text>
|
|
584
|
+
<Text style={styles.emptyStateDescription}>
|
|
585
|
+
Add another account to switch between them quickly
|
|
586
|
+
</Text>
|
|
587
|
+
<TouchableOpacity
|
|
588
|
+
style={styles.addAccountButton}
|
|
589
|
+
onPress={() => navigate?.('SignIn')}
|
|
590
|
+
>
|
|
591
|
+
<Text style={styles.addAccountButtonText}>Add Account</Text>
|
|
592
|
+
</TouchableOpacity>
|
|
593
|
+
</View>
|
|
594
|
+
</View>
|
|
595
|
+
</View>
|
|
596
|
+
)}
|
|
670
597
|
</>
|
|
671
598
|
)}
|
|
672
599
|
</ScrollView>
|
|
@@ -677,192 +604,201 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
677
604
|
const styles = StyleSheet.create({
|
|
678
605
|
container: {
|
|
679
606
|
flex: 1,
|
|
607
|
+
backgroundColor: '#f2f2f2',
|
|
680
608
|
},
|
|
681
609
|
header: {
|
|
610
|
+
paddingHorizontal: 20,
|
|
611
|
+
paddingTop: 60,
|
|
612
|
+
paddingBottom: 16,
|
|
613
|
+
backgroundColor: '#fff',
|
|
614
|
+
borderBottomWidth: 1,
|
|
615
|
+
borderBottomColor: '#e0e0e0',
|
|
682
616
|
flexDirection: 'row',
|
|
683
|
-
alignItems: 'center',
|
|
684
617
|
justifyContent: 'space-between',
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
618
|
+
alignItems: 'center',
|
|
619
|
+
},
|
|
620
|
+
headerTitle: {
|
|
621
|
+
fontSize: 24,
|
|
622
|
+
fontWeight: 'bold',
|
|
623
|
+
color: '#000',
|
|
688
624
|
},
|
|
689
625
|
backButton: {
|
|
690
626
|
padding: 8,
|
|
691
627
|
},
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
fontFamily: fontFamilies.phuduMedium,
|
|
628
|
+
closeButton: {
|
|
629
|
+
padding: 8,
|
|
695
630
|
},
|
|
696
|
-
|
|
631
|
+
closeButtonText: {
|
|
697
632
|
fontSize: 24,
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
},
|
|
701
|
-
headerSpacer: {
|
|
702
|
-
width: 40,
|
|
633
|
+
color: '#000',
|
|
634
|
+
fontWeight: '300',
|
|
703
635
|
},
|
|
704
636
|
content: {
|
|
705
637
|
flex: 1,
|
|
706
|
-
|
|
638
|
+
padding: 16,
|
|
707
639
|
},
|
|
708
|
-
|
|
709
|
-
|
|
640
|
+
section: {
|
|
641
|
+
marginBottom: 24,
|
|
710
642
|
},
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
643
|
+
sectionTitle: {
|
|
644
|
+
fontSize: 16,
|
|
645
|
+
fontWeight: '600',
|
|
646
|
+
color: '#333',
|
|
647
|
+
marginBottom: 12,
|
|
648
|
+
},
|
|
649
|
+
settingItem: {
|
|
650
|
+
backgroundColor: '#fff',
|
|
651
|
+
padding: 16,
|
|
652
|
+
flexDirection: 'row',
|
|
714
653
|
alignItems: 'center',
|
|
715
|
-
|
|
654
|
+
justifyContent: 'space-between',
|
|
655
|
+
marginBottom: 2,
|
|
716
656
|
},
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
fontFamily: fontFamilies.phudu,
|
|
657
|
+
firstSettingItem: {
|
|
658
|
+
borderTopLeftRadius: 24,
|
|
659
|
+
borderTopRightRadius: 24,
|
|
721
660
|
},
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
marginBottom:
|
|
726
|
-
|
|
661
|
+
lastSettingItem: {
|
|
662
|
+
borderBottomLeftRadius: 24,
|
|
663
|
+
borderBottomRightRadius: 24,
|
|
664
|
+
marginBottom: 8,
|
|
665
|
+
},
|
|
666
|
+
currentAccountCard: {
|
|
667
|
+
borderWidth: 2,
|
|
668
|
+
borderColor: '#007AFF',
|
|
669
|
+
backgroundColor: '#007AFF08',
|
|
727
670
|
},
|
|
728
|
-
|
|
671
|
+
settingInfo: {
|
|
672
|
+
flexDirection: 'row',
|
|
729
673
|
alignItems: 'center',
|
|
730
|
-
|
|
674
|
+
flex: 1,
|
|
675
|
+
},
|
|
676
|
+
settingIcon: {
|
|
677
|
+
marginRight: 12,
|
|
731
678
|
},
|
|
732
|
-
|
|
679
|
+
settingLabel: {
|
|
733
680
|
fontSize: 16,
|
|
734
|
-
|
|
735
|
-
|
|
681
|
+
fontWeight: '500',
|
|
682
|
+
color: '#333',
|
|
683
|
+
marginBottom: 2,
|
|
736
684
|
},
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
padding: 20,
|
|
741
|
-
shadowOffset: {
|
|
742
|
-
width: 0,
|
|
743
|
-
height: 2,
|
|
744
|
-
},
|
|
745
|
-
shadowOpacity: 0.1,
|
|
746
|
-
shadowRadius: 8,
|
|
747
|
-
elevation: 3,
|
|
748
|
-
},
|
|
749
|
-
sessionHeader: {
|
|
750
|
-
flexDirection: 'row',
|
|
751
|
-
alignItems: 'center',
|
|
752
|
-
marginBottom: 16,
|
|
685
|
+
settingDescription: {
|
|
686
|
+
fontSize: 14,
|
|
687
|
+
color: '#666',
|
|
753
688
|
},
|
|
754
|
-
|
|
689
|
+
userIcon: {
|
|
690
|
+
marginRight: 12,
|
|
755
691
|
position: 'relative',
|
|
756
|
-
marginRight: 16,
|
|
757
692
|
},
|
|
758
|
-
|
|
759
|
-
width:
|
|
760
|
-
height:
|
|
761
|
-
borderRadius:
|
|
693
|
+
accountAvatarImage: {
|
|
694
|
+
width: 40,
|
|
695
|
+
height: 40,
|
|
696
|
+
borderRadius: 20,
|
|
762
697
|
},
|
|
763
|
-
|
|
764
|
-
width:
|
|
765
|
-
height:
|
|
766
|
-
borderRadius:
|
|
767
|
-
|
|
698
|
+
accountAvatarFallback: {
|
|
699
|
+
width: 40,
|
|
700
|
+
height: 40,
|
|
701
|
+
borderRadius: 20,
|
|
702
|
+
backgroundColor: '#d169e5',
|
|
768
703
|
alignItems: 'center',
|
|
704
|
+
justifyContent: 'center',
|
|
769
705
|
},
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
706
|
+
accountAvatarText: {
|
|
707
|
+
color: 'white',
|
|
708
|
+
fontSize: 18,
|
|
709
|
+
fontWeight: 'bold',
|
|
773
710
|
},
|
|
774
711
|
activeBadge: {
|
|
775
712
|
position: 'absolute',
|
|
776
|
-
|
|
713
|
+
top: -2,
|
|
777
714
|
right: -2,
|
|
778
|
-
width:
|
|
779
|
-
height:
|
|
780
|
-
borderRadius:
|
|
781
|
-
|
|
715
|
+
width: 16,
|
|
716
|
+
height: 16,
|
|
717
|
+
borderRadius: 8,
|
|
718
|
+
backgroundColor: '#34C759',
|
|
782
719
|
alignItems: 'center',
|
|
783
|
-
},
|
|
784
|
-
activeBadgeText: {
|
|
785
|
-
color: 'white',
|
|
786
|
-
fontSize: 12,
|
|
787
|
-
fontFamily: fontFamilies.phuduBold,
|
|
788
|
-
},
|
|
789
|
-
userInfo: {
|
|
790
|
-
flex: 1,
|
|
791
720
|
justifyContent: 'center',
|
|
721
|
+
borderWidth: 2,
|
|
722
|
+
borderColor: '#fff',
|
|
792
723
|
},
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
username: {
|
|
799
|
-
fontSize: 14,
|
|
800
|
-
fontFamily: fontFamilies.phudu,
|
|
801
|
-
marginBottom: 4,
|
|
724
|
+
currentBadge: {
|
|
725
|
+
backgroundColor: '#007AFF',
|
|
726
|
+
paddingHorizontal: 8,
|
|
727
|
+
paddingVertical: 4,
|
|
728
|
+
borderRadius: 12,
|
|
802
729
|
},
|
|
803
|
-
|
|
730
|
+
currentBadgeText: {
|
|
731
|
+
color: '#fff',
|
|
804
732
|
fontSize: 12,
|
|
805
|
-
|
|
733
|
+
fontWeight: '600',
|
|
806
734
|
},
|
|
807
|
-
|
|
735
|
+
accountActions: {
|
|
808
736
|
flexDirection: 'row',
|
|
809
|
-
|
|
810
|
-
gap:
|
|
737
|
+
alignItems: 'center',
|
|
738
|
+
gap: 8,
|
|
811
739
|
},
|
|
812
740
|
switchButton: {
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
741
|
+
backgroundColor: '#007AFF',
|
|
742
|
+
paddingHorizontal: 16,
|
|
743
|
+
paddingVertical: 8,
|
|
744
|
+
borderRadius: 16,
|
|
745
|
+
minWidth: 60,
|
|
818
746
|
alignItems: 'center',
|
|
819
|
-
justifyContent: 'center',
|
|
820
747
|
},
|
|
821
748
|
switchButtonText: {
|
|
749
|
+
color: '#fff',
|
|
822
750
|
fontSize: 14,
|
|
823
|
-
|
|
751
|
+
fontWeight: '500',
|
|
824
752
|
},
|
|
825
753
|
removeButton: {
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
754
|
+
padding: 8,
|
|
755
|
+
borderRadius: 16,
|
|
756
|
+
backgroundColor: '#fff',
|
|
829
757
|
borderWidth: 1,
|
|
830
|
-
|
|
758
|
+
borderColor: '#FF3B30',
|
|
831
759
|
alignItems: 'center',
|
|
832
760
|
justifyContent: 'center',
|
|
833
761
|
},
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
fontFamily: fontFamilies.phuduSemiBold,
|
|
837
|
-
},
|
|
838
|
-
actionsSection: {
|
|
839
|
-
marginTop: 40,
|
|
840
|
-
gap: 16,
|
|
841
|
-
},
|
|
842
|
-
actionButton: {
|
|
843
|
-
paddingVertical: 16,
|
|
844
|
-
paddingHorizontal: 20,
|
|
845
|
-
borderWidth: 1,
|
|
846
|
-
borderRadius: 12,
|
|
762
|
+
loadingContainer: {
|
|
763
|
+
flexDirection: 'row',
|
|
847
764
|
alignItems: 'center',
|
|
848
765
|
justifyContent: 'center',
|
|
766
|
+
paddingVertical: 20,
|
|
767
|
+
gap: 12,
|
|
849
768
|
},
|
|
850
|
-
|
|
769
|
+
loadingText: {
|
|
851
770
|
fontSize: 16,
|
|
852
|
-
|
|
771
|
+
color: '#666',
|
|
772
|
+
},
|
|
773
|
+
emptyStateContainer: {
|
|
774
|
+
alignItems: 'center',
|
|
775
|
+
paddingVertical: 32,
|
|
776
|
+
paddingHorizontal: 20,
|
|
853
777
|
},
|
|
854
|
-
|
|
855
|
-
|
|
778
|
+
emptyStateTitle: {
|
|
779
|
+
fontSize: 18,
|
|
780
|
+
fontWeight: '600',
|
|
781
|
+
color: '#333',
|
|
782
|
+
marginTop: 16,
|
|
783
|
+
marginBottom: 8,
|
|
856
784
|
},
|
|
857
|
-
|
|
858
|
-
fontSize:
|
|
859
|
-
|
|
785
|
+
emptyStateDescription: {
|
|
786
|
+
fontSize: 14,
|
|
787
|
+
color: '#666',
|
|
788
|
+
textAlign: 'center',
|
|
789
|
+
marginBottom: 24,
|
|
790
|
+
lineHeight: 20,
|
|
860
791
|
},
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
792
|
+
addAccountButton: {
|
|
793
|
+
backgroundColor: '#007AFF',
|
|
794
|
+
paddingHorizontal: 24,
|
|
795
|
+
paddingVertical: 12,
|
|
796
|
+
borderRadius: 20,
|
|
797
|
+
},
|
|
798
|
+
addAccountButtonText: {
|
|
799
|
+
color: '#fff',
|
|
800
|
+
fontSize: 16,
|
|
801
|
+
fontWeight: '600',
|
|
866
802
|
},
|
|
867
803
|
});
|
|
868
804
|
|