@burdenoff/microfe-auth 2026.519.1 → 2026.520.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/hooks/useContextSwitcherData.d.ts.map +1 -1
- package/dist/auth/hooks/useContextSwitcherData.js +25 -22
- package/dist/auth/hooks/useContextSwitcherData.js.map +1 -1
- package/dist/auth/hooks/usePasswordOperations.d.ts.map +1 -1
- package/dist/auth/hooks/usePasswordOperations.js +11 -4
- package/dist/auth/hooks/usePasswordOperations.js.map +1 -1
- package/dist/auth/hooks/useSessionOperations.d.ts +12 -1
- package/dist/auth/hooks/useSessionOperations.d.ts.map +1 -1
- package/dist/auth/hooks/useSessionOperations.js +62 -46
- package/dist/auth/hooks/useSessionOperations.js.map +1 -1
- package/dist/auth/pages/PasswordResetPage.d.ts.map +1 -1
- package/dist/auth/pages/PasswordResetPage.js +2 -1
- package/dist/auth/pages/PasswordResetPage.js.map +1 -1
- package/dist/auth/pages/SessionsPage.d.ts +2 -5
- package/dist/auth/pages/SessionsPage.d.ts.map +1 -1
- package/dist/auth/pages/SessionsPage.js +175 -152
- package/dist/auth/pages/SessionsPage.js.map +1 -1
- package/dist/generated/global-operations.d.ts +2 -1
- package/dist/generated/global-operations.d.ts.map +1 -1
- package/dist/generated/global-operations.js +55 -80
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/microfe-auth.css +1 -1
- package/dist/translations/en.d.ts +5 -0
- package/dist/translations/en.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3,323 +3,283 @@ import { useSessionOperations as t } from "../hooks/useSessionOperations.js";
|
|
|
3
3
|
import "../hooks/index.js";
|
|
4
4
|
import { AlertIcon as n, SpinnerIcon as r } from "../components/AuthIcons.js";
|
|
5
5
|
import { formatRelativeTime as i, parseBrowserName as a, parseDeviceName as o } from "../utils/formatters.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { useState as l } from "react";
|
|
6
|
+
import { ConfirmActionDialog as s } from "../components/ConfirmActionDialog.js";
|
|
7
|
+
import { useMemo as c, useState as l } from "react";
|
|
9
8
|
import { useI18n as u } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
10
|
-
import {
|
|
9
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
10
|
//#region src/auth/pages/SessionsPage.tsx
|
|
12
|
-
function
|
|
13
|
-
let { t:
|
|
14
|
-
let n =
|
|
11
|
+
function p() {
|
|
12
|
+
let { t: p } = u(), m = (e, t) => {
|
|
13
|
+
let n = p(e);
|
|
15
14
|
return n === e ? t : n;
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
entityTypes: ["vibecontrols_sessions"],
|
|
22
|
-
format: "CSV",
|
|
23
|
-
exportScope: "INDIVIDUAL",
|
|
24
|
-
includeMetadata: !0
|
|
25
|
-
} } });
|
|
26
|
-
} catch (e) {
|
|
27
|
-
M(e instanceof Error ? e.message : "Failed to start export");
|
|
15
|
+
}, h = e((e) => e.isAuthenticated), { activeSessions: g, revokeSession: _, revokeAllSessions: v, isLoading: y, page: b, totalPages: x, totalCount: S, hasMore: C, goToNextPage: w, goToPrevPage: T } = t({ disableTokenInfoQuery: !0 }), [E, D] = l(null), [O, k] = l(null), [A, j] = l(null), [M, N] = l(!1), P = c(() => {
|
|
16
|
+
let e = /* @__PURE__ */ new Map();
|
|
17
|
+
for (let t of g) {
|
|
18
|
+
let n = o(t.userAgent ?? ""), r = e.get(n);
|
|
19
|
+
(!r || new Date(t.lastActivityAt) > new Date(r.lastActivityAt)) && e.set(n, t);
|
|
28
20
|
}
|
|
29
|
-
|
|
21
|
+
return [...e.values()];
|
|
22
|
+
}, [g]), F = async (e) => {
|
|
30
23
|
try {
|
|
31
|
-
await
|
|
24
|
+
await _(e), k("Session revoked successfully"), j(null);
|
|
32
25
|
} catch (e) {
|
|
33
|
-
|
|
26
|
+
D(e instanceof Error ? e.message : "Failed to revoke session");
|
|
34
27
|
}
|
|
35
28
|
};
|
|
36
|
-
return
|
|
29
|
+
return h ? /* @__PURE__ */ f("div", {
|
|
37
30
|
className: "max-w-4xl mx-auto p-6",
|
|
38
31
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
open:
|
|
32
|
+
/* @__PURE__ */ d(s, {
|
|
33
|
+
open: A !== null,
|
|
41
34
|
onOpenChange: (e) => {
|
|
42
|
-
e ||
|
|
35
|
+
e || j(null);
|
|
43
36
|
},
|
|
44
37
|
title: "Revoke this session?",
|
|
45
38
|
description: "The selected device will be signed out immediately and will need to authenticate again.",
|
|
46
39
|
confirmText: "Revoke session",
|
|
47
40
|
variant: "danger",
|
|
48
|
-
isPending:
|
|
41
|
+
isPending: y,
|
|
49
42
|
onConfirm: async () => {
|
|
50
|
-
|
|
43
|
+
A && await F(A);
|
|
51
44
|
}
|
|
52
45
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
open:
|
|
55
|
-
onOpenChange:
|
|
46
|
+
/* @__PURE__ */ d(s, {
|
|
47
|
+
open: M,
|
|
48
|
+
onOpenChange: N,
|
|
56
49
|
title: "Revoke every other session?",
|
|
57
50
|
description: "All devices except your current one will be signed out immediately.",
|
|
58
51
|
confirmText: "Revoke all other sessions",
|
|
59
52
|
variant: "warning",
|
|
60
|
-
isPending:
|
|
53
|
+
isPending: y,
|
|
61
54
|
onConfirm: async () => {
|
|
62
55
|
try {
|
|
63
|
-
await
|
|
56
|
+
await v(), k("All other sessions have been revoked"), N(!1);
|
|
64
57
|
} catch (e) {
|
|
65
|
-
|
|
58
|
+
D(e instanceof Error ? e.message : "Failed to revoke all sessions");
|
|
66
59
|
}
|
|
67
60
|
}
|
|
68
61
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ d("div", {
|
|
70
63
|
"aria-live": "polite",
|
|
71
64
|
"aria-atomic": "true",
|
|
72
65
|
className: "sr-only",
|
|
73
|
-
children:
|
|
66
|
+
children: O
|
|
74
67
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ d("div", {
|
|
76
69
|
role: "alert",
|
|
77
70
|
"aria-live": "assertive",
|
|
78
71
|
"aria-atomic": "true",
|
|
79
72
|
className: "sr-only",
|
|
80
|
-
children:
|
|
73
|
+
children: E
|
|
81
74
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ f("div", {
|
|
83
76
|
className: "flex items-center justify-between mb-8",
|
|
84
|
-
children: [/* @__PURE__ */
|
|
77
|
+
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h1", {
|
|
85
78
|
className: "text-3xl font-semibold text-text-primary",
|
|
86
|
-
children:
|
|
87
|
-
}), /* @__PURE__ */
|
|
79
|
+
children: m("auth.sessions.title", "Active Sessions")
|
|
80
|
+
}), /* @__PURE__ */ f("p", {
|
|
88
81
|
className: "text-text-secondary mt-2",
|
|
89
82
|
children: [
|
|
90
|
-
|
|
83
|
+
m("auth.sessions.sessionCount", "You have"),
|
|
91
84
|
" ",
|
|
92
|
-
|
|
85
|
+
S,
|
|
93
86
|
" ",
|
|
94
|
-
|
|
87
|
+
m(S === 1 ? "auth.sessions.sessionsSingular" : "auth.sessions.sessionsPlural", S === 1 ? "active session" : "active sessions")
|
|
95
88
|
]
|
|
96
|
-
})] }), /* @__PURE__ */
|
|
89
|
+
})] }), /* @__PURE__ */ d("div", {
|
|
97
90
|
className: "flex items-center gap-3",
|
|
98
|
-
children:
|
|
91
|
+
children: S > 1 && /* @__PURE__ */ d("button", {
|
|
99
92
|
type: "button",
|
|
100
|
-
onClick: () =>
|
|
101
|
-
disabled: A,
|
|
102
|
-
"aria-label": h("auth.sessions.exportAriaLabel", "Export sessions list"),
|
|
103
|
-
className: "flex items-center gap-2 px-4 py-2.5 rounded-xl border border-border-default text-text-primary bg-bg-surface hover:bg-bg-sunken disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-medium",
|
|
104
|
-
children: A ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(r, {
|
|
105
|
-
className: "w-4 h-4 animate-spin",
|
|
106
|
-
"aria-hidden": "true"
|
|
107
|
-
}), h("auth.sessions.exporting", "Exporting...")] }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("svg", {
|
|
108
|
-
className: "w-4 h-4",
|
|
109
|
-
fill: "none",
|
|
110
|
-
viewBox: "0 0 24 24",
|
|
111
|
-
stroke: "currentColor",
|
|
112
|
-
"aria-hidden": "true",
|
|
113
|
-
children: /* @__PURE__ */ f("path", {
|
|
114
|
-
strokeLinecap: "round",
|
|
115
|
-
strokeLinejoin: "round",
|
|
116
|
-
strokeWidth: 2,
|
|
117
|
-
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
118
|
-
})
|
|
119
|
-
}), h("auth.sessions.export", "Export")] })
|
|
120
|
-
}), _.length > 1 && /* @__PURE__ */ f("button", {
|
|
121
|
-
type: "button",
|
|
122
|
-
onClick: () => O(!0),
|
|
93
|
+
onClick: () => N(!0),
|
|
123
94
|
className: "px-4 py-2.5 rounded-xl border border-status-error-border text-status-error-text font-medium hover:bg-status-error-bg-subtle transition-colors duration-200",
|
|
124
|
-
children:
|
|
125
|
-
})
|
|
126
|
-
})]
|
|
127
|
-
}),
|
|
128
|
-
j && /* @__PURE__ */ p("div", {
|
|
129
|
-
role: "alert",
|
|
130
|
-
className: "mb-6 flex items-start gap-3 p-4 rounded-xl bg-status-error-bg-subtle border border-status-error-border",
|
|
131
|
-
children: [/* @__PURE__ */ f(n, {
|
|
132
|
-
className: "w-5 h-5 text-status-error-text flex-shrink-0 mt-0.5",
|
|
133
|
-
"aria-hidden": "true"
|
|
134
|
-
}), /* @__PURE__ */ f("p", {
|
|
135
|
-
className: "text-sm text-status-error-text",
|
|
136
|
-
children: j
|
|
95
|
+
children: m("auth.sessions.revokeAll", "Revoke All Sessions")
|
|
96
|
+
})
|
|
137
97
|
})]
|
|
138
98
|
}),
|
|
139
|
-
|
|
99
|
+
O && /* @__PURE__ */ f("div", {
|
|
140
100
|
role: "status",
|
|
141
101
|
className: "mb-6 p-4 rounded-xl bg-status-success-bg-subtle border border-status-success-border",
|
|
142
|
-
children: [/* @__PURE__ */
|
|
102
|
+
children: [/* @__PURE__ */ d("p", {
|
|
143
103
|
className: "text-status-success-text",
|
|
144
|
-
children:
|
|
145
|
-
}), /* @__PURE__ */
|
|
104
|
+
children: O
|
|
105
|
+
}), /* @__PURE__ */ d("button", {
|
|
146
106
|
type: "button",
|
|
147
|
-
onClick: () =>
|
|
107
|
+
onClick: () => k(null),
|
|
148
108
|
className: "mt-2 text-sm text-status-success-text hover:underline transition-colors duration-200",
|
|
149
109
|
children: "Dismiss"
|
|
150
110
|
})]
|
|
151
111
|
}),
|
|
152
|
-
|
|
112
|
+
E && /* @__PURE__ */ f("div", {
|
|
153
113
|
role: "alert",
|
|
154
114
|
className: "mb-6 flex items-start gap-3 p-4 rounded-xl bg-status-error-bg-subtle border border-status-error-border",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
115
|
+
children: [/* @__PURE__ */ d(n, {
|
|
156
116
|
className: "w-5 h-5 text-status-error-text flex-shrink-0 mt-0.5",
|
|
157
117
|
"aria-hidden": "true"
|
|
158
|
-
}), /* @__PURE__ */
|
|
118
|
+
}), /* @__PURE__ */ f("div", {
|
|
159
119
|
className: "flex-1",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ d("p", {
|
|
161
121
|
className: "text-sm text-status-error-text",
|
|
162
|
-
children:
|
|
163
|
-
}), /* @__PURE__ */
|
|
122
|
+
children: E
|
|
123
|
+
}), /* @__PURE__ */ d("button", {
|
|
164
124
|
type: "button",
|
|
165
|
-
onClick: () =>
|
|
125
|
+
onClick: () => D(null),
|
|
166
126
|
className: "mt-2 text-sm text-status-error-text hover:underline transition-colors duration-200",
|
|
167
127
|
children: "Dismiss"
|
|
168
128
|
})]
|
|
169
129
|
})]
|
|
170
130
|
}),
|
|
171
|
-
|
|
131
|
+
y ? /* @__PURE__ */ f("div", {
|
|
172
132
|
"aria-live": "polite",
|
|
173
133
|
"aria-busy": "true",
|
|
174
134
|
className: "flex items-center justify-center py-12",
|
|
175
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ d(r, {
|
|
176
136
|
className: "w-8 h-8 text-text-link animate-spin",
|
|
177
137
|
"aria-hidden": "true"
|
|
178
|
-
}), /* @__PURE__ */
|
|
138
|
+
}), /* @__PURE__ */ d("span", {
|
|
179
139
|
className: "ml-3 text-text-secondary",
|
|
180
|
-
children:
|
|
140
|
+
children: m("auth.sessions.loading", "Loading sessions...")
|
|
181
141
|
})]
|
|
182
|
-
}) :
|
|
142
|
+
}) : P.length === 0 ? /* @__PURE__ */ f("div", {
|
|
183
143
|
className: "text-center py-16 border-2 border-dashed border-border-subtle rounded-xl",
|
|
184
144
|
role: "status",
|
|
185
|
-
children: [/* @__PURE__ */
|
|
145
|
+
children: [/* @__PURE__ */ d("div", {
|
|
186
146
|
className: "w-16 h-16 mx-auto mb-4 rounded-full bg-bg-muted flex items-center justify-center",
|
|
187
|
-
children: /* @__PURE__ */
|
|
147
|
+
children: /* @__PURE__ */ d("svg", {
|
|
188
148
|
className: "w-8 h-8 text-text-tertiary",
|
|
189
149
|
fill: "none",
|
|
190
150
|
viewBox: "0 0 24 24",
|
|
191
151
|
stroke: "currentColor",
|
|
192
152
|
"aria-hidden": "true",
|
|
193
|
-
children: /* @__PURE__ */
|
|
153
|
+
children: /* @__PURE__ */ d("path", {
|
|
194
154
|
strokeLinecap: "round",
|
|
195
155
|
strokeLinejoin: "round",
|
|
196
156
|
strokeWidth: 1.5,
|
|
197
157
|
d: "M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
|
|
198
158
|
})
|
|
199
159
|
})
|
|
200
|
-
}), /* @__PURE__ */
|
|
160
|
+
}), /* @__PURE__ */ d("p", {
|
|
201
161
|
className: "text-text-secondary",
|
|
202
|
-
children:
|
|
162
|
+
children: m("auth.sessions.noSessions", "No active sessions found")
|
|
203
163
|
})]
|
|
204
|
-
}) : /* @__PURE__ */
|
|
164
|
+
}) : /* @__PURE__ */ d("div", {
|
|
205
165
|
className: "space-y-4",
|
|
206
166
|
"aria-live": "polite",
|
|
207
|
-
"aria-busy":
|
|
208
|
-
children:
|
|
167
|
+
"aria-busy": y,
|
|
168
|
+
children: P.map((e) => /* @__PURE__ */ d("div", {
|
|
209
169
|
className: "p-6 rounded-xl border border-border-default bg-bg-surface shadow-sm hover:shadow-md transition-shadow",
|
|
210
|
-
children: /* @__PURE__ */
|
|
170
|
+
children: /* @__PURE__ */ f("div", {
|
|
211
171
|
className: "flex items-start justify-between",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ f("div", {
|
|
213
173
|
className: "flex items-start gap-4",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ d("div", {
|
|
215
175
|
className: "w-12 h-12 rounded-xl bg-bg-accent flex items-center justify-center flex-shrink-0",
|
|
216
176
|
"aria-hidden": "true",
|
|
217
|
-
children: /* @__PURE__ */
|
|
177
|
+
children: /* @__PURE__ */ d("svg", {
|
|
218
178
|
className: "w-6 h-6 text-text-link",
|
|
219
179
|
fill: "none",
|
|
220
180
|
viewBox: "0 0 24 24",
|
|
221
181
|
stroke: "currentColor",
|
|
222
|
-
children: /* @__PURE__ */
|
|
182
|
+
children: /* @__PURE__ */ d("path", {
|
|
223
183
|
strokeLinecap: "round",
|
|
224
184
|
strokeLinejoin: "round",
|
|
225
185
|
strokeWidth: 1.5,
|
|
226
186
|
d: "M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
|
|
227
187
|
})
|
|
228
188
|
})
|
|
229
|
-
}), /* @__PURE__ */
|
|
189
|
+
}), /* @__PURE__ */ f("div", {
|
|
230
190
|
className: "flex-1",
|
|
231
191
|
children: [
|
|
232
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ f("div", {
|
|
233
193
|
className: "flex items-center gap-3 mb-1",
|
|
234
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ d("h3", {
|
|
235
195
|
className: "text-lg font-semibold text-text-primary",
|
|
236
|
-
children: e.isCurrent && o(e.userAgent) === "Unknown Device" ?
|
|
237
|
-
}), e.isCurrent && /* @__PURE__ */
|
|
196
|
+
children: e.isCurrent && o(e.userAgent) === "Unknown Device" ? m("auth.sessions.thisDevice", "This Device") : o(e.userAgent)
|
|
197
|
+
}), e.isCurrent && /* @__PURE__ */ d("span", {
|
|
238
198
|
role: "status",
|
|
239
199
|
className: "px-2.5 py-1 rounded-full bg-status-success-bg-subtle text-status-success-text text-xs font-medium",
|
|
240
|
-
children:
|
|
200
|
+
children: m("auth.sessions.currentSession", "Current Session")
|
|
241
201
|
})]
|
|
242
202
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ d("p", {
|
|
244
204
|
className: "text-sm text-text-secondary mb-2",
|
|
245
|
-
children: a(e.userAgent) === "Unknown Browser" && e.isCurrent ?
|
|
205
|
+
children: a(e.userAgent) === "Unknown Browser" && e.isCurrent ? m("auth.sessions.currentBrowser", "Current Browser") : a(e.userAgent)
|
|
246
206
|
}),
|
|
247
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ f("dl", {
|
|
248
208
|
className: "flex flex-wrap gap-4 text-sm text-text-secondary",
|
|
249
209
|
children: [
|
|
250
|
-
e.ipAddress && e.ipAddress !== "unknown" && /* @__PURE__ */
|
|
210
|
+
e.ipAddress && e.ipAddress !== "unknown" && /* @__PURE__ */ f("div", {
|
|
251
211
|
className: "flex items-center gap-1.5",
|
|
252
212
|
children: [
|
|
253
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ d("svg", {
|
|
254
214
|
className: "w-4 h-4",
|
|
255
215
|
fill: "none",
|
|
256
216
|
viewBox: "0 0 24 24",
|
|
257
217
|
stroke: "currentColor",
|
|
258
218
|
"aria-hidden": "true",
|
|
259
|
-
children: /* @__PURE__ */
|
|
219
|
+
children: /* @__PURE__ */ d("path", {
|
|
260
220
|
strokeLinecap: "round",
|
|
261
221
|
strokeLinejoin: "round",
|
|
262
222
|
strokeWidth: 2,
|
|
263
223
|
d: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"
|
|
264
224
|
})
|
|
265
225
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ d("dt", {
|
|
267
227
|
className: "sr-only",
|
|
268
228
|
children: "IP address"
|
|
269
229
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ d("dd", { children: e.ipAddress })
|
|
271
231
|
]
|
|
272
232
|
}),
|
|
273
|
-
e.location && /* @__PURE__ */
|
|
233
|
+
e.location && /* @__PURE__ */ f("div", {
|
|
274
234
|
className: "flex items-center gap-1.5",
|
|
275
235
|
children: [
|
|
276
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ f("svg", {
|
|
277
237
|
className: "w-4 h-4",
|
|
278
238
|
fill: "none",
|
|
279
239
|
viewBox: "0 0 24 24",
|
|
280
240
|
stroke: "currentColor",
|
|
281
241
|
"aria-hidden": "true",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
242
|
+
children: [/* @__PURE__ */ d("path", {
|
|
283
243
|
strokeLinecap: "round",
|
|
284
244
|
strokeLinejoin: "round",
|
|
285
245
|
strokeWidth: 2,
|
|
286
246
|
d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
|
|
287
|
-
}), /* @__PURE__ */
|
|
247
|
+
}), /* @__PURE__ */ d("path", {
|
|
288
248
|
strokeLinecap: "round",
|
|
289
249
|
strokeLinejoin: "round",
|
|
290
250
|
strokeWidth: 2,
|
|
291
251
|
d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z"
|
|
292
252
|
})]
|
|
293
253
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ d("dt", {
|
|
295
255
|
className: "sr-only",
|
|
296
256
|
children: "Location"
|
|
297
257
|
}),
|
|
298
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ d("dd", { children: e.location })
|
|
299
259
|
]
|
|
300
260
|
}),
|
|
301
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ f("div", {
|
|
302
262
|
className: "flex items-center gap-1.5",
|
|
303
263
|
children: [
|
|
304
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ d("svg", {
|
|
305
265
|
className: "w-4 h-4",
|
|
306
266
|
fill: "none",
|
|
307
267
|
viewBox: "0 0 24 24",
|
|
308
268
|
stroke: "currentColor",
|
|
309
269
|
"aria-hidden": "true",
|
|
310
|
-
children: /* @__PURE__ */
|
|
270
|
+
children: /* @__PURE__ */ d("path", {
|
|
311
271
|
strokeLinecap: "round",
|
|
312
272
|
strokeLinejoin: "round",
|
|
313
273
|
strokeWidth: 2,
|
|
314
274
|
d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
315
275
|
})
|
|
316
276
|
}),
|
|
317
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ d("dt", {
|
|
318
278
|
className: "sr-only",
|
|
319
279
|
children: "Last active"
|
|
320
280
|
}),
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
-
|
|
281
|
+
/* @__PURE__ */ f("dd", { children: [
|
|
282
|
+
m("auth.sessions.lastActive", "Last active"),
|
|
323
283
|
" ",
|
|
324
284
|
i(e.lastActivityAt)
|
|
325
285
|
] })
|
|
@@ -329,42 +289,105 @@ function m() {
|
|
|
329
289
|
})
|
|
330
290
|
]
|
|
331
291
|
})]
|
|
332
|
-
}), !e.isCurrent && /* @__PURE__ */
|
|
292
|
+
}), !e.isCurrent && /* @__PURE__ */ d("button", {
|
|
333
293
|
type: "button",
|
|
334
|
-
onClick: () =>
|
|
335
|
-
"aria-label": `${
|
|
294
|
+
onClick: () => j(e.id),
|
|
295
|
+
"aria-label": `${m("auth.sessions.revoke", "Revoke")} ${o(e.userAgent)} session`,
|
|
336
296
|
className: "ml-4 px-4 py-2 rounded-lg text-sm font-medium border border-status-error-border text-status-error-text bg-bg-surface hover:bg-status-error-bg-subtle transition-colors duration-200",
|
|
337
|
-
children:
|
|
297
|
+
children: m("auth.sessions.revoke", "Revoke")
|
|
338
298
|
})]
|
|
339
299
|
})
|
|
340
300
|
}, e.id))
|
|
301
|
+
}),
|
|
302
|
+
!y && x > 1 && /* @__PURE__ */ f("div", {
|
|
303
|
+
className: "flex items-center justify-between mt-6 pt-4 border-t border-border-subtle",
|
|
304
|
+
children: [
|
|
305
|
+
/* @__PURE__ */ f("button", {
|
|
306
|
+
type: "button",
|
|
307
|
+
onClick: T,
|
|
308
|
+
disabled: b === 0,
|
|
309
|
+
className: "flex items-center gap-2 px-4 py-2 rounded-lg border border-border-default text-text-primary bg-bg-surface hover:bg-bg-sunken disabled:opacity-40 disabled:cursor-not-allowed transition-colors font-medium text-sm",
|
|
310
|
+
"aria-label": m("auth.sessions.prevPage", "Previous page"),
|
|
311
|
+
children: [/* @__PURE__ */ d("svg", {
|
|
312
|
+
className: "w-4 h-4",
|
|
313
|
+
fill: "none",
|
|
314
|
+
viewBox: "0 0 24 24",
|
|
315
|
+
stroke: "currentColor",
|
|
316
|
+
"aria-hidden": "true",
|
|
317
|
+
children: /* @__PURE__ */ d("path", {
|
|
318
|
+
strokeLinecap: "round",
|
|
319
|
+
strokeLinejoin: "round",
|
|
320
|
+
strokeWidth: 2,
|
|
321
|
+
d: "M15 19l-7-7 7-7"
|
|
322
|
+
})
|
|
323
|
+
}), m("auth.sessions.prev", "Previous")]
|
|
324
|
+
}),
|
|
325
|
+
/* @__PURE__ */ f("span", {
|
|
326
|
+
className: "text-sm text-text-secondary",
|
|
327
|
+
children: [
|
|
328
|
+
m("auth.sessions.pageOf", "Page"),
|
|
329
|
+
" ",
|
|
330
|
+
/* @__PURE__ */ d("span", {
|
|
331
|
+
className: "font-medium text-text-primary",
|
|
332
|
+
children: b + 1
|
|
333
|
+
}),
|
|
334
|
+
" ",
|
|
335
|
+
m("auth.sessions.of", "of"),
|
|
336
|
+
" ",
|
|
337
|
+
/* @__PURE__ */ d("span", {
|
|
338
|
+
className: "font-medium text-text-primary",
|
|
339
|
+
children: x
|
|
340
|
+
})
|
|
341
|
+
]
|
|
342
|
+
}),
|
|
343
|
+
/* @__PURE__ */ f("button", {
|
|
344
|
+
type: "button",
|
|
345
|
+
onClick: w,
|
|
346
|
+
disabled: !C,
|
|
347
|
+
className: "flex items-center gap-2 px-4 py-2 rounded-lg border border-border-default text-text-primary bg-bg-surface hover:bg-bg-sunken disabled:opacity-40 disabled:cursor-not-allowed transition-colors font-medium text-sm",
|
|
348
|
+
"aria-label": m("auth.sessions.nextPage", "Next page"),
|
|
349
|
+
children: [m("auth.sessions.next", "Next"), /* @__PURE__ */ d("svg", {
|
|
350
|
+
className: "w-4 h-4",
|
|
351
|
+
fill: "none",
|
|
352
|
+
viewBox: "0 0 24 24",
|
|
353
|
+
stroke: "currentColor",
|
|
354
|
+
"aria-hidden": "true",
|
|
355
|
+
children: /* @__PURE__ */ d("path", {
|
|
356
|
+
strokeLinecap: "round",
|
|
357
|
+
strokeLinejoin: "round",
|
|
358
|
+
strokeWidth: 2,
|
|
359
|
+
d: "M9 5l7 7-7 7"
|
|
360
|
+
})
|
|
361
|
+
})]
|
|
362
|
+
})
|
|
363
|
+
]
|
|
341
364
|
})
|
|
342
365
|
]
|
|
343
|
-
}) : /* @__PURE__ */
|
|
366
|
+
}) : /* @__PURE__ */ d("div", {
|
|
344
367
|
className: "max-w-4xl mx-auto p-6",
|
|
345
|
-
children: /* @__PURE__ */
|
|
368
|
+
children: /* @__PURE__ */ f("div", {
|
|
346
369
|
className: "text-center py-16 border-2 border-dashed border-border-subtle rounded-xl",
|
|
347
370
|
children: [
|
|
348
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ d("div", {
|
|
349
372
|
className: "w-16 h-16 mx-auto mb-4 rounded-full bg-status-warning-bg-subtle flex items-center justify-center",
|
|
350
|
-
children: /* @__PURE__ */
|
|
373
|
+
children: /* @__PURE__ */ d(n, {
|
|
351
374
|
className: "w-8 h-8 text-status-warning-text",
|
|
352
375
|
"aria-hidden": "true"
|
|
353
376
|
})
|
|
354
377
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ d("h2", {
|
|
356
379
|
className: "text-xl font-semibold text-text-primary mb-2",
|
|
357
|
-
children:
|
|
380
|
+
children: m("auth.sessions.authRequired", "Authentication Required")
|
|
358
381
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ d("p", {
|
|
360
383
|
className: "text-text-secondary",
|
|
361
|
-
children:
|
|
384
|
+
children: m("auth.sessions.signInToView", "Please sign in to view your active sessions")
|
|
362
385
|
})
|
|
363
386
|
]
|
|
364
387
|
})
|
|
365
388
|
});
|
|
366
389
|
}
|
|
367
390
|
//#endregion
|
|
368
|
-
export {
|
|
391
|
+
export { p as SessionsPage };
|
|
369
392
|
|
|
370
393
|
//# sourceMappingURL=SessionsPage.js.map
|