@oxyhq/services 5.11.9 → 5.11.10

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 (192) hide show
  1. package/lib/commonjs/ui/components/AnimationExample.js +213 -0
  2. package/lib/commonjs/ui/components/AnimationExample.js.map +1 -0
  3. package/lib/commonjs/ui/components/FollowButton.js +58 -47
  4. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  5. package/lib/commonjs/ui/components/GroupedItem.js +2 -1
  6. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
  7. package/lib/commonjs/ui/components/GroupedSection.js +3 -0
  8. package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
  9. package/lib/commonjs/ui/components/Header.js +25 -11
  10. package/lib/commonjs/ui/components/Header.js.map +1 -1
  11. package/lib/commonjs/ui/components/OxyProvider.js +69 -33
  12. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  13. package/lib/commonjs/ui/components/ProfileCard.js +5 -1
  14. package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
  15. package/lib/commonjs/ui/components/index.js +0 -7
  16. package/lib/commonjs/ui/components/index.js.map +1 -1
  17. package/lib/commonjs/ui/components/internal/TextField.js +8 -4
  18. package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
  19. package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js +161 -0
  20. package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -0
  21. package/lib/commonjs/ui/context/OxyContext.js +97 -38
  22. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  23. package/lib/commonjs/ui/hooks/useFollow.types.js +2 -0
  24. package/lib/commonjs/ui/hooks/useFollow.types.js.map +1 -0
  25. package/lib/commonjs/ui/navigation/OxyRouter.js +10 -0
  26. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
  27. package/lib/commonjs/ui/screens/AccountCenterScreen.js +26 -14
  28. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  29. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +3 -3
  30. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  31. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +64 -15
  32. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  33. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +4 -4
  34. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  35. package/lib/commonjs/ui/screens/FeedbackScreen.js +72 -75
  36. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  37. package/lib/commonjs/ui/screens/FileManagementScreen.js +286 -126
  38. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  39. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +322 -0
  40. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -0
  41. package/lib/commonjs/ui/screens/ProfileScreen.js +1 -1
  42. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  43. package/lib/commonjs/ui/screens/SessionManagementScreen.js +176 -174
  44. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  45. package/lib/commonjs/ui/screens/SignInScreen.js +43 -52
  46. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  47. package/lib/commonjs/ui/screens/SignUpScreen.js +6 -4
  48. package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +386 -0
  50. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -0
  51. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +25 -15
  52. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  53. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +16 -9
  54. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  55. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +1 -1
  56. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  57. package/lib/commonjs/ui/styles/authStyles.js +1 -1
  58. package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
  59. package/lib/module/ui/components/AnimationExample.js +209 -0
  60. package/lib/module/ui/components/AnimationExample.js.map +1 -0
  61. package/lib/module/ui/components/FollowButton.js +58 -47
  62. package/lib/module/ui/components/FollowButton.js.map +1 -1
  63. package/lib/module/ui/components/GroupedItem.js +2 -1
  64. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  65. package/lib/module/ui/components/GroupedSection.js +3 -0
  66. package/lib/module/ui/components/GroupedSection.js.map +1 -1
  67. package/lib/module/ui/components/Header.js +25 -11
  68. package/lib/module/ui/components/Header.js.map +1 -1
  69. package/lib/module/ui/components/OxyProvider.js +70 -34
  70. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  71. package/lib/module/ui/components/ProfileCard.js +5 -1
  72. package/lib/module/ui/components/ProfileCard.js.map +1 -1
  73. package/lib/module/ui/components/index.js +0 -1
  74. package/lib/module/ui/components/index.js.map +1 -1
  75. package/lib/module/ui/components/internal/TextField.js +8 -4
  76. package/lib/module/ui/components/internal/TextField.js.map +1 -1
  77. package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js +156 -0
  78. package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -0
  79. package/lib/module/ui/context/OxyContext.js +97 -39
  80. package/lib/module/ui/context/OxyContext.js.map +1 -1
  81. package/lib/module/ui/hooks/useFollow.types.js +2 -0
  82. package/lib/module/ui/hooks/useFollow.types.js.map +1 -0
  83. package/lib/module/ui/navigation/OxyRouter.js +10 -0
  84. package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
  85. package/lib/module/ui/screens/AccountCenterScreen.js +12 -1
  86. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  87. package/lib/module/ui/screens/AccountOverviewScreen.js +3 -3
  88. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  89. package/lib/module/ui/screens/AccountSettingsScreen.js +64 -15
  90. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  91. package/lib/module/ui/screens/AccountSwitcherScreen.js +4 -4
  92. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  93. package/lib/module/ui/screens/FeedbackScreen.js +72 -75
  94. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  95. package/lib/module/ui/screens/FileManagementScreen.js +285 -125
  96. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  97. package/lib/module/ui/screens/LanguageSelectorScreen.js +319 -0
  98. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -0
  99. package/lib/module/ui/screens/ProfileScreen.js +1 -1
  100. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  101. package/lib/module/ui/screens/SessionManagementScreen.js +177 -175
  102. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  103. package/lib/module/ui/screens/SignInScreen.js +44 -53
  104. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  105. package/lib/module/ui/screens/SignUpScreen.js +6 -4
  106. package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
  107. package/lib/module/ui/screens/WelcomeNewUserScreen.js +382 -0
  108. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -0
  109. package/lib/module/ui/screens/internal/SignInPasswordStep.js +23 -14
  110. package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  111. package/lib/module/ui/screens/internal/SignInUsernameStep.js +15 -9
  112. package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  113. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +1 -1
  114. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  115. package/lib/module/ui/styles/authStyles.js +1 -1
  116. package/lib/module/ui/styles/authStyles.js.map +1 -1
  117. package/lib/typescript/models/interfaces.d.ts +1 -5
  118. package/lib/typescript/models/interfaces.d.ts.map +1 -1
  119. package/lib/typescript/models/session.d.ts +1 -4
  120. package/lib/typescript/models/session.d.ts.map +1 -1
  121. package/lib/typescript/ui/components/AnimationExample.d.ts +4 -0
  122. package/lib/typescript/ui/components/AnimationExample.d.ts.map +1 -0
  123. package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
  124. package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
  125. package/lib/typescript/ui/components/Header.d.ts +9 -0
  126. package/lib/typescript/ui/components/Header.d.ts.map +1 -1
  127. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  128. package/lib/typescript/ui/components/ProfileCard.d.ts +1 -3
  129. package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -1
  130. package/lib/typescript/ui/components/index.d.ts +0 -1
  131. package/lib/typescript/ui/components/index.d.ts.map +1 -1
  132. package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
  133. package/lib/typescript/ui/components/photogrid/JustifiedPhotoGrid.d.ts +27 -0
  134. package/lib/typescript/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -0
  135. package/lib/typescript/ui/context/OxyContext.d.ts +6 -2
  136. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  137. package/lib/typescript/ui/hooks/useFollow.types.d.ts +33 -0
  138. package/lib/typescript/ui/hooks/useFollow.types.d.ts.map +1 -0
  139. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
  140. package/lib/typescript/ui/navigation/types.d.ts +5 -0
  141. package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
  142. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  143. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  144. package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
  145. package/lib/typescript/ui/screens/FileManagementScreen.d.ts +18 -1
  146. package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
  147. package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts +7 -0
  148. package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts.map +1 -0
  149. package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
  150. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  151. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  152. package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
  153. package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts +13 -0
  154. package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -0
  155. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +5 -5
  156. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -1
  157. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +4 -4
  158. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -1
  159. package/lib/typescript/ui/styles/authStyles.d.ts +1 -1
  160. package/package.json +10 -2
  161. package/src/models/interfaces.ts +2 -5
  162. package/src/models/session.ts +1 -4
  163. package/src/ui/components/AnimationExample.tsx +194 -0
  164. package/src/ui/components/FollowButton.tsx +65 -45
  165. package/src/ui/components/GroupedItem.tsx +1 -0
  166. package/src/ui/components/GroupedSection.tsx +1 -1
  167. package/src/ui/components/Header.tsx +36 -12
  168. package/src/ui/components/OxyProvider.tsx +66 -32
  169. package/src/ui/components/ProfileCard.tsx +6 -8
  170. package/src/ui/components/index.ts +0 -1
  171. package/src/ui/components/internal/TextField.tsx +12 -6
  172. package/src/ui/components/photogrid/JustifiedPhotoGrid.tsx +158 -0
  173. package/src/ui/context/OxyContext.tsx +84 -54
  174. package/src/ui/hooks/useFollow.types.ts +33 -0
  175. package/src/ui/navigation/OxyRouter.tsx +10 -0
  176. package/src/ui/navigation/types.ts +6 -0
  177. package/src/ui/screens/AccountCenterScreen.tsx +13 -7
  178. package/src/ui/screens/AccountOverviewScreen.tsx +3 -3
  179. package/src/ui/screens/AccountSettingsScreen.tsx +65 -13
  180. package/src/ui/screens/AccountSwitcherScreen.tsx +4 -4
  181. package/src/ui/screens/FeedbackScreen.tsx +57 -80
  182. package/src/ui/screens/FileManagementScreen.tsx +278 -175
  183. package/src/ui/screens/LanguageSelectorScreen.tsx +322 -0
  184. package/src/ui/screens/ProfileScreen.tsx +6 -1
  185. package/src/ui/screens/SessionManagementScreen.tsx +148 -151
  186. package/src/ui/screens/SignInScreen.tsx +43 -62
  187. package/src/ui/screens/SignUpScreen.tsx +3 -5
  188. package/src/ui/screens/WelcomeNewUserScreen.tsx +272 -0
  189. package/src/ui/screens/internal/SignInPasswordStep.tsx +28 -13
  190. package/src/ui/screens/internal/SignInUsernameStep.tsx +21 -11
  191. package/src/ui/screens/karma/KarmaCenterScreen.tsx +1 -1
  192. package/src/ui/styles/authStyles.ts +1 -1
@@ -5,7 +5,7 @@ import { View, Text, TouchableOpacity, StyleSheet, ScrollView, ActivityIndicator
5
5
  import { useOxy } from '../context/OxyContext';
6
6
  import { toast } from '../../lib/sonner';
7
7
  import { confirmAction } from '../utils/confirmAction';
8
- import { Header } from '../components';
8
+ import { Header, GroupedSection } from '../components';
9
9
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
10
10
  const SessionManagementScreen = ({
11
11
  onClose,
@@ -18,11 +18,13 @@ const SessionManagementScreen = ({
18
18
  refreshSessions,
19
19
  logout,
20
20
  logoutAll,
21
- oxyServices
21
+ switchSession
22
22
  } = useOxy();
23
23
  const [loading, setLoading] = useState(true);
24
24
  const [refreshing, setRefreshing] = useState(false);
25
25
  const [actionLoading, setActionLoading] = useState(null);
26
+ const [switchLoading, setSwitchLoading] = useState(null);
27
+ const [lastRefreshed, setLastRefreshed] = useState(null);
26
28
  const isDarkTheme = theme === 'dark';
27
29
  const textColor = isDarkTheme ? '#FFFFFF' : '#000000';
28
30
  const backgroundColor = isDarkTheme ? '#121212' : '#FFFFFF';
@@ -39,6 +41,7 @@ const SessionManagementScreen = ({
39
41
  setLoading(true);
40
42
  }
41
43
  await refreshSessions();
44
+ setLastRefreshed(new Date());
42
45
  } catch (error) {
43
46
  console.error('Failed to load sessions:', error);
44
47
  if (Platform.OS === 'web') {
@@ -104,30 +107,36 @@ const SessionManagementScreen = ({
104
107
  }
105
108
  });
106
109
  };
107
- const formatDate = dateString => {
110
+
111
+ // Relative time formatter (past & future)
112
+ const formatRelative = dateString => {
113
+ if (!dateString) return 'Unknown';
108
114
  const date = new Date(dateString);
109
115
  const now = new Date();
110
- const diffInMinutes = Math.floor((now.getTime() - date.getTime()) / (1000 * 60));
111
- if (diffInMinutes < 1) return 'Just now';
112
- if (diffInMinutes < 60) return `${diffInMinutes}m ago`;
113
- if (diffInMinutes < 1440) return `${Math.floor(diffInMinutes / 60)}h ago`;
114
- if (diffInMinutes < 10080) return `${Math.floor(diffInMinutes / 1440)}d ago`;
116
+ const diffMs = date.getTime() - now.getTime();
117
+ const absMin = Math.abs(diffMs) / 60000;
118
+ const isFuture = diffMs > 0;
119
+ const fmt = n => n < 1 ? 'moments' : Math.floor(n);
120
+ if (absMin < 1) return isFuture ? 'in moments' : 'just now';
121
+ if (absMin < 60) return isFuture ? `in ${fmt(absMin)}m` : `${fmt(absMin)}m ago`;
122
+ const hrs = absMin / 60;
123
+ if (hrs < 24) return isFuture ? `in ${fmt(hrs)}h` : `${fmt(hrs)}h ago`;
124
+ const days = hrs / 24;
125
+ if (days < 7) return isFuture ? `in ${fmt(days)}d` : `${fmt(days)}d ago`;
115
126
  return date.toLocaleDateString();
116
127
  };
117
- const getDeviceIcon = (deviceType, platform) => {
118
- if (platform.toLowerCase().includes('ios') || platform.toLowerCase().includes('iphone')) {
119
- return '📱';
120
- }
121
- if (platform.toLowerCase().includes('android')) {
122
- return '📱';
123
- }
124
- if (deviceType.toLowerCase().includes('mobile')) {
125
- return '📱';
126
- }
127
- if (deviceType.toLowerCase().includes('tablet')) {
128
- return '📱';
128
+ const handleSwitchSession = async sessionId => {
129
+ if (sessionId === activeSessionId) return;
130
+ setSwitchLoading(sessionId);
131
+ try {
132
+ await switchSession(sessionId);
133
+ toast.success('Switched session');
134
+ } catch (e) {
135
+ console.error('Switch session failed', e);
136
+ toast.error('Failed to switch session');
137
+ } finally {
138
+ setSwitchLoading(null);
129
139
  }
130
- return '💻'; // Desktop/web
131
140
  };
132
141
  useEffect(() => {
133
142
  loadSessions();
@@ -148,6 +157,101 @@ const SessionManagementScreen = ({
148
157
  })]
149
158
  });
150
159
  }
160
+
161
+ // Build grouped section items for sessions
162
+ const sessionItems = userSessions.map(session => {
163
+ const isCurrent = session.sessionId === activeSessionId;
164
+ const subtitleParts = [];
165
+ if (session.deviceId) subtitleParts.push(`Device ${session.deviceId.substring(0, 10)}...`);
166
+ subtitleParts.push(`Last ${formatRelative(session.lastActive)}`);
167
+ subtitleParts.push(`Expires ${formatRelative(session.expiresAt)}`);
168
+ return {
169
+ id: session.sessionId,
170
+ icon: isCurrent ? 'shield-checkmark' : 'laptop-outline',
171
+ iconColor: isCurrent ? successColor : primaryColor,
172
+ title: isCurrent ? 'Current Session' : `Session ${session.sessionId.substring(0, 8)}...`,
173
+ subtitle: subtitleParts.join(' \u2022 '),
174
+ showChevron: false,
175
+ multiRow: true,
176
+ customContentBelow: !isCurrent ? /*#__PURE__*/_jsxs(View, {
177
+ style: styles.sessionActionsRow,
178
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
179
+ onPress: () => handleSwitchSession(session.sessionId),
180
+ style: [styles.sessionPillButton, {
181
+ backgroundColor: isDarkTheme ? '#1E2A38' : '#E6F2FF',
182
+ borderColor: primaryColor
183
+ }],
184
+ disabled: switchLoading === session.sessionId || actionLoading === session.sessionId,
185
+ children: switchLoading === session.sessionId ? /*#__PURE__*/_jsx(ActivityIndicator, {
186
+ size: "small",
187
+ color: primaryColor
188
+ }) : /*#__PURE__*/_jsx(Text, {
189
+ style: [styles.sessionPillText, {
190
+ color: primaryColor
191
+ }],
192
+ children: "Switch"
193
+ })
194
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
195
+ onPress: () => handleLogoutSession(session.sessionId),
196
+ style: [styles.sessionPillButton, {
197
+ backgroundColor: isDarkTheme ? '#3A1E1E' : '#FFEBEE',
198
+ borderColor: dangerColor
199
+ }],
200
+ disabled: actionLoading === session.sessionId || switchLoading === session.sessionId,
201
+ children: actionLoading === session.sessionId ? /*#__PURE__*/_jsx(ActivityIndicator, {
202
+ size: "small",
203
+ color: dangerColor
204
+ }) : /*#__PURE__*/_jsx(Text, {
205
+ style: [styles.sessionPillText, {
206
+ color: dangerColor
207
+ }],
208
+ children: "Logout"
209
+ })
210
+ })]
211
+ }) : /*#__PURE__*/_jsx(View, {
212
+ style: styles.sessionActionsRow,
213
+ children: /*#__PURE__*/_jsx(Text, {
214
+ style: [styles.currentBadgeText, {
215
+ color: successColor
216
+ }],
217
+ children: "Active"
218
+ })
219
+ }),
220
+ selected: isCurrent,
221
+ dense: true
222
+ };
223
+ });
224
+
225
+ // Bulk actions as grouped section items
226
+ const bulkItems = [{
227
+ id: 'logout-others',
228
+ icon: 'exit-outline',
229
+ iconColor: primaryColor,
230
+ title: 'Logout Other Sessions',
231
+ subtitle: userSessions.filter(s => s.sessionId !== activeSessionId).length === 0 ? 'No other sessions' : 'End all sessions except this one',
232
+ onPress: handleLogoutOtherSessions,
233
+ showChevron: false,
234
+ customContent: actionLoading === 'others' ? /*#__PURE__*/_jsx(ActivityIndicator, {
235
+ size: "small",
236
+ color: primaryColor
237
+ }) : undefined,
238
+ disabled: actionLoading === 'others' || userSessions.filter(s => s.sessionId !== activeSessionId).length === 0,
239
+ dense: true
240
+ }, {
241
+ id: 'logout-all',
242
+ icon: 'warning-outline',
243
+ iconColor: dangerColor,
244
+ title: 'Logout All Sessions',
245
+ subtitle: 'End all sessions including this one',
246
+ onPress: handleLogoutAllSessions,
247
+ showChevron: false,
248
+ customContent: actionLoading === 'all' ? /*#__PURE__*/_jsx(ActivityIndicator, {
249
+ size: "small",
250
+ color: dangerColor
251
+ }) : undefined,
252
+ disabled: actionLoading === 'all',
253
+ dense: true
254
+ }];
151
255
  return /*#__PURE__*/_jsxs(View, {
152
256
  style: [styles.container, {
153
257
  backgroundColor
@@ -167,102 +271,28 @@ const SessionManagementScreen = ({
167
271
  tintColor: primaryColor
168
272
  }),
169
273
  children: userSessions.length > 0 ? /*#__PURE__*/_jsxs(_Fragment, {
170
- children: [userSessions.map(session => /*#__PURE__*/_jsxs(View, {
171
- style: [styles.sessionCard, {
172
- backgroundColor: secondaryBackgroundColor,
173
- borderColor,
174
- borderLeftColor: session.sessionId === activeSessionId ? successColor : borderColor
274
+ children: [lastRefreshed && /*#__PURE__*/_jsxs(Text, {
275
+ style: [styles.metaText, {
276
+ color: isDarkTheme ? '#777' : '#777',
277
+ marginBottom: 6
175
278
  }],
176
- children: [/*#__PURE__*/_jsx(View, {
177
- style: styles.sessionHeader,
178
- children: /*#__PURE__*/_jsxs(View, {
179
- style: styles.sessionTitleRow,
180
- children: [/*#__PURE__*/_jsx(Text, {
181
- style: styles.deviceIcon,
182
- children: "\uD83D\uDCBB"
183
- }), /*#__PURE__*/_jsxs(View, {
184
- style: styles.sessionTitleText,
185
- children: [/*#__PURE__*/_jsxs(Text, {
186
- style: [styles.deviceName, {
187
- color: textColor
188
- }],
189
- children: ["Session ", session.sessionId.substring(0, 8), "..."]
190
- }), session.sessionId === activeSessionId && /*#__PURE__*/_jsx(Text, {
191
- style: [styles.currentBadge, {
192
- color: successColor
193
- }],
194
- children: "Current Session"
195
- })]
196
- })]
197
- })
198
- }), /*#__PURE__*/_jsxs(View, {
199
- style: styles.sessionDetails,
200
- children: [/*#__PURE__*/_jsxs(Text, {
201
- style: [styles.sessionDetail, {
202
- color: isDarkTheme ? '#BBBBBB' : '#666666'
203
- }],
204
- children: ["Device ID: ", session.deviceId ? session.deviceId.substring(0, 12) + '...' : 'Unknown']
205
- }), /*#__PURE__*/_jsxs(Text, {
206
- style: [styles.sessionDetail, {
207
- color: isDarkTheme ? '#BBBBBB' : '#666666'
208
- }],
209
- children: ["Last active: ", session.lastActive ? new Date(session.lastActive).toLocaleDateString() : 'Unknown']
210
- }), /*#__PURE__*/_jsxs(Text, {
211
- style: [styles.sessionDetail, {
212
- color: isDarkTheme ? '#BBBBBB' : '#666666'
213
- }],
214
- children: ["Expires: ", session.expiresAt ? new Date(session.expiresAt).toLocaleDateString() : 'Unknown']
215
- })]
216
- }), session.sessionId !== activeSessionId && /*#__PURE__*/_jsx(TouchableOpacity, {
217
- style: [styles.logoutButton, {
218
- backgroundColor: isDarkTheme ? '#400000' : '#FFEBEE'
219
- }],
220
- onPress: () => handleLogoutSession(session.sessionId),
221
- disabled: actionLoading === session.sessionId,
222
- children: actionLoading === session.sessionId ? /*#__PURE__*/_jsx(ActivityIndicator, {
223
- size: "small",
224
- color: dangerColor
225
- }) : /*#__PURE__*/_jsx(Text, {
226
- style: [styles.logoutButtonText, {
227
- color: dangerColor
228
- }],
229
- children: "Logout"
230
- })
231
- })]
232
- }, session.sessionId)), /*#__PURE__*/_jsxs(View, {
233
- style: styles.bulkActions,
234
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
235
- style: [styles.bulkActionButton, {
236
- backgroundColor: isDarkTheme ? '#1A1A1A' : '#F0F0F0',
237
- borderColor
238
- }],
239
- onPress: handleLogoutOtherSessions,
240
- disabled: actionLoading === 'others' || userSessions.filter(s => s.sessionId !== activeSessionId).length === 0,
241
- children: actionLoading === 'others' ? /*#__PURE__*/_jsx(ActivityIndicator, {
242
- size: "small",
243
- color: primaryColor
244
- }) : /*#__PURE__*/_jsx(Text, {
245
- style: [styles.bulkActionButtonText, {
246
- color: textColor
247
- }],
248
- children: "Logout Other Sessions"
249
- })
250
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
251
- style: [styles.bulkActionButton, styles.dangerButton, {
252
- backgroundColor: isDarkTheme ? '#400000' : '#FFEBEE'
253
- }],
254
- onPress: handleLogoutAllSessions,
255
- disabled: actionLoading === 'all',
256
- children: actionLoading === 'all' ? /*#__PURE__*/_jsx(ActivityIndicator, {
257
- size: "small",
258
- color: dangerColor
259
- }) : /*#__PURE__*/_jsx(Text, {
260
- style: [styles.bulkActionButtonText, {
261
- color: dangerColor
262
- }],
263
- children: "Logout All Sessions"
264
- })
265
- })]
279
+ children: ["Last refreshed ", formatRelative(lastRefreshed.toISOString())]
280
+ }), /*#__PURE__*/_jsx(View, {
281
+ style: styles.fullBleed,
282
+ children: /*#__PURE__*/_jsx(GroupedSection, {
283
+ items: sessionItems,
284
+ theme: theme
285
+ })
286
+ }), /*#__PURE__*/_jsx(View, {
287
+ style: {
288
+ height: 12
289
+ }
290
+ }), /*#__PURE__*/_jsx(View, {
291
+ style: styles.fullBleed,
292
+ children: /*#__PURE__*/_jsx(GroupedSection, {
293
+ items: bulkItems,
294
+ theme: theme
295
+ })
266
296
  })]
267
297
  }) : /*#__PURE__*/_jsx(View, {
268
298
  style: styles.emptyState,
@@ -305,74 +335,46 @@ const styles = StyleSheet.create({
305
335
  padding: 20,
306
336
  paddingTop: 0
307
337
  },
308
- sessionCard: {
309
- borderRadius: 12,
310
- borderWidth: 1,
311
- borderLeftWidth: 4,
312
- padding: 16,
313
- marginBottom: 12
314
- },
315
- sessionHeader: {
316
- marginBottom: 12
338
+ // Removed legacy session card & bulk action styles (now using GroupedSection)
339
+ sessionActionsRow: {
340
+ flexDirection: 'row',
341
+ gap: 8,
342
+ marginTop: 6
317
343
  },
318
- sessionTitleRow: {
344
+ sessionPillButton: {
345
+ paddingHorizontal: 14,
346
+ paddingVertical: 6,
347
+ borderRadius: 20,
348
+ borderWidth: 1,
319
349
  flexDirection: 'row',
320
350
  alignItems: 'center'
321
351
  },
322
- deviceIcon: {
323
- fontSize: 20,
324
- marginRight: 12
325
- },
326
- sessionTitleText: {
327
- flex: 1
328
- },
329
- deviceName: {
330
- fontSize: 16,
352
+ sessionPillText: {
353
+ fontSize: 12,
331
354
  fontWeight: '600',
332
- marginBottom: 2
355
+ letterSpacing: 0.3,
356
+ textTransform: 'uppercase'
333
357
  },
334
- currentBadge: {
358
+ currentBadgeText: {
335
359
  fontSize: 12,
336
- fontWeight: '500'
337
- },
338
- sessionDetails: {
339
- marginBottom: 12
340
- },
341
- sessionDetail: {
342
- fontSize: 14,
343
- marginBottom: 2
344
- },
345
- logoutButton: {
346
- paddingVertical: 8,
347
- paddingHorizontal: 16,
348
- borderRadius: 6,
349
- alignItems: 'center',
350
- alignSelf: 'flex-start'
351
- },
352
- logoutButtonText: {
353
- fontSize: 14,
354
- fontWeight: '500'
355
- },
356
- bulkActions: {
357
- marginTop: 20,
358
- paddingTop: 20,
359
- borderTopWidth: 1,
360
- borderTopColor: '#E0E0E0'
361
- },
362
- bulkActionButton: {
363
- paddingVertical: 12,
364
- paddingHorizontal: 20,
365
- borderRadius: 8,
366
- borderWidth: 1,
367
- alignItems: 'center',
368
- marginBottom: 12
360
+ fontWeight: '600',
361
+ paddingHorizontal: 10,
362
+ paddingVertical: 4,
363
+ backgroundColor: '#2E7D3215',
364
+ borderRadius: 16,
365
+ overflow: 'hidden',
366
+ textTransform: 'uppercase',
367
+ letterSpacing: 0.5
369
368
  },
370
- dangerButton: {
371
- borderColor: 'transparent'
369
+ metaText: {
370
+ fontSize: 12,
371
+ textTransform: 'uppercase',
372
+ letterSpacing: 0.5,
373
+ fontWeight: '600'
372
374
  },
373
- bulkActionButtonText: {
374
- fontSize: 16,
375
- fontWeight: '500'
375
+ fullBleed: {
376
+ width: '100%',
377
+ alignSelf: 'stretch'
376
378
  },
377
379
  emptyState: {
378
380
  alignItems: 'center',
@@ -1 +1 @@
1
- {"version":3,"names":["useState","useEffect","View","Text","TouchableOpacity","StyleSheet","ScrollView","ActivityIndicator","Alert","Platform","RefreshControl","useOxy","toast","confirmAction","Header","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SessionManagementScreen","onClose","theme","goBack","sessions","userSessions","activeSessionId","refreshSessions","logout","logoutAll","oxyServices","loading","setLoading","refreshing","setRefreshing","actionLoading","setActionLoading","isDarkTheme","textColor","backgroundColor","secondaryBackgroundColor","borderColor","primaryColor","dangerColor","successColor","loadSessions","isRefresh","error","console","OS","alert","text","handleLogoutSession","sessionId","success","handleLogoutOtherSessions","otherSessionsCount","filter","s","length","info","session","handleLogoutAllSessions","formatDate","dateString","date","Date","now","diffInMinutes","Math","floor","getTime","toLocaleDateString","getDeviceIcon","deviceType","platform","toLowerCase","includes","style","styles","container","centerContent","children","size","color","loadingText","title","subtitle","onBack","elevation","scrollView","contentContainerStyle","scrollContainer","refreshControl","onRefresh","tintColor","map","sessionCard","borderLeftColor","sessionHeader","sessionTitleRow","deviceIcon","sessionTitleText","deviceName","substring","currentBadge","sessionDetails","sessionDetail","deviceId","lastActive","expiresAt","logoutButton","onPress","disabled","logoutButtonText","bulkActions","bulkActionButton","bulkActionButtonText","dangerButton","emptyState","emptyStateText","footer","borderTopColor","closeButton","closeButtonText","create","flex","justifyContent","alignItems","padding","paddingTop","borderRadius","borderWidth","borderLeftWidth","marginBottom","flexDirection","fontSize","marginRight","fontWeight","paddingVertical","paddingHorizontal","alignSelf","marginTop","borderTopWidth","fontStyle"],"sourceRoot":"../../../../src","sources":["ui/screens/SessionManagementScreen.tsx"],"mappings":";;AACA,SAASA,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAC3C,SACIC,IAAI,EACJC,IAAI,EACJC,gBAAgB,EAChBC,UAAU,EACVC,UAAU,EACVC,iBAAiB,EACjBC,KAAK,EACLC,QAAQ,EACRC,cAAc,QACX,cAAc;AAErB,SAASC,MAAM,QAAQ,uBAAuB;AAE9C,SAASC,KAAK,QAAQ,kBAAkB;AAIxC,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,MAAM,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAEvC,MAAMC,uBAAkD,GAAGA,CAAC;EACxDC,OAAO;EACPC,KAAK;EACLC;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AAE;IACRS,UAAU,EAAE,QAAQ;IACpBW,eAAe,EAAE;EACrB,CAAC;EACDnB,cAAc,EAAE;IACZgB,QAAQ,EAAE,EAAE;IACZQ,SAAS,EAAE;EACf,CAAC;EACD3D,WAAW,EAAE;IACTmD,QAAQ,EAAE,EAAE;IACZM,SAAS,EAAE;EACf,CAAC;EACDrB,MAAM,EAAE;IACJQ,OAAO,EAAE,EAAE;IACXc,cAAc,EAAE,CAAC;IACjBf,UAAU,EAAE;EAChB,CAAC;EACDL,WAAW,EAAE;IACTgB,eAAe,EAAE,CAAC;IAClBC,iBAAiB,EAAE;EACvB,CAAC;EACDhB,eAAe,EAAE;IACbY,QAAQ,EAAE,EAAE;IACZE,UAAU,EAAE;EAChB;AACJ,CAAC,CAAC;AAEF,eAAetH,uBAAuB","ignoreList":[]}
1
+ {"version":3,"names":["useState","useEffect","View","Text","TouchableOpacity","StyleSheet","ScrollView","ActivityIndicator","Alert","Platform","RefreshControl","useOxy","toast","confirmAction","Header","GroupedSection","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SessionManagementScreen","onClose","theme","goBack","sessions","userSessions","activeSessionId","refreshSessions","logout","logoutAll","switchSession","loading","setLoading","refreshing","setRefreshing","actionLoading","setActionLoading","switchLoading","setSwitchLoading","lastRefreshed","setLastRefreshed","isDarkTheme","textColor","backgroundColor","secondaryBackgroundColor","borderColor","primaryColor","dangerColor","successColor","loadSessions","isRefresh","Date","error","console","OS","alert","text","handleLogoutSession","sessionId","success","handleLogoutOtherSessions","otherSessionsCount","filter","s","length","info","session","handleLogoutAllSessions","formatRelative","dateString","date","now","diffMs","getTime","absMin","Math","abs","isFuture","fmt","n","floor","hrs","days","toLocaleDateString","handleSwitchSession","e","style","styles","container","centerContent","children","size","color","loadingText","sessionItems","map","isCurrent","subtitleParts","deviceId","push","substring","lastActive","expiresAt","id","icon","iconColor","title","subtitle","join","showChevron","multiRow","customContentBelow","sessionActionsRow","onPress","sessionPillButton","disabled","sessionPillText","currentBadgeText","selected","dense","bulkItems","customContent","undefined","onBack","elevation","scrollView","contentContainerStyle","scrollContainer","refreshControl","onRefresh","tintColor","metaText","marginBottom","toISOString","fullBleed","items","height","emptyState","emptyStateText","footer","borderTopColor","closeButton","closeButtonText","create","flex","justifyContent","alignItems","padding","paddingTop","flexDirection","gap","marginTop","paddingHorizontal","paddingVertical","borderRadius","borderWidth","fontSize","fontWeight","letterSpacing","textTransform","overflow","width","alignSelf","fontStyle","borderTopWidth"],"sourceRoot":"../../../../src","sources":["ui/screens/SessionManagementScreen.tsx"],"mappings":";;AACA,SAASA,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAC3C,SACIC,IAAI,EACJC,IAAI,EACJC,gBAAgB,EAChBC,UAAU,EACVC,UAAU,EACVC,iBAAiB,EACjBC,KAAK,EACLC,QAAQ,EACRC,cAAc,QACX,cAAc;AAErB,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,KAAK,QAAQ,kBAAkB;AAExC,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,MAAM,EAAEC,cAAc,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAEvD,MAAMC,uBAAkD,GAAGA,CAAC;EACxDC,OAAO;EACPC,KAAK;EACLC;AACJ,CAAC,KAAK;EACF,MAAM;IAAEC,QAAQ,EAAEC,YAAY;IAAEC,eAAe;IAAEC,eAAe;IAAEC,MAAM;IAAEC,SAAS;IAAEC;EAAc,CAAC,GAAGrB,MAAM,CAAC,CAAC;EAC/G,MAAM,CAACsB,OAAO,EAAEC,UAAU,CAAC,GAAGlC,QAAQ,CAAC,IAAI,CAAC;EAC5C,MAAM,CAACmC,UAAU,EAAEC,aAAa,CAAC,GAAGpC,QAAQ,CAAC,KAAK,CAAC;EACnD,MAAM,CAACqC,aAAa,EAAEC,gBAAgB,CAAC,GAAGtC,QAAQ,CAAgB,IAAI,CAAC;EACvE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EAAE,MAAM;IACbC,SAAS,EAAE;EACf,CAAC;EACDzB,UAAU,EAAE;IACRS,UAAU,EAAE,QAAQ;IACpBO,eAAe,EAAE;EACrB,CAAC;EACDf,cAAc,EAAE;IACZkB,QAAQ,EAAE,EAAE;IACZO,SAAS,EAAE;EACf,CAAC;EACDtE,WAAW,EAAE;IACT+D,QAAQ,EAAE,EAAE;IACZL,SAAS,EAAE;EACf,CAAC;EACDZ,MAAM,EAAE;IACJQ,OAAO,EAAE,EAAE;IACXiB,cAAc,EAAE,CAAC;IACjBlB,UAAU,EAAE;EAChB,CAAC;EACDL,WAAW,EAAE;IACTY,eAAe,EAAE,CAAC;IAClBD,iBAAiB,EAAE;EACvB,CAAC;EACDV,eAAe,EAAE;IACbc,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EAChB;AACJ,CAAC,CAAC;AAEF,eAAezI,uBAAuB","ignoreList":[]}
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  import { useState, useRef, useEffect, useMemo, useCallback } from 'react';
4
- import { Platform, KeyboardAvoidingView, ScrollView, Animated, StatusBar } from 'react-native';
4
+ import { Platform, KeyboardAvoidingView, ScrollView, StatusBar } from 'react-native';
5
+ import { useSharedValue, withSpring, withTiming, runOnJS } from 'react-native-reanimated';
5
6
  import { useOxy } from '../context/OxyContext';
6
7
  import { useThemeColors, createCommonStyles, createAuthStyles } from '../styles';
7
8
  import SignInUsernameStep from './internal/SignInUsernameStep';
@@ -39,11 +40,13 @@ const SignInScreen = ({
39
40
 
40
41
  // Cache for validation results to prevent repeated API calls
41
42
  const validationCache = useRef(new Map());
42
- const fadeAnim = useRef(new Animated.Value(1)).current;
43
- const slideAnim = useRef(new Animated.Value(0)).current;
44
- const scaleAnim = useRef(new Animated.Value(1)).current;
45
- const logoAnim = useRef(new Animated.Value(0)).current;
46
- const progressAnim = useRef(new Animated.Value(initialStep ? 1.0 : 0.5)).current;
43
+
44
+ // Reanimated shared values
45
+ const fadeAnim = useSharedValue(1);
46
+ const slideAnim = useSharedValue(0);
47
+ const scaleAnim = useSharedValue(1);
48
+ const logoAnim = useSharedValue(0);
49
+ const progressAnim = useSharedValue(initialStep ? 1.0 : 0.5);
47
50
  const {
48
51
  login,
49
52
  isLoading,
@@ -63,12 +66,10 @@ const SignInScreen = ({
63
66
 
64
67
  // Initialize logo animation
65
68
  useEffect(() => {
66
- Animated.spring(logoAnim, {
67
- toValue: 1,
68
- tension: 50,
69
- friction: 8,
70
- useNativeDriver: Platform.OS !== 'web'
71
- }).start();
69
+ logoAnim.value = withSpring(1, {
70
+ damping: 15,
71
+ stiffness: 150
72
+ });
72
73
  }, [logoAnim]);
73
74
 
74
75
  // Input focus handlers (no animation)
@@ -204,61 +205,51 @@ const SignInScreen = ({
204
205
  // Animation functions
205
206
  const animateTransition = useCallback(nextStep => {
206
207
  // Scale down current content
207
- Animated.timing(scaleAnim, {
208
- toValue: 0.95,
209
- duration: 150,
210
- useNativeDriver: Platform.OS !== 'web'
211
- }).start();
208
+ scaleAnim.value = withTiming(0.95, {
209
+ duration: 150
210
+ });
212
211
 
213
- // Fade out
214
- Animated.timing(fadeAnim, {
215
- toValue: 0,
216
- duration: 200,
217
- useNativeDriver: Platform.OS !== 'web'
218
- }).start(() => {
219
- setCurrentStep(nextStep);
212
+ // Fade out and then animate in new content
213
+ fadeAnim.value = withTiming(0, {
214
+ duration: 200
215
+ }, finished => {
216
+ if (finished) {
217
+ runOnJS(setCurrentStep)(nextStep);
220
218
 
221
- // Reset animations
222
- slideAnim.setValue(-50);
223
- scaleAnim.setValue(0.95);
219
+ // Reset animations
220
+ slideAnim.value = -50;
221
+ scaleAnim.value = 0.95;
224
222
 
225
- // Animate in new content
226
- Animated.parallel([Animated.timing(fadeAnim, {
227
- toValue: 1,
228
- duration: 300,
229
- useNativeDriver: Platform.OS !== 'web'
230
- }), Animated.spring(slideAnim, {
231
- toValue: 0,
232
- tension: 80,
233
- friction: 8,
234
- useNativeDriver: Platform.OS !== 'web'
235
- }), Animated.spring(scaleAnim, {
236
- toValue: 1,
237
- tension: 80,
238
- friction: 8,
239
- useNativeDriver: Platform.OS !== 'web'
240
- })]).start();
223
+ // Animate in new content
224
+ fadeAnim.value = withTiming(1, {
225
+ duration: 300
226
+ });
227
+ slideAnim.value = withSpring(0, {
228
+ damping: 15,
229
+ stiffness: 200
230
+ });
231
+ scaleAnim.value = withSpring(1, {
232
+ damping: 15,
233
+ stiffness: 200
234
+ });
235
+ }
241
236
  });
242
237
  }, [fadeAnim, slideAnim, scaleAnim]);
243
238
  const nextStep = useCallback(() => {
244
239
  if (currentStep < 1) {
245
240
  // Animate progress bar
246
- Animated.timing(progressAnim, {
247
- toValue: 1.0,
248
- duration: 300,
249
- useNativeDriver: false
250
- }).start();
241
+ progressAnim.value = withTiming(1.0, {
242
+ duration: 300
243
+ });
251
244
  animateTransition(currentStep + 1);
252
245
  }
253
246
  }, [currentStep, progressAnim, animateTransition]);
254
247
  const prevStep = useCallback(() => {
255
248
  if (currentStep > 0) {
256
249
  // Animate progress bar
257
- Animated.timing(progressAnim, {
258
- toValue: 0.5,
259
- duration: 300,
260
- useNativeDriver: false
261
- }).start();
250
+ progressAnim.value = withTiming(0.5, {
251
+ duration: 300
252
+ });
262
253
  animateTransition(currentStep - 1);
263
254
  }
264
255
  }, [currentStep, progressAnim, animateTransition]);