@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.
Files changed (213) hide show
  1. package/README.md +21 -0
  2. package/lib/commonjs/assets/assets/icons/OxyServices.tsx +67 -0
  3. package/lib/commonjs/assets/assets/icons/logo_OxyServices.svg +1 -0
  4. package/lib/commonjs/assets/icons/OxyServices.js +53 -0
  5. package/lib/commonjs/assets/icons/OxyServices.js.map +1 -0
  6. package/lib/commonjs/assets/icons/logo_OxyServices.svg +1 -0
  7. package/lib/commonjs/core/index.js +119 -23
  8. package/lib/commonjs/core/index.js.map +1 -1
  9. package/lib/commonjs/index.js +2 -0
  10. package/lib/commonjs/index.js.map +1 -1
  11. package/lib/commonjs/lib/sonner.js +15 -11
  12. package/lib/commonjs/lib/sonner.js.map +1 -1
  13. package/lib/commonjs/node/index.js +2 -0
  14. package/lib/commonjs/node/index.js.map +1 -1
  15. package/lib/commonjs/ui/components/GroupedItem.js +109 -0
  16. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -0
  17. package/lib/commonjs/ui/components/GroupedSection.js +33 -0
  18. package/lib/commonjs/ui/components/GroupedSection.js.map +1 -0
  19. package/lib/commonjs/ui/components/OxyProvider.js +95 -112
  20. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  21. package/lib/commonjs/ui/components/ProfileCard.js +124 -0
  22. package/lib/commonjs/ui/components/ProfileCard.js.map +1 -0
  23. package/lib/commonjs/ui/components/QuickActions.js +87 -0
  24. package/lib/commonjs/ui/components/QuickActions.js.map +1 -0
  25. package/lib/commonjs/ui/components/Section.js +36 -0
  26. package/lib/commonjs/ui/components/Section.js.map +1 -0
  27. package/lib/commonjs/ui/components/SectionTitle.js +35 -0
  28. package/lib/commonjs/ui/components/SectionTitle.js.map +1 -0
  29. package/lib/commonjs/ui/components/bottomSheet/index.js +6 -6
  30. package/lib/commonjs/ui/components/index.js +97 -0
  31. package/lib/commonjs/ui/components/index.js.map +1 -0
  32. package/lib/commonjs/ui/navigation/OxyRouter.js +20 -3
  33. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
  34. package/lib/commonjs/ui/screens/AccountCenterScreen.js +190 -207
  35. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  36. package/lib/commonjs/ui/screens/AccountManagementDemo.js +299 -0
  37. package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -0
  38. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +669 -401
  39. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  40. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +695 -498
  41. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  42. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +451 -488
  43. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  44. package/lib/commonjs/ui/screens/AppInfoScreen.js +498 -185
  45. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  46. package/lib/commonjs/ui/screens/BillingManagementScreen.js +636 -0
  47. package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +1 -0
  48. package/lib/commonjs/ui/screens/FileManagementScreen.js +2497 -0
  49. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -0
  50. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +1620 -0
  51. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
  52. package/lib/commonjs/ui/screens/ProfileScreen.js +117 -13
  53. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  54. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/SignInScreen.js +1 -1
  56. package/lib/commonjs/ui/screens/SignUpScreen.js +1 -1
  57. package/lib/commonjs/utils/polyfills.js +42 -0
  58. package/lib/commonjs/utils/polyfills.js.map +1 -0
  59. package/lib/module/assets/assets/icons/OxyServices.tsx +67 -0
  60. package/lib/module/assets/assets/icons/logo_OxyServices.svg +1 -0
  61. package/lib/module/assets/icons/OxyServices.js +46 -0
  62. package/lib/module/assets/icons/OxyServices.js.map +1 -0
  63. package/lib/module/assets/icons/logo_OxyServices.svg +1 -0
  64. package/lib/module/core/index.js +119 -23
  65. package/lib/module/core/index.js.map +1 -1
  66. package/lib/module/index.js +3 -0
  67. package/lib/module/index.js.map +1 -1
  68. package/lib/module/lib/sonner.js +13 -1
  69. package/lib/module/lib/sonner.js.map +1 -1
  70. package/lib/module/node/index.js +3 -0
  71. package/lib/module/node/index.js.map +1 -1
  72. package/lib/module/ui/components/GroupedItem.js +104 -0
  73. package/lib/module/ui/components/GroupedItem.js.map +1 -0
  74. package/lib/module/ui/components/GroupedSection.js +28 -0
  75. package/lib/module/ui/components/GroupedSection.js.map +1 -0
  76. package/lib/module/ui/components/OxyProvider.js +97 -114
  77. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  78. package/lib/module/ui/components/ProfileCard.js +119 -0
  79. package/lib/module/ui/components/ProfileCard.js.map +1 -0
  80. package/lib/module/ui/components/QuickActions.js +82 -0
  81. package/lib/module/ui/components/QuickActions.js.map +1 -0
  82. package/lib/module/ui/components/Section.js +31 -0
  83. package/lib/module/ui/components/Section.js.map +1 -0
  84. package/lib/module/ui/components/SectionTitle.js +30 -0
  85. package/lib/module/ui/components/SectionTitle.js.map +1 -0
  86. package/lib/module/ui/components/bottomSheet/index.js +2 -5
  87. package/lib/module/ui/components/bottomSheet/index.js.map +1 -1
  88. package/lib/module/ui/components/index.js +18 -0
  89. package/lib/module/ui/components/index.js.map +1 -0
  90. package/lib/module/ui/navigation/OxyRouter.js +20 -3
  91. package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
  92. package/lib/module/ui/screens/AccountCenterScreen.js +191 -208
  93. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  94. package/lib/module/ui/screens/AccountManagementDemo.js +296 -0
  95. package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -0
  96. package/lib/module/ui/screens/AccountOverviewScreen.js +671 -403
  97. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  98. package/lib/module/ui/screens/AccountSettingsScreen.js +698 -501
  99. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  100. package/lib/module/ui/screens/AccountSwitcherScreen.js +450 -488
  101. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  102. package/lib/module/ui/screens/AppInfoScreen.js +498 -186
  103. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  104. package/lib/module/ui/screens/BillingManagementScreen.js +631 -0
  105. package/lib/module/ui/screens/BillingManagementScreen.js.map +1 -0
  106. package/lib/module/ui/screens/FileManagementScreen.js +2492 -0
  107. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -0
  108. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +1615 -0
  109. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
  110. package/lib/module/ui/screens/ProfileScreen.js +118 -14
  111. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  112. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  113. package/lib/module/ui/screens/SignInScreen.js +1 -1
  114. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  115. package/lib/module/ui/screens/SignUpScreen.js +1 -1
  116. package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
  117. package/lib/module/utils/polyfills.js +36 -0
  118. package/lib/module/utils/polyfills.js.map +1 -0
  119. package/lib/typescript/assets/icons/OxyServices.d.ts +29 -0
  120. package/lib/typescript/assets/icons/OxyServices.d.ts.map +1 -0
  121. package/lib/typescript/core/index.d.ts +26 -1
  122. package/lib/typescript/core/index.d.ts.map +1 -1
  123. package/lib/typescript/index.d.ts +1 -0
  124. package/lib/typescript/index.d.ts.map +1 -1
  125. package/lib/typescript/lib/sonner.d.ts +5 -1
  126. package/lib/typescript/lib/sonner.d.ts.map +1 -1
  127. package/lib/typescript/models/interfaces.d.ts +1 -2
  128. package/lib/typescript/models/interfaces.d.ts.map +1 -1
  129. package/lib/typescript/node/index.d.ts +1 -0
  130. package/lib/typescript/node/index.d.ts.map +1 -1
  131. package/lib/typescript/ui/components/GroupedItem.d.ts +17 -0
  132. package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -0
  133. package/lib/typescript/ui/components/GroupedSection.d.ts +19 -0
  134. package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -0
  135. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  136. package/lib/typescript/ui/components/ProfileCard.d.ts +20 -0
  137. package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -0
  138. package/lib/typescript/ui/components/QuickActions.d.ts +15 -0
  139. package/lib/typescript/ui/components/QuickActions.d.ts.map +1 -0
  140. package/lib/typescript/ui/components/Section.d.ts +11 -0
  141. package/lib/typescript/ui/components/Section.d.ts.map +1 -0
  142. package/lib/typescript/ui/components/SectionTitle.d.ts +9 -0
  143. package/lib/typescript/ui/components/SectionTitle.d.ts.map +1 -0
  144. package/lib/typescript/ui/components/bottomSheet/index.d.ts +3 -2
  145. package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +1 -1
  146. package/lib/typescript/ui/components/index.d.ts +13 -0
  147. package/lib/typescript/ui/components/index.d.ts.map +1 -0
  148. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
  149. package/lib/typescript/ui/navigation/types.d.ts +8 -0
  150. package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
  151. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  152. package/lib/typescript/ui/screens/AccountManagementDemo.d.ts +8 -0
  153. package/lib/typescript/ui/screens/AccountManagementDemo.d.ts.map +1 -0
  154. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  155. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts +1 -4
  156. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  157. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  158. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
  159. package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +5 -0
  160. package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +1 -0
  161. package/lib/typescript/ui/screens/FileManagementScreen.d.ts +8 -0
  162. package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -0
  163. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts +5 -0
  164. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -0
  165. package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
  166. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  167. package/lib/typescript/utils/polyfills.d.ts +6 -0
  168. package/lib/typescript/utils/polyfills.d.ts.map +1 -0
  169. package/package.json +11 -3
  170. package/src/__tests__/polyfills.test.ts +30 -0
  171. package/src/__tests__/setup.ts +43 -0
  172. package/src/__tests__/ui/screens/AccountSettingsScreen.test.tsx +8 -8
  173. package/src/assets/icons/OxyServices.tsx +67 -0
  174. package/src/assets/icons/logo_OxyServices.svg +1 -0
  175. package/src/core/index.ts +127 -19
  176. package/src/index.ts +3 -0
  177. package/src/lib/sonner.ts +10 -1
  178. package/src/models/interfaces.ts +1 -2
  179. package/src/node/index.ts +3 -0
  180. package/src/ui/components/GroupedItem.tsx +118 -0
  181. package/src/ui/components/GroupedSection.tsx +45 -0
  182. package/src/ui/components/OxyProvider.tsx +95 -120
  183. package/src/ui/components/ProfileCard.tsx +129 -0
  184. package/src/ui/components/QuickActions.tsx +90 -0
  185. package/src/ui/components/Section.tsx +37 -0
  186. package/src/ui/components/SectionTitle.tsx +31 -0
  187. package/src/ui/components/bottomSheet/index.tsx +13 -11
  188. package/src/ui/components/index.ts +15 -0
  189. package/src/ui/navigation/OxyRouter.tsx +20 -3
  190. package/src/ui/navigation/types.ts +10 -1
  191. package/src/ui/screens/AccountCenterScreen.tsx +188 -159
  192. package/src/ui/screens/AccountManagementDemo.tsx +297 -0
  193. package/src/ui/screens/AccountOverviewScreen.tsx +474 -310
  194. package/src/ui/screens/AccountSettingsScreen.tsx +648 -463
  195. package/src/ui/screens/AccountSwitcherScreen.tsx +385 -449
  196. package/src/ui/screens/AppInfoScreen.tsx +571 -140
  197. package/src/ui/screens/BillingManagementScreen.tsx +589 -0
  198. package/src/ui/screens/FileManagementScreen.tsx +2513 -0
  199. package/src/ui/screens/PremiumSubscriptionScreen.tsx +1628 -0
  200. package/src/ui/screens/ProfileScreen.tsx +101 -7
  201. package/src/ui/screens/SessionManagementScreen.tsx +1 -0
  202. package/src/ui/screens/SignInScreen.tsx +1 -1
  203. package/src/ui/screens/SignUpScreen.tsx +1 -1
  204. package/src/utils/polyfills.ts +34 -0
  205. package/lib/commonjs/lib/sonner.web.js +0 -17
  206. package/lib/commonjs/lib/sonner.web.js.map +0 -1
  207. package/lib/module/lib/sonner.web.js +0 -4
  208. package/lib/module/lib/sonner.web.js.map +0 -1
  209. package/lib/typescript/__tests__/ui/screens/AccountSettingsScreen.test.d.ts +0 -2
  210. package/lib/typescript/__tests__/ui/screens/AccountSettingsScreen.test.d.ts.map +0 -1
  211. package/lib/typescript/lib/sonner.web.d.ts +0 -2
  212. package/lib/typescript/lib/sonner.web.d.ts.map +0 -1
  213. 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: colors.background }]}>
311
+ <View style={[styles.container, { backgroundColor: '#f2f2f2' }]}>
312
+ {/* Header */}
514
313
  <View style={styles.header}>
515
314
  <TouchableOpacity style={styles.backButton} onPress={goBack}>
516
- <Text style={[styles.backButtonText, { color: colors.accent }]}>‹ Back</Text>
315
+ <OxyIcon name="chevron-back" size={24} color="#007AFF" />
517
316
  </TouchableOpacity>
518
- <Text style={[styles.title, { color: colors.text }]}>Accounts</Text>
519
- <View style={styles.headerSpacer} />
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={colors.accent} />
530
- <Text style={[styles.loadingText, { color: colors.secondaryText }]}>
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
- <Text style={[styles.sectionTitle, { color: colors.text }]}>
537
- Saved Accounts ({sessionsWithUsers.length})
538
- </Text>
539
-
540
- {sessionsWithUsers.length === 0 ? (
541
- <View style={styles.emptyState}>
542
- <Text style={[styles.emptyText, { color: colors.secondaryText }]}>
543
- No saved accounts found
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
- <View style={styles.actionsSection}>
450
+ {/* Quick Actions */}
451
+ <View style={styles.section}>
452
+ <Text style={styles.sectionTitle}>Quick Actions</Text>
453
+
551
454
  <TouchableOpacity
552
- style={[styles.actionButton, {
553
- borderColor: colors.border,
554
- backgroundColor: colors.card,
555
- }]}
455
+ style={[styles.settingItem, styles.firstSettingItem]}
556
456
  onPress={() => navigate?.('SignIn')}
557
457
  >
558
- <Text style={[styles.actionButtonText, { color: colors.text }]}>
559
- + Add Another Account
560
- </Text>
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={[styles.actionButton, {
582
- borderColor: colors.border,
583
- backgroundColor: colors.card,
584
- }]}
469
+ style={styles.settingItem}
585
470
  onPress={() => setShowDeviceManagement(!showDeviceManagement)}
586
471
  >
587
- <Text style={[styles.actionButtonText, { color: colors.text }]}>
588
- {showDeviceManagement ? '− Hide Device Management' : '+ Manage Device Sessions'}
589
- </Text>
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={[styles.deviceManagementSection, {
595
- backgroundColor: colors.card,
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.loadingContainer}>
604
- <ActivityIndicator size="large" color={colors.accent} />
605
- <Text style={[styles.loadingText, { color: colors.secondaryText }]}>
606
- Loading device sessions...
607
- </Text>
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.emptyState}>
611
- <Text style={[styles.emptyText, { color: colors.secondaryText }]}>
612
- No device sessions found
613
- </Text>
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(renderDeviceSessionItem)}
618
-
619
- {deviceSessions.filter(session => !session.isCurrent).length > 0 && (
620
- <TouchableOpacity
621
- style={[styles.actionButton, styles.dangerButton, {
622
- borderColor: colors.destructive,
623
- backgroundColor: colors.background,
624
- marginTop: 20,
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
- {loggingOutAllDevices ? (
630
- <ActivityIndicator color={colors.destructive} size="small" />
631
- ) : (
632
- <Text style={[styles.dangerButtonText, { color: colors.destructive }]}>
633
- Sign Out All Other Devices
634
- </Text>
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
- </TouchableOpacity>
637
- )}
570
+ </View>
571
+ ))}
638
572
  </>
639
573
  )}
640
574
  </View>
641
575
  )}
642
576
 
643
- <View style={styles.actionsSection}>
644
- <TouchableOpacity
645
- style={[styles.actionButton, {
646
- borderColor: colors.border,
647
- backgroundColor: colors.card,
648
- }]}
649
- onPress={() => navigate?.('SignIn')}
650
- >
651
- <Text style={[styles.actionButtonText, { color: colors.text }]}>
652
- + Add Another Account
653
- </Text>
654
- </TouchableOpacity>
655
-
656
- {sessionsWithUsers.length > 0 && (
657
- <TouchableOpacity
658
- style={[styles.actionButton, styles.dangerButton, {
659
- borderColor: colors.destructive,
660
- backgroundColor: colors.background,
661
- }]}
662
- onPress={handleLogoutAll}
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
- paddingHorizontal: 20,
686
- paddingTop: 20,
687
- paddingBottom: 10,
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
- backButtonText: {
693
- fontSize: 18,
694
- fontFamily: fontFamilies.phuduMedium,
628
+ closeButton: {
629
+ padding: 8,
695
630
  },
696
- title: {
631
+ closeButtonText: {
697
632
  fontSize: 24,
698
- fontFamily: fontFamilies.phuduBold,
699
- textAlign: 'center',
700
- },
701
- headerSpacer: {
702
- width: 40,
633
+ color: '#000',
634
+ fontWeight: '300',
703
635
  },
704
636
  content: {
705
637
  flex: 1,
706
- paddingHorizontal: 20,
638
+ padding: 16,
707
639
  },
708
- scrollContent: {
709
- paddingBottom: 40,
640
+ section: {
641
+ marginBottom: 24,
710
642
  },
711
- loadingContainer: {
712
- flex: 1,
713
- justifyContent: 'center',
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
- paddingTop: 60,
654
+ justifyContent: 'space-between',
655
+ marginBottom: 2,
716
656
  },
717
- loadingText: {
718
- marginTop: 16,
719
- fontSize: 16,
720
- fontFamily: fontFamilies.phudu,
657
+ firstSettingItem: {
658
+ borderTopLeftRadius: 24,
659
+ borderTopRightRadius: 24,
721
660
  },
722
- sectionTitle: {
723
- fontSize: 20,
724
- fontFamily: fontFamilies.phuduSemiBold,
725
- marginBottom: 20,
726
- marginTop: 10,
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
- emptyState: {
671
+ settingInfo: {
672
+ flexDirection: 'row',
729
673
  alignItems: 'center',
730
- paddingVertical: 40,
674
+ flex: 1,
675
+ },
676
+ settingIcon: {
677
+ marginRight: 12,
731
678
  },
732
- emptyText: {
679
+ settingLabel: {
733
680
  fontSize: 16,
734
- fontFamily: fontFamilies.phudu,
735
- textAlign: 'center',
681
+ fontWeight: '500',
682
+ color: '#333',
683
+ marginBottom: 2,
736
684
  },
737
- sessionCard: {
738
- borderRadius: 16,
739
- marginBottom: 16,
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
- avatarContainer: {
689
+ userIcon: {
690
+ marginRight: 12,
755
691
  position: 'relative',
756
- marginRight: 16,
757
692
  },
758
- avatar: {
759
- width: 60,
760
- height: 60,
761
- borderRadius: 30,
693
+ accountAvatarImage: {
694
+ width: 40,
695
+ height: 40,
696
+ borderRadius: 20,
762
697
  },
763
- avatarPlaceholder: {
764
- width: 60,
765
- height: 60,
766
- borderRadius: 30,
767
- justifyContent: 'center',
698
+ accountAvatarFallback: {
699
+ width: 40,
700
+ height: 40,
701
+ borderRadius: 20,
702
+ backgroundColor: '#d169e5',
768
703
  alignItems: 'center',
704
+ justifyContent: 'center',
769
705
  },
770
- avatarText: {
771
- fontSize: 24,
772
- fontFamily: fontFamilies.phuduBold,
706
+ accountAvatarText: {
707
+ color: 'white',
708
+ fontSize: 18,
709
+ fontWeight: 'bold',
773
710
  },
774
711
  activeBadge: {
775
712
  position: 'absolute',
776
- bottom: -2,
713
+ top: -2,
777
714
  right: -2,
778
- width: 20,
779
- height: 20,
780
- borderRadius: 10,
781
- justifyContent: 'center',
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
- displayName: {
794
- fontSize: 18,
795
- fontFamily: fontFamilies.phuduSemiBold,
796
- marginBottom: 4,
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
- lastActive: {
730
+ currentBadgeText: {
731
+ color: '#fff',
804
732
  fontSize: 12,
805
- fontFamily: fontFamilies.phudu,
733
+ fontWeight: '600',
806
734
  },
807
- sessionActions: {
735
+ accountActions: {
808
736
  flexDirection: 'row',
809
- justifyContent: 'space-between',
810
- gap: 12,
737
+ alignItems: 'center',
738
+ gap: 8,
811
739
  },
812
740
  switchButton: {
813
- flex: 1,
814
- paddingVertical: 12,
815
- paddingHorizontal: 20,
816
- borderWidth: 1,
817
- borderRadius: 8,
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
- fontFamily: fontFamilies.phuduSemiBold,
751
+ fontWeight: '500',
824
752
  },
825
753
  removeButton: {
826
- flex: 1,
827
- paddingVertical: 12,
828
- paddingHorizontal: 20,
754
+ padding: 8,
755
+ borderRadius: 16,
756
+ backgroundColor: '#fff',
829
757
  borderWidth: 1,
830
- borderRadius: 8,
758
+ borderColor: '#FF3B30',
831
759
  alignItems: 'center',
832
760
  justifyContent: 'center',
833
761
  },
834
- removeButtonText: {
835
- fontSize: 14,
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
- actionButtonText: {
769
+ loadingText: {
851
770
  fontSize: 16,
852
- fontFamily: fontFamilies.phuduSemiBold,
771
+ color: '#666',
772
+ },
773
+ emptyStateContainer: {
774
+ alignItems: 'center',
775
+ paddingVertical: 32,
776
+ paddingHorizontal: 20,
853
777
  },
854
- dangerButton: {
855
- // Additional styles for danger buttons if needed
778
+ emptyStateTitle: {
779
+ fontSize: 18,
780
+ fontWeight: '600',
781
+ color: '#333',
782
+ marginTop: 16,
783
+ marginBottom: 8,
856
784
  },
857
- dangerButtonText: {
858
- fontSize: 16,
859
- fontFamily: fontFamilies.phuduSemiBold,
785
+ emptyStateDescription: {
786
+ fontSize: 14,
787
+ color: '#666',
788
+ textAlign: 'center',
789
+ marginBottom: 24,
790
+ lineHeight: 20,
860
791
  },
861
- deviceManagementSection: {
862
- marginTop: 20,
863
- padding: 16,
864
- borderRadius: 12,
865
- borderWidth: 1,
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