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