@oxyhq/services 10.2.0 → 10.2.2

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 (246) hide show
  1. package/README.md +9 -13
  2. package/lib/commonjs/index.js +10 -0
  3. package/lib/commonjs/index.js.map +1 -1
  4. package/lib/commonjs/ui/components/AccountMenu.js +297 -226
  5. package/lib/commonjs/ui/components/AccountMenu.js.map +1 -1
  6. package/lib/commonjs/ui/components/AccountMenuButton.js.map +1 -1
  7. package/lib/commonjs/ui/components/FollowButton.js +3 -1
  8. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  9. package/lib/commonjs/ui/components/OxySignInButton.js +1 -1
  10. package/lib/commonjs/ui/components/SignInModal.js +11 -12
  11. package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
  12. package/lib/commonjs/ui/components/accountMenuRows.js +18 -30
  13. package/lib/commonjs/ui/components/accountMenuRows.js.map +1 -1
  14. package/lib/commonjs/ui/context/OxyContext.js +57 -78
  15. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  16. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +7 -13
  17. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  18. package/lib/commonjs/ui/hooks/useAuth.js +10 -40
  19. package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
  20. package/lib/commonjs/ui/hooks/useDeviceAccounts.js +285 -0
  21. package/lib/commonjs/ui/hooks/useDeviceAccounts.js.map +1 -0
  22. package/lib/commonjs/ui/hooks/useFollow.js +21 -7
  23. package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
  24. package/lib/commonjs/ui/hooks/useSessionManagement.js +5 -6
  25. package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
  26. package/lib/commonjs/ui/hooks/useSessionSocket.js +4 -5
  27. package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
  28. package/lib/commonjs/ui/hooks/useWebSSO.js +1 -1
  29. package/lib/commonjs/ui/navigation/routes.js +7 -7
  30. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  31. package/lib/commonjs/ui/screens/OxyAuthScreen.js +6 -7
  32. package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
  33. package/lib/commonjs/ui/screens/ProfileScreen.js +18 -20
  34. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  35. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +4 -4
  36. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  37. package/lib/commonjs/ui/screens/{karma/KarmaAboutScreen.js → trust/TrustAboutScreen.js} +11 -11
  38. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -0
  39. package/lib/commonjs/ui/screens/{karma/KarmaCenterScreen.js → trust/TrustCenterScreen.js} +91 -41
  40. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -0
  41. package/lib/commonjs/ui/screens/{karma/KarmaFAQScreen.js → trust/TrustFAQScreen.js} +11 -11
  42. package/lib/commonjs/ui/screens/{karma/KarmaFAQScreen.js.map → trust/TrustFAQScreen.js.map} +1 -1
  43. package/lib/commonjs/ui/screens/{karma/KarmaLeaderboardScreen.js → trust/TrustLeaderboardScreen.js} +63 -42
  44. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -0
  45. package/lib/commonjs/ui/screens/{karma/KarmaRewardsScreen.js → trust/TrustRewardsScreen.js} +54 -54
  46. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -0
  47. package/lib/commonjs/ui/screens/{karma/KarmaRulesScreen.js → trust/TrustRulesScreen.js} +45 -16
  48. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -0
  49. package/lib/commonjs/ui/screens/trust/trustTier.js +23 -0
  50. package/lib/commonjs/ui/screens/trust/trustTier.js.map +1 -0
  51. package/lib/commonjs/utils/deviceFlowSignIn.js +12 -10
  52. package/lib/commonjs/utils/deviceFlowSignIn.js.map +1 -1
  53. package/lib/module/index.js +3 -0
  54. package/lib/module/index.js.map +1 -1
  55. package/lib/module/ui/components/AccountMenu.js +297 -226
  56. package/lib/module/ui/components/AccountMenu.js.map +1 -1
  57. package/lib/module/ui/components/AccountMenuButton.js.map +1 -1
  58. package/lib/module/ui/components/FollowButton.js +3 -1
  59. package/lib/module/ui/components/FollowButton.js.map +1 -1
  60. package/lib/module/ui/components/OxySignInButton.js +1 -1
  61. package/lib/module/ui/components/SignInModal.js +11 -12
  62. package/lib/module/ui/components/SignInModal.js.map +1 -1
  63. package/lib/module/ui/components/accountMenuRows.js +18 -30
  64. package/lib/module/ui/components/accountMenuRows.js.map +1 -1
  65. package/lib/module/ui/context/OxyContext.js +58 -79
  66. package/lib/module/ui/context/OxyContext.js.map +1 -1
  67. package/lib/module/ui/context/hooks/useAuthOperations.js +7 -13
  68. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  69. package/lib/module/ui/hooks/useAuth.js +10 -40
  70. package/lib/module/ui/hooks/useAuth.js.map +1 -1
  71. package/lib/module/ui/hooks/useDeviceAccounts.js +281 -0
  72. package/lib/module/ui/hooks/useDeviceAccounts.js.map +1 -0
  73. package/lib/module/ui/hooks/useFollow.js +21 -7
  74. package/lib/module/ui/hooks/useFollow.js.map +1 -1
  75. package/lib/module/ui/hooks/useSessionManagement.js +5 -6
  76. package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
  77. package/lib/module/ui/hooks/useSessionSocket.js +4 -5
  78. package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
  79. package/lib/module/ui/hooks/useWebSSO.js +1 -1
  80. package/lib/module/ui/navigation/routes.js +7 -7
  81. package/lib/module/ui/navigation/routes.js.map +1 -1
  82. package/lib/module/ui/screens/OxyAuthScreen.js +6 -7
  83. package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
  84. package/lib/module/ui/screens/ProfileScreen.js +18 -20
  85. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  86. package/lib/module/ui/screens/WelcomeNewUserScreen.js +4 -4
  87. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  88. package/lib/module/ui/screens/{karma/KarmaAboutScreen.js → trust/TrustAboutScreen.js} +11 -11
  89. package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -0
  90. package/lib/module/ui/screens/{karma/KarmaCenterScreen.js → trust/TrustCenterScreen.js} +92 -42
  91. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -0
  92. package/lib/module/ui/screens/{karma/KarmaFAQScreen.js → trust/TrustFAQScreen.js} +11 -11
  93. package/lib/module/ui/screens/{karma/KarmaFAQScreen.js.map → trust/TrustFAQScreen.js.map} +1 -1
  94. package/lib/module/ui/screens/{karma/KarmaLeaderboardScreen.js → trust/TrustLeaderboardScreen.js} +63 -42
  95. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -0
  96. package/lib/module/ui/screens/{karma/KarmaRewardsScreen.js → trust/TrustRewardsScreen.js} +54 -54
  97. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -0
  98. package/lib/module/ui/screens/{karma/KarmaRulesScreen.js → trust/TrustRulesScreen.js} +45 -16
  99. package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -0
  100. package/lib/module/ui/screens/trust/trustTier.js +19 -0
  101. package/lib/module/ui/screens/trust/trustTier.js.map +1 -0
  102. package/lib/module/utils/deviceFlowSignIn.js +13 -10
  103. package/lib/module/utils/deviceFlowSignIn.js.map +1 -1
  104. package/lib/typescript/commonjs/index.d.ts +3 -1
  105. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts +30 -10
  107. package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts.map +1 -1
  108. package/lib/typescript/commonjs/ui/components/SignInModal.d.ts +1 -1
  109. package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
  110. package/lib/typescript/commonjs/ui/components/accountMenuRows.d.ts +19 -12
  111. package/lib/typescript/commonjs/ui/components/accountMenuRows.d.ts.map +1 -1
  112. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +3 -3
  113. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  114. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  115. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +1 -7
  116. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  117. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +3 -7
  118. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
  119. package/lib/typescript/commonjs/ui/hooks/useDeviceAccounts.d.ts +133 -0
  120. package/lib/typescript/commonjs/ui/hooks/useDeviceAccounts.d.ts.map +1 -0
  121. package/lib/typescript/commonjs/ui/hooks/useFollow.d.ts +1 -1
  122. package/lib/typescript/commonjs/ui/hooks/useFollow.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
  124. package/lib/typescript/commonjs/ui/hooks/useSessionSocket.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts +1 -1
  126. package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
  127. package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  128. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts +5 -0
  130. package/lib/typescript/commonjs/ui/screens/{karma/KarmaAboutScreen.d.ts.map → trust/TrustAboutScreen.d.ts.map} +1 -1
  131. package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts +5 -0
  132. package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -0
  133. package/lib/typescript/{module/ui/screens/karma/KarmaFAQScreen.d.ts → commonjs/ui/screens/trust/TrustFAQScreen.d.ts} +1 -1
  134. package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -0
  135. package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts +5 -0
  136. package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -0
  137. package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts +5 -0
  138. package/lib/typescript/commonjs/ui/screens/{karma/KarmaRewardsScreen.d.ts.map → trust/TrustRewardsScreen.d.ts.map} +1 -1
  139. package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts +5 -0
  140. package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -0
  141. package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts +9 -0
  142. package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts.map +1 -0
  143. package/lib/typescript/commonjs/ui/types/navigation.d.ts +1 -1
  144. package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts +11 -9
  145. package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts.map +1 -1
  146. package/lib/typescript/module/index.d.ts +3 -1
  147. package/lib/typescript/module/index.d.ts.map +1 -1
  148. package/lib/typescript/module/ui/components/AccountMenu.d.ts +30 -10
  149. package/lib/typescript/module/ui/components/AccountMenu.d.ts.map +1 -1
  150. package/lib/typescript/module/ui/components/SignInModal.d.ts +1 -1
  151. package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
  152. package/lib/typescript/module/ui/components/accountMenuRows.d.ts +19 -12
  153. package/lib/typescript/module/ui/components/accountMenuRows.d.ts.map +1 -1
  154. package/lib/typescript/module/ui/context/OxyContext.d.ts +3 -3
  155. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  156. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  157. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +1 -7
  158. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  159. package/lib/typescript/module/ui/hooks/useAuth.d.ts +3 -7
  160. package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
  161. package/lib/typescript/module/ui/hooks/useDeviceAccounts.d.ts +133 -0
  162. package/lib/typescript/module/ui/hooks/useDeviceAccounts.d.ts.map +1 -0
  163. package/lib/typescript/module/ui/hooks/useFollow.d.ts +1 -1
  164. package/lib/typescript/module/ui/hooks/useFollow.d.ts.map +1 -1
  165. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
  166. package/lib/typescript/module/ui/hooks/useSessionSocket.d.ts.map +1 -1
  167. package/lib/typescript/module/ui/hooks/useWebSSO.d.ts +1 -1
  168. package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
  169. package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  170. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  171. package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts +5 -0
  172. package/lib/typescript/module/ui/screens/{karma/KarmaAboutScreen.d.ts.map → trust/TrustAboutScreen.d.ts.map} +1 -1
  173. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts +5 -0
  174. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -0
  175. package/lib/typescript/{commonjs/ui/screens/karma/KarmaFAQScreen.d.ts → module/ui/screens/trust/TrustFAQScreen.d.ts} +1 -1
  176. package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -0
  177. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts +5 -0
  178. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -0
  179. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts +5 -0
  180. package/lib/typescript/module/ui/screens/{karma/KarmaRewardsScreen.d.ts.map → trust/TrustRewardsScreen.d.ts.map} +1 -1
  181. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts +5 -0
  182. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -0
  183. package/lib/typescript/module/ui/screens/trust/trustTier.d.ts +9 -0
  184. package/lib/typescript/module/ui/screens/trust/trustTier.d.ts.map +1 -0
  185. package/lib/typescript/module/ui/types/navigation.d.ts +1 -1
  186. package/lib/typescript/module/utils/deviceFlowSignIn.d.ts +11 -9
  187. package/lib/typescript/module/utils/deviceFlowSignIn.d.ts.map +1 -1
  188. package/package.json +2 -2
  189. package/src/index.ts +10 -1
  190. package/src/ui/components/AccountMenu.tsx +311 -253
  191. package/src/ui/components/AccountMenuButton.tsx +2 -2
  192. package/src/ui/components/FollowButton.tsx +2 -2
  193. package/src/ui/components/OxySignInButton.tsx +1 -1
  194. package/src/ui/components/SignInModal.tsx +13 -14
  195. package/src/ui/components/accountMenuRows.ts +28 -40
  196. package/src/ui/context/OxyContext.tsx +71 -74
  197. package/src/ui/context/hooks/useAuthOperations.ts +7 -13
  198. package/src/ui/hooks/useAuth.ts +12 -49
  199. package/src/ui/hooks/useDeviceAccounts.ts +348 -0
  200. package/src/ui/hooks/useFollow.ts +16 -8
  201. package/src/ui/hooks/useSessionManagement.ts +5 -14
  202. package/src/ui/hooks/useSessionSocket.ts +4 -5
  203. package/src/ui/hooks/useWebSSO.ts +1 -1
  204. package/src/ui/navigation/routes.ts +13 -13
  205. package/src/ui/screens/OxyAuthScreen.tsx +6 -7
  206. package/src/ui/screens/ProfileScreen.tsx +15 -17
  207. package/src/ui/screens/WelcomeNewUserScreen.tsx +2 -2
  208. package/src/ui/screens/{karma/KarmaAboutScreen.tsx → trust/TrustAboutScreen.tsx} +15 -15
  209. package/src/ui/screens/{karma/KarmaCenterScreen.tsx → trust/TrustCenterScreen.tsx} +87 -41
  210. package/src/ui/screens/{karma/KarmaFAQScreen.tsx → trust/TrustFAQScreen.tsx} +10 -10
  211. package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +101 -0
  212. package/src/ui/screens/{karma/KarmaRewardsScreen.tsx → trust/TrustRewardsScreen.tsx} +54 -54
  213. package/src/ui/screens/{karma/KarmaRulesScreen.tsx → trust/TrustRulesScreen.tsx} +27 -13
  214. package/src/ui/screens/trust/trustTier.ts +20 -0
  215. package/src/ui/types/navigation.ts +1 -2
  216. package/src/utils/__tests__/deviceFlowSignIn.test.ts +2 -3
  217. package/src/utils/deviceFlowSignIn.ts +18 -12
  218. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +0 -1
  219. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +0 -1
  220. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +0 -1
  221. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +0 -1
  222. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +0 -1
  223. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +0 -1
  224. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +0 -1
  225. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +0 -1
  226. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +0 -1
  227. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +0 -1
  228. package/lib/typescript/commonjs/ui/screens/karma/KarmaAboutScreen.d.ts +0 -5
  229. package/lib/typescript/commonjs/ui/screens/karma/KarmaCenterScreen.d.ts +0 -5
  230. package/lib/typescript/commonjs/ui/screens/karma/KarmaCenterScreen.d.ts.map +0 -1
  231. package/lib/typescript/commonjs/ui/screens/karma/KarmaFAQScreen.d.ts.map +0 -1
  232. package/lib/typescript/commonjs/ui/screens/karma/KarmaLeaderboardScreen.d.ts +0 -5
  233. package/lib/typescript/commonjs/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +0 -1
  234. package/lib/typescript/commonjs/ui/screens/karma/KarmaRewardsScreen.d.ts +0 -5
  235. package/lib/typescript/commonjs/ui/screens/karma/KarmaRulesScreen.d.ts +0 -5
  236. package/lib/typescript/commonjs/ui/screens/karma/KarmaRulesScreen.d.ts.map +0 -1
  237. package/lib/typescript/module/ui/screens/karma/KarmaAboutScreen.d.ts +0 -5
  238. package/lib/typescript/module/ui/screens/karma/KarmaCenterScreen.d.ts +0 -5
  239. package/lib/typescript/module/ui/screens/karma/KarmaCenterScreen.d.ts.map +0 -1
  240. package/lib/typescript/module/ui/screens/karma/KarmaFAQScreen.d.ts.map +0 -1
  241. package/lib/typescript/module/ui/screens/karma/KarmaLeaderboardScreen.d.ts +0 -5
  242. package/lib/typescript/module/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +0 -1
  243. package/lib/typescript/module/ui/screens/karma/KarmaRewardsScreen.d.ts +0 -5
  244. package/lib/typescript/module/ui/screens/karma/KarmaRulesScreen.d.ts +0 -5
  245. package/lib/typescript/module/ui/screens/karma/KarmaRulesScreen.d.ts.map +0 -1
  246. package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +0 -88
@@ -4,22 +4,42 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
4
4
  import { View, Text, TouchableOpacity, StyleSheet, ScrollView, Modal, Pressable, Platform, ActivityIndicator } from 'react-native';
5
5
  import { Ionicons } from '@expo/vector-icons';
6
6
  import { toast, useDialogControl, Dialog } from '@oxyhq/bloom';
7
+ import { Divider } from '@oxyhq/bloom/divider';
7
8
  import { useTheme } from '@oxyhq/bloom/theme';
8
9
  import Avatar from "./Avatar.js";
9
10
  import { useOxy } from "../context/OxyContext.js";
10
11
  import { useI18n } from "../hooks/useI18n.js";
11
12
  import { logger as loggerUtil } from '@oxyhq/core';
12
13
  import { buildAccountRows } from "./accountMenuRows.js";
14
+ import { useDeviceAccounts } from "../hooks/useDeviceAccounts.js";
15
+
16
+ /**
17
+ * Web-only anchor for the popover panel. Each field anchors the panel against
18
+ * one viewport edge, so the popover can be placed against ANY corner: a
19
+ * top-right avatar chip opens downward/right-aligned (`{ top, right }`), while a
20
+ * bottom-left account button opens upward/left-aligned (`{ bottom, left }`).
21
+ *
22
+ * Callers MUST supply at most one vertical edge (`top` XOR `bottom`) and at most
23
+ * one horizontal edge (`left` XOR `right`). The panel has a fixed width and
24
+ * `maxHeight`, so a single vertical + single horizontal edge fully positions it.
25
+ * Supplying both opposite edges (e.g. `top` AND `bottom`) would stretch the
26
+ * panel on RN-Web and is unsupported.
27
+ */
13
28
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
29
  const isWeb = Platform.OS === 'web';
15
30
 
31
+ /** Fixed popover width on web. Callers that compute an anchor (e.g. inbox's
32
+ * MailboxDrawer) key their gutter math off this — keep them consistent. */
33
+ const PANEL_WIDTH = 360;
34
+
16
35
  /**
17
- * Reusable account menu modeled after the Google account chooser. Opens from
18
- * the avatar entry point (`AccountMenuButton`) or any other trigger.
36
+ * Unified, canonical account switcher for the Oxy ecosystem. Gmail-style: the
37
+ * accounts list sits at the top (current account first, with a checkmark), then
38
+ * "Add another account", "Manage account", and the sign-out actions.
19
39
  *
20
- * Reads everything it needs from `useOxy()` — never receive a session via
21
- * props. Renders as a popover anchored to the trigger on web, and as a
22
- * full-width bottom-sheet style modal on native.
40
+ * Reads everything it needs from `useOxy()` / `useDeviceAccounts()` — never
41
+ * receives a session via props. Renders as a popover anchored to the trigger on
42
+ * web, and as a full-width bottom-sheet style modal on native.
23
43
  */
24
44
  const AccountMenu = ({
25
45
  open,
@@ -29,39 +49,55 @@ const AccountMenu = ({
29
49
  anchor
30
50
  }) => {
31
51
  const {
32
- user,
33
- sessions,
34
52
  activeSessionId,
35
53
  switchSession,
36
54
  logout,
37
55
  logoutAll,
38
- oxyServices
56
+ removeSession
39
57
  } = useOxy();
40
58
  const {
41
- t,
42
- locale
59
+ t
43
60
  } = useI18n();
44
61
  const bloomTheme = useTheme();
62
+ const colors = bloomTheme.colors;
63
+
64
+ // Source EVERY account's real name/email/avatar/color from the unified
65
+ // device-account hook (shared apex `refresh-all` path on `*.oxy.so`, local
66
+ // `useOxy()` fallback on cross-domain web / native). This also synthesises a
67
+ // live-user row when the probe is empty, so the signed-in user is always
68
+ // represented (no "Not signed in" false negative).
69
+ const {
70
+ accounts: deviceAccounts
71
+ } = useDeviceAccounts();
45
72
  const [busySessionId, setBusySessionId] = useState(null);
73
+ const [removingSessionId, setRemovingSessionId] = useState(null);
46
74
  const [signingOut, setSigningOut] = useState(false);
47
75
  const [signingOutAll, setSigningOutAll] = useState(false);
48
76
  const signOutDialog = useDialogControl();
49
77
  const signOutAllDialog = useDialogControl();
50
78
  const containerRef = useRef(null);
51
- const firstActionRef = useRef(null);
52
- const rows = useMemo(() => buildAccountRows({
53
- sessions,
54
- activeSessionId,
55
- user,
56
- locale,
57
- getAvatarUrl: avatarId => oxyServices.getFileDownloadUrl(avatarId, 'thumb')
58
- }), [sessions, activeSessionId, user, locale, oxyServices]);
59
- const activeRow = useMemo(() => {
60
- return rows.find(r => r.isActive) ?? null;
61
- }, [rows]);
62
- const inactiveRows = useMemo(() => {
63
- return rows.filter(r => !r.isActive);
64
- }, [rows]);
79
+
80
+ // Current account first, then the rest in their existing order — matching
81
+ // the Gmail-style chooser the inbox design ports from.
82
+ const rows = useMemo(() => {
83
+ const built = buildAccountRows({
84
+ accounts: deviceAccounts
85
+ });
86
+ const current = built.filter(row => row.isActive);
87
+ const others = built.filter(row => !row.isActive);
88
+ return [...current, ...others];
89
+ }, [deviceAccounts]);
90
+ const isSwitching = busySessionId !== null;
91
+
92
+ // Switch to a non-active account. We route ALL rows through
93
+ // `useOxy().switchSession(sessionId)` — the SDK's canonical switch path. On
94
+ // WEB it already performs the same silent activation the auth chooser uses:
95
+ // when the target `ClientSession` carries an `authuser` slot, it rotates that
96
+ // slot via `oxyServices.refreshTokenViaCookie({ authuser })` and plants the
97
+ // fresh access token before validating (see `useSessionManagement.switchSession`).
98
+ // On NATIVE it validates the session id directly. There is no separate
99
+ // "activate by authuser" SDK entry point, so reusing `switchSession`
100
+ // (rather than inventing a parallel mechanism) keeps a single source of truth.
65
101
  const handleSwitch = useCallback(async sessionId => {
66
102
  if (sessionId === activeSessionId || busySessionId) {
67
103
  return;
@@ -82,6 +118,29 @@ const AccountMenu = ({
82
118
  setBusySessionId(null);
83
119
  }
84
120
  }, [activeSessionId, busySessionId, switchSession, t, onClose]);
121
+
122
+ // Sign out a SPECIFIC inactive account from its per-row icon. `removeSession`
123
+ // is the SDK's canonical per-session sign-out: it targets the given session
124
+ // id (cookie-cleared logout via `authuser` slot on web, bearer logout
125
+ // otherwise) and removes ONLY that account without switching/clearing the
126
+ // active session. The menu stays open so the user can keep managing accounts.
127
+ const handleRemove = useCallback(async sessionId => {
128
+ if (sessionId === activeSessionId || removingSessionId) {
129
+ return;
130
+ }
131
+ setRemovingSessionId(sessionId);
132
+ try {
133
+ await removeSession(sessionId);
134
+ toast.success(t('common.actions.signedOut') || 'Signed out');
135
+ } catch (error) {
136
+ loggerUtil.warn('Remove account failed', {
137
+ component: 'AccountMenu'
138
+ }, error);
139
+ toast.error(t('common.errors.signOutFailed') || 'Failed to sign out');
140
+ } finally {
141
+ setRemovingSessionId(null);
142
+ }
143
+ }, [activeSessionId, removingSessionId, removeSession, t]);
85
144
  const performSignOut = useCallback(async () => {
86
145
  if (signingOut) {
87
146
  return;
@@ -137,73 +196,52 @@ const AccountMenu = ({
137
196
  return null;
138
197
  }
139
198
  const overlayStyles = isWeb ? styles.webOverlay : styles.nativeOverlay;
140
- const panelStyles = isWeb ? [styles.panelBase, styles.panelWeb, anchor ? {
141
- top: anchor.top,
142
- right: anchor.right
199
+
200
+ // Apply ONLY the edges the anchor supplies (so the panel never sets
201
+ // conflicting opposite edges). When no anchor is provided, fall back to the
202
+ // historical top-right placement used by `AccountMenuButton`.
203
+ const anchorStyle = anchor ? {
204
+ ...(anchor.top !== undefined ? {
205
+ top: anchor.top
206
+ } : null),
207
+ ...(anchor.bottom !== undefined ? {
208
+ bottom: anchor.bottom
209
+ } : null),
210
+ ...(anchor.left !== undefined ? {
211
+ left: anchor.left
212
+ } : null),
213
+ ...(anchor.right !== undefined ? {
214
+ right: anchor.right
215
+ } : null)
143
216
  } : {
144
217
  top: 64,
145
218
  right: 16
146
- }, {
147
- backgroundColor: bloomTheme.colors.background,
148
- borderColor: bloomTheme.colors.border
219
+ };
220
+ const panelStyles = isWeb ? [styles.panelBase, styles.panelWeb, anchorStyle, {
221
+ backgroundColor: colors.background,
222
+ borderColor: colors.border
149
223
  }] : [styles.panelBase, styles.panelNative, {
150
- backgroundColor: bloomTheme.colors.background
224
+ backgroundColor: colors.background
151
225
  }];
152
- const content = /*#__PURE__*/_jsxs(View, {
153
- ref: containerRef,
226
+ const actionDisabled = isSwitching || signingOut || signingOutAll;
227
+ const content = /*#__PURE__*/_jsx(Pressable, {
228
+ ref: containerRef
229
+ // Swallow taps inside the panel so they never reach the overlay's
230
+ // outside-tap-to-close handler. (On web the panel is a direct,
231
+ // absolutely-positioned child of the overlay so the anchor resolves
232
+ // against the viewport.)
233
+ ,
234
+ onPress: () => undefined,
154
235
  style: panelStyles,
155
236
  accessibilityRole: "menu",
156
237
  accessibilityLabel: t('accountMenu.label') || 'Account menu',
157
- children: [activeRow ? /*#__PURE__*/_jsxs(View, {
158
- style: styles.header,
159
- children: [/*#__PURE__*/_jsx(Avatar, {
160
- uri: activeRow.avatarUri,
161
- name: activeRow.displayName,
162
- size: 64
163
- }), /*#__PURE__*/_jsx(Text, {
164
- style: [styles.headerName, {
165
- color: bloomTheme.colors.text
166
- }],
167
- numberOfLines: 1,
168
- children: activeRow.displayName
169
- }), activeRow.secondary ? /*#__PURE__*/_jsx(Text, {
170
- style: [styles.headerSecondary, {
171
- color: bloomTheme.colors.textSecondary
172
- }],
173
- numberOfLines: 1,
174
- children: activeRow.secondary
175
- }) : null]
176
- }) : /*#__PURE__*/_jsx(View, {
177
- style: styles.header,
178
- children: /*#__PURE__*/_jsx(Text, {
179
- style: [styles.headerName, {
180
- color: bloomTheme.colors.text
181
- }],
182
- children: t('common.status.notSignedIn') || 'Not signed in'
183
- })
184
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
185
- ref: firstActionRef,
186
- accessibilityRole: "menuitem",
187
- accessibilityLabel: t('accountMenu.manage') || 'Manage your Oxy Account',
188
- style: [styles.primaryButton, {
189
- borderColor: bloomTheme.colors.border
190
- }],
191
- onPress: () => {
192
- onClose();
193
- onNavigateManage();
194
- },
195
- children: /*#__PURE__*/_jsx(Text, {
196
- style: [styles.primaryButtonText, {
197
- color: bloomTheme.colors.primary
198
- }],
199
- children: t('accountMenu.manage') || 'Manage your Oxy Account'
200
- })
201
- }), rows.length > 0 ? /*#__PURE__*/_jsx(ScrollView, {
202
- style: styles.list,
203
- contentContainerStyle: styles.listContent,
238
+ children: /*#__PURE__*/_jsxs(ScrollView, {
239
+ style: styles.scroll,
240
+ contentContainerStyle: styles.scrollContent,
204
241
  showsVerticalScrollIndicator: false,
205
- children: rows.map(row => {
242
+ children: [rows.map(row => {
206
243
  const isBusy = busySessionId === row.sessionId;
244
+ const isRemoving = removingSessionId === row.sessionId;
207
245
  return /*#__PURE__*/_jsxs(TouchableOpacity, {
208
246
  accessibilityRole: "menuitem",
209
247
  accessibilityLabel: row.displayName,
@@ -211,101 +249,161 @@ const AccountMenu = ({
211
249
  selected: row.isActive
212
250
  },
213
251
  onPress: () => handleSwitch(row.sessionId),
214
- disabled: row.isActive || isBusy,
215
- style: [styles.row, row.isActive && {
216
- backgroundColor: bloomTheme.colors.primarySubtle
217
- }],
252
+ disabled: row.isActive || isBusy || isSwitching,
253
+ activeOpacity: 0.6,
254
+ style: [styles.accountRow, row.isActive && {
255
+ backgroundColor: colors.primarySubtle
256
+ }, isSwitching && !row.isActive && styles.rowDisabled],
218
257
  children: [/*#__PURE__*/_jsx(Avatar, {
219
258
  uri: row.avatarUri,
220
259
  name: row.displayName,
221
- size: 36
260
+ size: row.isActive ? 40 : 32
222
261
  }), /*#__PURE__*/_jsxs(View, {
223
- style: styles.rowInfo,
262
+ style: styles.accountInfo,
224
263
  children: [/*#__PURE__*/_jsx(Text, {
225
- style: [styles.rowName, {
226
- color: bloomTheme.colors.text
227
- }],
264
+ style: [styles.accountName, {
265
+ color: colors.text
266
+ }, row.isActive && styles.accountNameActive],
228
267
  numberOfLines: 1,
229
268
  children: row.displayName
230
269
  }), row.secondary ? /*#__PURE__*/_jsx(Text, {
231
- style: [styles.rowSecondary, {
232
- color: bloomTheme.colors.textSecondary
270
+ style: [styles.accountEmail, {
271
+ color: colors.textSecondary
233
272
  }],
234
273
  numberOfLines: 1,
235
274
  children: row.secondary
236
275
  }) : null]
237
276
  }), isBusy ? /*#__PURE__*/_jsx(ActivityIndicator, {
238
- color: bloomTheme.colors.primary,
277
+ color: colors.primary,
239
278
  size: "small"
240
279
  }) : row.isActive ? /*#__PURE__*/_jsx(Ionicons, {
241
- name: "checkmark-circle",
280
+ name: "checkmark",
242
281
  size: 20,
243
- color: bloomTheme.colors.primary
244
- }) : null]
282
+ color: colors.primary
283
+ }) : isRemoving ? /*#__PURE__*/_jsx(ActivityIndicator, {
284
+ color: colors.textSecondary,
285
+ size: "small"
286
+ }) : /*#__PURE__*/_jsx(TouchableOpacity, {
287
+ accessibilityRole: "button",
288
+ accessibilityLabel: t('accountMenu.signOutAccount', {
289
+ name: row.displayName
290
+ }) || `Sign out ${row.displayName}`,
291
+ onPress: () => handleRemove(row.sessionId),
292
+ disabled: isSwitching || removingSessionId !== null,
293
+ activeOpacity: 0.6,
294
+ hitSlop: {
295
+ top: 8,
296
+ bottom: 8,
297
+ left: 8,
298
+ right: 8
299
+ },
300
+ style: styles.rowSignOutButton,
301
+ children: /*#__PURE__*/_jsx(Ionicons, {
302
+ name: "log-out-outline",
303
+ size: 18,
304
+ color: colors.textSecondary
305
+ })
306
+ })]
245
307
  }, `account-${row.sessionId}`);
246
- })
247
- }) : null, /*#__PURE__*/_jsxs(TouchableOpacity, {
248
- accessibilityRole: "menuitem",
249
- accessibilityLabel: t('accountMenu.addAnother') || 'Add another account',
250
- onPress: () => {
251
- onClose();
252
- onAddAccount();
253
- },
254
- style: [styles.row, styles.actionRow],
255
- children: [/*#__PURE__*/_jsx(View, {
256
- style: [styles.actionIcon, {
257
- backgroundColor: bloomTheme.colors.primarySubtle
258
- }],
259
- children: /*#__PURE__*/_jsx(Ionicons, {
308
+ }), isSwitching ? /*#__PURE__*/_jsxs(View, {
309
+ style: styles.switchingRow,
310
+ children: [/*#__PURE__*/_jsx(ActivityIndicator, {
311
+ color: colors.textSecondary,
312
+ size: "small"
313
+ }), /*#__PURE__*/_jsx(Text, {
314
+ style: [styles.switchingText, {
315
+ color: colors.textSecondary
316
+ }],
317
+ children: t('accountMenu.switching') || 'Switching account…'
318
+ })]
319
+ }) : null, /*#__PURE__*/_jsx(Divider, {
320
+ color: colors.border,
321
+ spacing: 4
322
+ }), /*#__PURE__*/_jsxs(TouchableOpacity, {
323
+ accessibilityRole: "menuitem",
324
+ accessibilityLabel: t('accountMenu.addAnother') || 'Add another account',
325
+ onPress: () => {
326
+ onClose();
327
+ onAddAccount();
328
+ },
329
+ disabled: actionDisabled,
330
+ activeOpacity: 0.6,
331
+ style: [styles.actionRow, actionDisabled && styles.rowDisabled],
332
+ children: [/*#__PURE__*/_jsx(Ionicons, {
260
333
  name: "person-add-outline",
261
- size: 18,
262
- color: bloomTheme.colors.primary
263
- })
264
- }), /*#__PURE__*/_jsx(View, {
265
- style: styles.rowInfo,
266
- children: /*#__PURE__*/_jsx(Text, {
267
- style: [styles.rowName, {
268
- color: bloomTheme.colors.text
334
+ size: 20,
335
+ color: colors.icon
336
+ }), /*#__PURE__*/_jsx(Text, {
337
+ style: [styles.actionText, {
338
+ color: colors.text
269
339
  }],
270
340
  children: t('accountMenu.addAnother') || 'Add another account'
271
- })
272
- })]
273
- }), /*#__PURE__*/_jsxs(View, {
274
- style: [styles.footer, {
275
- borderTopColor: bloomTheme.colors.border
276
- }],
277
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
341
+ })]
342
+ }), /*#__PURE__*/_jsx(Divider, {
343
+ color: colors.border,
344
+ spacing: 4
345
+ }), /*#__PURE__*/_jsxs(TouchableOpacity, {
346
+ accessibilityRole: "menuitem",
347
+ accessibilityLabel: t('accountMenu.manage') || 'Manage your Oxy Account',
348
+ onPress: () => {
349
+ onClose();
350
+ onNavigateManage();
351
+ },
352
+ disabled: actionDisabled,
353
+ activeOpacity: 0.6,
354
+ style: [styles.actionRow, actionDisabled && styles.rowDisabled],
355
+ children: [/*#__PURE__*/_jsx(Ionicons, {
356
+ name: "settings-outline",
357
+ size: 18,
358
+ color: colors.icon
359
+ }), /*#__PURE__*/_jsx(Text, {
360
+ style: [styles.actionText, {
361
+ color: colors.text
362
+ }],
363
+ children: t('accountMenu.manage') || 'Manage your Oxy Account'
364
+ })]
365
+ }), /*#__PURE__*/_jsxs(TouchableOpacity, {
278
366
  accessibilityRole: "menuitem",
279
367
  accessibilityLabel: t('common.actions.signOut') || 'Sign out',
280
368
  onPress: () => signOutDialog.open(),
281
- disabled: signingOut || signingOutAll,
282
- style: styles.footerButton,
283
- children: signingOut ? /*#__PURE__*/_jsx(ActivityIndicator, {
284
- color: bloomTheme.colors.error,
369
+ disabled: actionDisabled,
370
+ activeOpacity: 0.6,
371
+ style: [styles.actionRow, actionDisabled && styles.rowDisabled],
372
+ children: [signingOut ? /*#__PURE__*/_jsx(ActivityIndicator, {
373
+ color: colors.error,
285
374
  size: "small"
286
- }) : /*#__PURE__*/_jsx(Text, {
287
- style: [styles.footerButtonText, {
288
- color: bloomTheme.colors.error
375
+ }) : /*#__PURE__*/_jsx(Ionicons, {
376
+ name: "log-out-outline",
377
+ size: 18,
378
+ color: colors.error
379
+ }), /*#__PURE__*/_jsx(Text, {
380
+ style: [styles.actionText, {
381
+ color: colors.error
289
382
  }],
290
383
  children: t('common.actions.signOut') || 'Sign out'
291
- })
292
- }), rows.length > 1 ? /*#__PURE__*/_jsx(TouchableOpacity, {
384
+ })]
385
+ }), rows.length > 1 ? /*#__PURE__*/_jsxs(TouchableOpacity, {
293
386
  accessibilityRole: "menuitem",
294
387
  accessibilityLabel: t('accountMenu.signOutAll') || 'Sign out of all accounts',
295
388
  onPress: () => signOutAllDialog.open(),
296
- disabled: signingOut || signingOutAll,
297
- style: styles.footerButton,
298
- children: signingOutAll ? /*#__PURE__*/_jsx(ActivityIndicator, {
299
- color: bloomTheme.colors.error,
389
+ disabled: actionDisabled,
390
+ activeOpacity: 0.6,
391
+ style: [styles.actionRow, actionDisabled && styles.rowDisabled],
392
+ children: [signingOutAll ? /*#__PURE__*/_jsx(ActivityIndicator, {
393
+ color: colors.error,
300
394
  size: "small"
301
- }) : /*#__PURE__*/_jsx(Text, {
302
- style: [styles.footerButtonText, {
303
- color: bloomTheme.colors.error
395
+ }) : /*#__PURE__*/_jsx(Ionicons, {
396
+ name: "log-out-outline",
397
+ size: 18,
398
+ color: colors.error
399
+ }), /*#__PURE__*/_jsx(Text, {
400
+ style: [styles.actionText, {
401
+ color: colors.error
304
402
  }],
305
403
  children: t('accountMenu.signOutAll') || 'Sign out of all accounts'
306
- })
404
+ })]
307
405
  }) : null]
308
- })]
406
+ })
309
407
  });
310
408
  return /*#__PURE__*/_jsxs(Modal, {
311
409
  visible: open,
@@ -317,11 +415,7 @@ const AccountMenu = ({
317
415
  accessibilityLabel: t('common.actions.close') || 'Close',
318
416
  onPress: onClose,
319
417
  style: overlayStyles,
320
- children: /*#__PURE__*/_jsx(Pressable, {
321
- onPress: () => undefined,
322
- style: styles.panelTouchable,
323
- children: content
324
- })
418
+ children: content
325
419
  }), /*#__PURE__*/_jsx(Dialog, {
326
420
  control: signOutDialog,
327
421
  title: t('common.actions.signOut') || 'Sign out',
@@ -352,19 +446,20 @@ const AccountMenu = ({
352
446
  const styles = StyleSheet.create({
353
447
  webOverlay: {
354
448
  flex: 1,
355
- backgroundColor: 'transparent'
449
+ backgroundColor: 'transparent',
450
+ // Explicit positioning context: the absolutely-positioned panel is a
451
+ // direct child and resolves its anchor edges (top/bottom/left/right)
452
+ // against this full-viewport overlay — matching the trigger-rect math
453
+ // callers compute from `window.innerWidth` / `window.innerHeight`.
454
+ position: 'relative'
356
455
  },
357
456
  nativeOverlay: {
358
457
  flex: 1,
359
458
  backgroundColor: 'rgba(0,0,0,0.32)',
360
459
  justifyContent: 'flex-end'
361
460
  },
362
- panelTouchable: {
363
- // Pressable wrapper that owns no styling — just absorbs taps.
364
- },
365
461
  panelBase: {
366
- borderRadius: 24,
367
- paddingVertical: 12,
462
+ borderRadius: 12,
368
463
  shadowColor: '#000',
369
464
  shadowOpacity: 0.18,
370
465
  shadowRadius: 24,
@@ -377,103 +472,79 @@ const styles = StyleSheet.create({
377
472
  },
378
473
  panelWeb: {
379
474
  position: 'absolute',
380
- width: 360,
475
+ width: PANEL_WIDTH,
381
476
  maxHeight: '85%',
382
477
  borderWidth: 1
383
478
  },
384
479
  panelNative: {
385
480
  marginHorizontal: 0,
386
- borderTopLeftRadius: 28,
387
- borderTopRightRadius: 28,
481
+ borderTopLeftRadius: 20,
482
+ borderTopRightRadius: 20,
388
483
  borderBottomLeftRadius: 0,
389
484
  borderBottomRightRadius: 0,
390
- paddingTop: 20,
391
- paddingBottom: 24,
485
+ paddingBottom: 12,
392
486
  maxHeight: '85%'
393
487
  },
394
- header: {
488
+ scroll: {
489
+ flexGrow: 0
490
+ },
491
+ scrollContent: {
492
+ paddingVertical: 4
493
+ },
494
+ accountRow: {
495
+ flexDirection: 'row',
395
496
  alignItems: 'center',
396
- paddingHorizontal: 20,
397
- paddingVertical: 16
497
+ paddingHorizontal: 14,
498
+ paddingVertical: 10,
499
+ gap: 10
398
500
  },
399
- headerName: {
400
- fontSize: 18,
401
- fontWeight: '600',
402
- marginTop: 12,
403
- textAlign: 'center'
501
+ rowDisabled: {
502
+ opacity: 0.4
404
503
  },
405
- headerSecondary: {
406
- fontSize: 14,
407
- marginTop: 4,
408
- textAlign: 'center'
504
+ accountInfo: {
505
+ flex: 1,
506
+ minWidth: 0
409
507
  },
410
- primaryButton: {
411
- marginHorizontal: 20,
412
- marginBottom: 12,
413
- paddingVertical: 12,
414
- paddingHorizontal: 16,
415
- borderRadius: 999,
416
- borderWidth: 1,
417
- alignItems: 'center'
508
+ accountName: {
509
+ fontSize: 13,
510
+ fontWeight: '500'
418
511
  },
419
- primaryButtonText: {
420
- fontSize: 14,
512
+ accountNameActive: {
421
513
  fontWeight: '600'
422
514
  },
423
- list: {
424
- maxHeight: 280
515
+ accountEmail: {
516
+ fontSize: 11,
517
+ marginTop: 1
425
518
  },
426
- listContent: {
427
- paddingHorizontal: 12,
428
- paddingBottom: 4
429
- },
430
- row: {
431
- flexDirection: 'row',
519
+ rowSignOutButton: {
520
+ width: 28,
521
+ height: 28,
432
522
  alignItems: 'center',
433
- paddingVertical: 10,
434
- paddingHorizontal: 12,
435
- borderRadius: 16,
436
- marginVertical: 2
437
- },
438
- actionRow: {
439
- marginHorizontal: 12,
440
- marginTop: 4
523
+ justifyContent: 'center',
524
+ borderRadius: 14,
525
+ opacity: 0.6
441
526
  },
442
- actionIcon: {
443
- width: 36,
444
- height: 36,
445
- borderRadius: 18,
527
+ switchingRow: {
528
+ flexDirection: 'row',
446
529
  alignItems: 'center',
447
- justifyContent: 'center'
530
+ justifyContent: 'center',
531
+ paddingVertical: 8,
532
+ gap: 8
448
533
  },
449
- rowInfo: {
450
- flex: 1,
451
- marginLeft: 12
452
- },
453
- rowName: {
454
- fontSize: 15,
534
+ switchingText: {
535
+ fontSize: 12,
455
536
  fontWeight: '500'
456
537
  },
457
- rowSecondary: {
458
- fontSize: 13,
459
- marginTop: 2
460
- },
461
- footer: {
462
- marginTop: 12,
463
- paddingTop: 8,
464
- paddingHorizontal: 12,
465
- borderTopWidth: StyleSheet.hairlineWidth,
538
+ actionRow: {
466
539
  flexDirection: 'row',
467
- flexWrap: 'wrap',
468
- justifyContent: 'space-around'
469
- },
470
- footerButton: {
471
- paddingVertical: 10,
472
- paddingHorizontal: 12
540
+ alignItems: 'center',
541
+ paddingHorizontal: 14,
542
+ paddingVertical: 12,
543
+ gap: 10
473
544
  },
474
- footerButtonText: {
475
- fontSize: 14,
476
- fontWeight: '600'
545
+ actionText: {
546
+ fontSize: 13,
547
+ fontWeight: '500'
477
548
  }
478
549
  });
479
550
  export default AccountMenu;