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