@burdenoff/microfe-auth 2026.529.2 → 2026.529.3
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.
|
@@ -4,28 +4,28 @@ import { useUserOperations as r } from "../hooks/useUserOperations.js";
|
|
|
4
4
|
import { useAuthPermissions as i } from "../hooks/useAuthPermissions.js";
|
|
5
5
|
import { ConfirmActionDialog as a } from "../components/ConfirmActionDialog.js";
|
|
6
6
|
import { nativeImpact as o, nativeNotify as s } from "../../utils/nativeBridge.js";
|
|
7
|
-
import { useCallback as ee, useEffect as
|
|
8
|
-
import { useNavigate as
|
|
9
|
-
import { useI18n as
|
|
10
|
-
import { Fragment as
|
|
7
|
+
import { useCallback as ee, useEffect as c, useId as l, useState as u } from "react";
|
|
8
|
+
import { useNavigate as te } from "react-router-dom";
|
|
9
|
+
import { useI18n as ne } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
10
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
11
11
|
//#region src/auth/pages/UsersPage.tsx
|
|
12
|
-
var
|
|
12
|
+
var m = [
|
|
13
13
|
"TENANT_ADMIN",
|
|
14
14
|
"ORG_ADMIN",
|
|
15
15
|
"WORKSPACE_ADMIN",
|
|
16
16
|
"MEMBER",
|
|
17
17
|
"GUEST"
|
|
18
|
-
],
|
|
18
|
+
], h = [
|
|
19
19
|
"ACTIVE",
|
|
20
20
|
"INACTIVE",
|
|
21
21
|
"SUSPENDED",
|
|
22
22
|
"DELETED"
|
|
23
23
|
];
|
|
24
|
-
function
|
|
25
|
-
let
|
|
26
|
-
let n =
|
|
24
|
+
function g() {
|
|
25
|
+
let g = te(), { t: re } = ne(), _ = (e, t) => {
|
|
26
|
+
let n = re(e);
|
|
27
27
|
return n === e ? t : n;
|
|
28
|
-
},
|
|
28
|
+
}, v = e((e) => e.isAuthenticated), ie = e((e) => e.user), { canViewUsers: ae, canUpdateUsers: oe, canDeleteUsers: y, isLoading: se } = i(), { listUsers: b, updateUser: ce, deleteUser: le, hardDeleteUser: ue, isLoading: x } = r(), S = l(), C = l(), w = l(), T = l(), de = l(), [E, D] = u(!1), fe = async () => {
|
|
29
29
|
D(!0);
|
|
30
30
|
try {
|
|
31
31
|
let e = {};
|
|
@@ -70,7 +70,7 @@ function h() {
|
|
|
70
70
|
} finally {
|
|
71
71
|
D(!1);
|
|
72
72
|
}
|
|
73
|
-
}, [O, pe] =
|
|
73
|
+
}, [O, pe] = u([]), [k, me] = u(0), [he, ge] = u(!1), [A, j] = u("list"), [M, N] = u(null), [P, F] = u({
|
|
74
74
|
username: "",
|
|
75
75
|
firstName: "",
|
|
76
76
|
lastName: "",
|
|
@@ -79,8 +79,8 @@ function h() {
|
|
|
79
79
|
role: "MEMBER",
|
|
80
80
|
status: "ACTIVE",
|
|
81
81
|
emailVerified: !1
|
|
82
|
-
}), [I, L] =
|
|
83
|
-
if (
|
|
82
|
+
}), [I, L] = u(null), [_e, R] = u(!1), [z, B] = u(null), [V, H] = u(null), [U, ve] = u(""), [W, ye] = u(""), [G, be] = u(""), [K, q] = u(0), J = ee(async () => {
|
|
83
|
+
if (v) try {
|
|
84
84
|
R(!1);
|
|
85
85
|
let e = {};
|
|
86
86
|
U && (e.search = U), W && (e.role = W), G && (e.status = G);
|
|
@@ -100,9 +100,9 @@ function h() {
|
|
|
100
100
|
W,
|
|
101
101
|
G,
|
|
102
102
|
K,
|
|
103
|
-
|
|
103
|
+
v
|
|
104
104
|
]);
|
|
105
|
-
|
|
105
|
+
c(() => {
|
|
106
106
|
J();
|
|
107
107
|
}, [J]);
|
|
108
108
|
let Y = () => {
|
|
@@ -129,7 +129,7 @@ function h() {
|
|
|
129
129
|
role: P.role,
|
|
130
130
|
status: P.status,
|
|
131
131
|
emailVerified: P.emailVerified
|
|
132
|
-
}), B(
|
|
132
|
+
}), B(_("auth.users.updateSuccess", "User updated successfully!")), j("list"), Y(), J();
|
|
133
133
|
} catch (e) {
|
|
134
134
|
L(e instanceof Error ? e.message : "Failed to update user");
|
|
135
135
|
}
|
|
@@ -138,14 +138,14 @@ function h() {
|
|
|
138
138
|
o("medium");
|
|
139
139
|
try {
|
|
140
140
|
let t = await le(e.id);
|
|
141
|
-
t.success ? (s("success"), B(
|
|
141
|
+
t.success ? (s("success"), B(_("auth.users.userDeactivated", `User "${e.email}" has been deactivated.`)), H(null), J()) : (s("error"), L(t.message));
|
|
142
142
|
} catch (e) {
|
|
143
143
|
s("error"), L(e instanceof Error ? e.message : "Failed to delete user");
|
|
144
144
|
}
|
|
145
145
|
}, Ce = async (e) => {
|
|
146
146
|
try {
|
|
147
147
|
let t = await ue(e.id);
|
|
148
|
-
t.success ? (B(
|
|
148
|
+
t.success ? (B(_("auth.users.userPermanentlyDeleted", `User "${e.email}" has been permanently deleted.`)), H(null), J()) : L(t.message);
|
|
149
149
|
} catch (e) {
|
|
150
150
|
L(e instanceof Error ? e.message : "Failed to hard delete user");
|
|
151
151
|
}
|
|
@@ -160,14 +160,14 @@ function h() {
|
|
|
160
160
|
status: e.status,
|
|
161
161
|
emailVerified: e.emailVerified
|
|
162
162
|
}), j("edit"), L(null);
|
|
163
|
-
}, Z = /* @__PURE__ */
|
|
163
|
+
}, Z = /* @__PURE__ */ f(a, {
|
|
164
164
|
open: V !== null,
|
|
165
165
|
onOpenChange: (e) => {
|
|
166
166
|
e || H(null);
|
|
167
167
|
},
|
|
168
|
-
title: V?.type === "hard-delete" ?
|
|
169
|
-
description: V?.type === "hard-delete" ? V ?
|
|
170
|
-
confirmText: V?.type === "hard-delete" ?
|
|
168
|
+
title: V?.type === "hard-delete" ? _("auth.users.hardDeleteTitle", "Permanently delete user?") : _("auth.users.deactivateTitle", "Deactivate user?"),
|
|
169
|
+
description: V?.type === "hard-delete" ? V ? _("auth.users.hardDeleteDesc", `This permanently deletes "${V.user.email}" and cannot be undone.`) : "" : V ? _("auth.users.deactivateDesc", `"${V.user.email}" will be prevented from signing in until reactivated.`) : "",
|
|
170
|
+
confirmText: V?.type === "hard-delete" ? _("auth.users.hardDeleteConfirm", "Delete permanently") : _("auth.users.deactivateConfirm", "Deactivate user"),
|
|
171
171
|
variant: V?.type === "hard-delete" ? "danger" : "warning",
|
|
172
172
|
onConfirm: async () => {
|
|
173
173
|
if (V) {
|
|
@@ -197,62 +197,28 @@ function h() {
|
|
|
197
197
|
default: return "bg-bg-sunken text-text-primary";
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
|
-
return
|
|
201
|
-
"SUPER_ADMIN",
|
|
202
|
-
"TENANT_ADMIN",
|
|
203
|
-
"ORG_ADMIN"
|
|
204
|
-
].includes(v.role) ? /* @__PURE__ */ d("div", {
|
|
200
|
+
return v ? se ? /* @__PURE__ */ f("div", {
|
|
205
201
|
className: "max-w-6xl mx-auto p-6",
|
|
206
|
-
children: /* @__PURE__ */
|
|
207
|
-
className: "text-center py-16 border-2 border-dashed border-border-subtle rounded-xl",
|
|
208
|
-
children: [
|
|
209
|
-
/* @__PURE__ */ d("div", {
|
|
210
|
-
className: "size-16 mx-auto mb-4 rounded-full bg-status-error-bg-subtle flex items-center justify-center",
|
|
211
|
-
children: /* @__PURE__ */ d("svg", {
|
|
212
|
-
className: "size-8 text-status-error-text",
|
|
213
|
-
fill: "none",
|
|
214
|
-
viewBox: "0 0 24 24",
|
|
215
|
-
stroke: "currentColor",
|
|
216
|
-
children: /* @__PURE__ */ d("path", {
|
|
217
|
-
strokeLinecap: "round",
|
|
218
|
-
strokeLinejoin: "round",
|
|
219
|
-
strokeWidth: 1.5,
|
|
220
|
-
d: "M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"
|
|
221
|
-
})
|
|
222
|
-
})
|
|
223
|
-
}),
|
|
224
|
-
/* @__PURE__ */ d("h2", {
|
|
225
|
-
className: "text-xl font-semibold text-text-primary mb-2",
|
|
226
|
-
children: g("auth.users.notAllowed", "You are not allowed to access this page")
|
|
227
|
-
}),
|
|
228
|
-
/* @__PURE__ */ d("p", {
|
|
229
|
-
className: "text-text-secondary",
|
|
230
|
-
children: g("auth.users.notAllowedDesc", "This page is restricted to administrators only. Contact your admin if you need access.")
|
|
231
|
-
})
|
|
232
|
-
]
|
|
233
|
-
})
|
|
234
|
-
}) : se ? /* @__PURE__ */ d("div", {
|
|
235
|
-
className: "max-w-6xl mx-auto p-6",
|
|
236
|
-
children: /* @__PURE__ */ f("div", {
|
|
202
|
+
children: /* @__PURE__ */ p("div", {
|
|
237
203
|
className: "text-center py-16",
|
|
238
|
-
children: [/* @__PURE__ */
|
|
204
|
+
children: [/* @__PURE__ */ f(n, { className: "size-8 mx-auto text-text-secondary animate-spin" }), /* @__PURE__ */ f("p", {
|
|
239
205
|
className: "mt-4 text-text-secondary",
|
|
240
|
-
children:
|
|
206
|
+
children: _("auth.users.loadingPermissions", "Loading permissions...")
|
|
241
207
|
})]
|
|
242
208
|
})
|
|
243
|
-
}) : !ae || _e ? /* @__PURE__ */
|
|
209
|
+
}) : !ae || _e ? /* @__PURE__ */ f("div", {
|
|
244
210
|
className: "max-w-6xl mx-auto p-6",
|
|
245
|
-
children: /* @__PURE__ */
|
|
211
|
+
children: /* @__PURE__ */ p("div", {
|
|
246
212
|
className: "text-center py-16 border-2 border-dashed border-border-subtle rounded-xl",
|
|
247
213
|
children: [
|
|
248
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ f("div", {
|
|
249
215
|
className: "size-16 mx-auto mb-4 rounded-full bg-status-error-bg-subtle flex items-center justify-center",
|
|
250
|
-
children: /* @__PURE__ */
|
|
216
|
+
children: /* @__PURE__ */ f("svg", {
|
|
251
217
|
className: "size-8 text-status-error-text",
|
|
252
218
|
fill: "none",
|
|
253
219
|
viewBox: "0 0 24 24",
|
|
254
220
|
stroke: "currentColor",
|
|
255
|
-
children: /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ f("path", {
|
|
256
222
|
strokeLinecap: "round",
|
|
257
223
|
strokeLinejoin: "round",
|
|
258
224
|
strokeWidth: 1.5,
|
|
@@ -260,125 +226,125 @@ function h() {
|
|
|
260
226
|
})
|
|
261
227
|
})
|
|
262
228
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ f("h2", {
|
|
264
230
|
className: "text-xl font-semibold text-text-primary mb-2",
|
|
265
|
-
children:
|
|
231
|
+
children: _("auth.users.adminAccessRequired", "Admin Access Required")
|
|
266
232
|
}),
|
|
267
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ f("p", {
|
|
268
234
|
className: "text-text-secondary mb-4",
|
|
269
|
-
children:
|
|
235
|
+
children: _("auth.users.adminAccessDesc", "You need administrator privileges to view and manage users.")
|
|
270
236
|
}),
|
|
271
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ f("p", {
|
|
272
238
|
className: "text-sm text-text-secondary",
|
|
273
|
-
children:
|
|
239
|
+
children: _("auth.users.requiredRoles", "Required roles: Super Admin, Tenant Admin, or Org Admin")
|
|
274
240
|
})
|
|
275
241
|
]
|
|
276
242
|
})
|
|
277
|
-
}) : A === "list" ? /* @__PURE__ */
|
|
243
|
+
}) : A === "list" ? /* @__PURE__ */ p("div", {
|
|
278
244
|
className: "max-w-6xl mx-auto p-6",
|
|
279
245
|
children: [
|
|
280
246
|
Z,
|
|
281
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ p("div", {
|
|
282
248
|
className: "flex items-center justify-between mb-8",
|
|
283
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h1", {
|
|
284
250
|
className: "text-3xl font-semibold text-text-primary",
|
|
285
|
-
children:
|
|
286
|
-
}), /* @__PURE__ */
|
|
251
|
+
children: _("auth.users.title", "Users")
|
|
252
|
+
}), /* @__PURE__ */ p("p", {
|
|
287
253
|
className: "text-text-secondary mt-2",
|
|
288
254
|
children: [
|
|
289
|
-
|
|
255
|
+
_("auth.users.subtitle", "Manage users in your organization"),
|
|
290
256
|
" (",
|
|
291
257
|
k,
|
|
292
258
|
" ",
|
|
293
|
-
|
|
259
|
+
_("auth.users.paginationUsers", "total"),
|
|
294
260
|
")"
|
|
295
261
|
]
|
|
296
|
-
})] }), /* @__PURE__ */
|
|
262
|
+
})] }), /* @__PURE__ */ f("button", {
|
|
297
263
|
type: "button",
|
|
298
264
|
onClick: () => void fe(),
|
|
299
265
|
disabled: E,
|
|
300
|
-
"aria-label":
|
|
266
|
+
"aria-label": _("auth.users.exportAriaLabel", "Export user list"),
|
|
301
267
|
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",
|
|
302
|
-
children: E ? /* @__PURE__ */
|
|
268
|
+
children: E ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(n, {
|
|
303
269
|
className: "size-4 animate-spin",
|
|
304
270
|
"aria-hidden": "true"
|
|
305
|
-
}),
|
|
271
|
+
}), _("auth.users.exporting", "Exporting...")] }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("svg", {
|
|
306
272
|
className: "size-4",
|
|
307
273
|
fill: "none",
|
|
308
274
|
viewBox: "0 0 24 24",
|
|
309
275
|
stroke: "currentColor",
|
|
310
276
|
"aria-hidden": "true",
|
|
311
|
-
children: /* @__PURE__ */
|
|
277
|
+
children: /* @__PURE__ */ f("path", {
|
|
312
278
|
strokeLinecap: "round",
|
|
313
279
|
strokeLinejoin: "round",
|
|
314
280
|
strokeWidth: 2,
|
|
315
281
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
316
282
|
})
|
|
317
|
-
}),
|
|
283
|
+
}), _("auth.users.export", "Export")] })
|
|
318
284
|
})]
|
|
319
285
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ f("div", {
|
|
321
287
|
"aria-live": "polite",
|
|
322
288
|
"aria-atomic": "true",
|
|
323
289
|
className: "sr-only",
|
|
324
290
|
children: z
|
|
325
291
|
}),
|
|
326
|
-
/* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ f("div", {
|
|
327
293
|
role: "alert",
|
|
328
294
|
"aria-live": "assertive",
|
|
329
295
|
"aria-atomic": "true",
|
|
330
296
|
className: "sr-only",
|
|
331
297
|
children: I
|
|
332
298
|
}),
|
|
333
|
-
z && /* @__PURE__ */
|
|
299
|
+
z && /* @__PURE__ */ p("output", {
|
|
334
300
|
id: de,
|
|
335
301
|
className: "block mb-6 p-4 rounded-xl bg-status-success-bg-subtle border border-status-success-border",
|
|
336
|
-
children: [/* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ f("p", {
|
|
337
303
|
className: "text-status-success-text",
|
|
338
304
|
children: z
|
|
339
|
-
}), /* @__PURE__ */
|
|
305
|
+
}), /* @__PURE__ */ f("button", {
|
|
340
306
|
type: "button",
|
|
341
307
|
onClick: () => B(null),
|
|
342
308
|
className: "mt-2 text-sm text-status-success-text hover:underline",
|
|
343
|
-
children:
|
|
309
|
+
children: _("auth.users.dismiss", "Dismiss")
|
|
344
310
|
})]
|
|
345
311
|
}),
|
|
346
|
-
I && /* @__PURE__ */
|
|
312
|
+
I && /* @__PURE__ */ p("div", {
|
|
347
313
|
id: T,
|
|
348
314
|
role: "alert",
|
|
349
315
|
className: "mb-6 flex items-start gap-3 p-4 rounded-xl bg-status-error-bg-subtle border border-status-error-border",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
316
|
+
children: [/* @__PURE__ */ f(t, {
|
|
351
317
|
className: "size-5 text-status-error-text flex-shrink-0 mt-0.5",
|
|
352
318
|
"aria-hidden": "true"
|
|
353
|
-
}), /* @__PURE__ */
|
|
319
|
+
}), /* @__PURE__ */ p("div", {
|
|
354
320
|
className: "flex-1",
|
|
355
|
-
children: [/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ f("p", {
|
|
356
322
|
className: "text-sm text-status-error-text",
|
|
357
323
|
children: I
|
|
358
|
-
}), /* @__PURE__ */
|
|
324
|
+
}), /* @__PURE__ */ f("button", {
|
|
359
325
|
type: "button",
|
|
360
326
|
onClick: () => L(null),
|
|
361
327
|
className: "mt-2 text-sm text-status-error-text hover:underline",
|
|
362
|
-
children:
|
|
328
|
+
children: _("auth.users.dismiss", "Dismiss")
|
|
363
329
|
})]
|
|
364
330
|
})]
|
|
365
331
|
}),
|
|
366
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ f("div", {
|
|
367
333
|
className: "mb-6 p-4 rounded-xl border border-border-subtle bg-bg-surface",
|
|
368
|
-
children: /* @__PURE__ */
|
|
334
|
+
children: /* @__PURE__ */ p("div", {
|
|
369
335
|
className: "flex flex-wrap gap-4 items-end",
|
|
370
336
|
children: [
|
|
371
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ p("div", {
|
|
372
338
|
className: "flex-1 min-w-[200px]",
|
|
373
|
-
children: [/* @__PURE__ */
|
|
339
|
+
children: [/* @__PURE__ */ f("label", {
|
|
374
340
|
htmlFor: S,
|
|
375
341
|
className: "sr-only",
|
|
376
|
-
children:
|
|
377
|
-
}), /* @__PURE__ */
|
|
342
|
+
children: _("auth.users.searchLabel", "Search users")
|
|
343
|
+
}), /* @__PURE__ */ f("input", {
|
|
378
344
|
id: S,
|
|
379
345
|
type: "search",
|
|
380
|
-
"aria-label":
|
|
381
|
-
placeholder:
|
|
346
|
+
"aria-label": _("auth.users.searchLabel", "Search users"),
|
|
347
|
+
placeholder: _("auth.users.searchPlaceholder", "Search by email, username, or name..."),
|
|
382
348
|
value: U,
|
|
383
349
|
onChange: (e) => {
|
|
384
350
|
ve(e.target.value), q(0);
|
|
@@ -386,40 +352,40 @@ function h() {
|
|
|
386
352
|
className: "w-full px-4 py-2.5 border border-border-default rounded-xl bg-bg-surface text-text-primary placeholder-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all"
|
|
387
353
|
})]
|
|
388
354
|
}),
|
|
389
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
390
356
|
htmlFor: C,
|
|
391
357
|
className: "sr-only",
|
|
392
|
-
children:
|
|
393
|
-
}), /* @__PURE__ */
|
|
358
|
+
children: _("auth.users.filterRoleLabel", "Filter by role")
|
|
359
|
+
}), /* @__PURE__ */ p("select", {
|
|
394
360
|
id: C,
|
|
395
361
|
value: W,
|
|
396
362
|
onChange: (e) => {
|
|
397
363
|
ye(e.target.value), q(0);
|
|
398
364
|
},
|
|
399
365
|
className: "px-4 py-2.5 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
|
|
400
|
-
children: [/* @__PURE__ */
|
|
366
|
+
children: [/* @__PURE__ */ f("option", {
|
|
401
367
|
value: "",
|
|
402
|
-
children:
|
|
403
|
-
}),
|
|
368
|
+
children: _("auth.users.allRoles", "All Roles")
|
|
369
|
+
}), m.map((e) => /* @__PURE__ */ f("option", {
|
|
404
370
|
value: e,
|
|
405
371
|
children: e.replace("_", " ")
|
|
406
372
|
}, e))]
|
|
407
373
|
})] }),
|
|
408
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
409
375
|
htmlFor: w,
|
|
410
376
|
className: "sr-only",
|
|
411
|
-
children:
|
|
412
|
-
}), /* @__PURE__ */
|
|
377
|
+
children: _("auth.users.filterStatusLabel", "Filter by status")
|
|
378
|
+
}), /* @__PURE__ */ p("select", {
|
|
413
379
|
id: w,
|
|
414
380
|
value: G,
|
|
415
381
|
onChange: (e) => {
|
|
416
382
|
be(e.target.value), q(0);
|
|
417
383
|
},
|
|
418
384
|
className: "px-4 py-2.5 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
|
|
419
|
-
children: [/* @__PURE__ */
|
|
385
|
+
children: [/* @__PURE__ */ f("option", {
|
|
420
386
|
value: "",
|
|
421
|
-
children:
|
|
422
|
-
}),
|
|
387
|
+
children: _("auth.users.allStatuses", "All Statuses")
|
|
388
|
+
}), h.map((e) => /* @__PURE__ */ f("option", {
|
|
423
389
|
value: e,
|
|
424
390
|
children: e
|
|
425
391
|
}, e))]
|
|
@@ -427,180 +393,180 @@ function h() {
|
|
|
427
393
|
]
|
|
428
394
|
})
|
|
429
395
|
}),
|
|
430
|
-
x ? /* @__PURE__ */
|
|
396
|
+
x ? /* @__PURE__ */ p("div", {
|
|
431
397
|
"aria-live": "polite",
|
|
432
398
|
"aria-busy": "true",
|
|
433
399
|
className: "flex items-center justify-center py-12",
|
|
434
|
-
children: [/* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ f(n, {
|
|
435
401
|
className: "size-8 text-text-link animate-spin",
|
|
436
402
|
"aria-hidden": "true"
|
|
437
|
-
}), /* @__PURE__ */
|
|
403
|
+
}), /* @__PURE__ */ f("span", {
|
|
438
404
|
className: "ml-3 text-text-secondary",
|
|
439
|
-
children:
|
|
405
|
+
children: _("auth.users.loadingUsers", "Loading users...")
|
|
440
406
|
})]
|
|
441
|
-
}) : O.length === 0 ? /* @__PURE__ */
|
|
407
|
+
}) : O.length === 0 ? /* @__PURE__ */ p("div", {
|
|
442
408
|
className: "text-center py-16 border-2 border-dashed border-border-subtle rounded-xl",
|
|
443
|
-
children: [/* @__PURE__ */
|
|
409
|
+
children: [/* @__PURE__ */ f("div", {
|
|
444
410
|
className: "size-16 mx-auto mb-4 rounded-full bg-bg-sunken flex items-center justify-center",
|
|
445
|
-
children: /* @__PURE__ */
|
|
411
|
+
children: /* @__PURE__ */ f("svg", {
|
|
446
412
|
className: "size-8 text-text-tertiary",
|
|
447
413
|
fill: "none",
|
|
448
414
|
viewBox: "0 0 24 24",
|
|
449
415
|
stroke: "currentColor",
|
|
450
|
-
children: /* @__PURE__ */
|
|
416
|
+
children: /* @__PURE__ */ f("path", {
|
|
451
417
|
strokeLinecap: "round",
|
|
452
418
|
strokeLinejoin: "round",
|
|
453
419
|
strokeWidth: 1.5,
|
|
454
420
|
d: "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"
|
|
455
421
|
})
|
|
456
422
|
})
|
|
457
|
-
}), /* @__PURE__ */
|
|
423
|
+
}), /* @__PURE__ */ f("p", {
|
|
458
424
|
className: "text-text-secondary",
|
|
459
|
-
children:
|
|
425
|
+
children: _("auth.users.noUsersFound", "No users found")
|
|
460
426
|
})]
|
|
461
|
-
}) : /* @__PURE__ */
|
|
427
|
+
}) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("div", {
|
|
462
428
|
className: "rounded-xl border border-border-subtle bg-bg-surface overflow-hidden shadow-sm",
|
|
463
|
-
children: /* @__PURE__ */
|
|
429
|
+
children: /* @__PURE__ */ f("div", {
|
|
464
430
|
className: "overflow-x-auto",
|
|
465
|
-
children: /* @__PURE__ */
|
|
431
|
+
children: /* @__PURE__ */ p("table", {
|
|
466
432
|
className: "w-full min-w-[800px]",
|
|
467
|
-
"aria-label":
|
|
468
|
-
children: [/* @__PURE__ */
|
|
433
|
+
"aria-label": _("auth.users.tableAriaLabel", "Users table"),
|
|
434
|
+
children: [/* @__PURE__ */ f("thead", { children: /* @__PURE__ */ p("tr", {
|
|
469
435
|
className: "border-b border-border-subtle bg-bg-canvas",
|
|
470
436
|
children: [
|
|
471
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ f("th", {
|
|
472
438
|
scope: "col",
|
|
473
439
|
className: "text-left p-4 text-sm font-medium text-text-secondary w-[280px]",
|
|
474
|
-
children:
|
|
440
|
+
children: _("auth.users.columnUser", "User")
|
|
475
441
|
}),
|
|
476
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ f("th", {
|
|
477
443
|
scope: "col",
|
|
478
444
|
className: "text-left p-4 text-sm font-medium text-text-secondary w-[130px]",
|
|
479
|
-
children:
|
|
445
|
+
children: _("auth.users.columnRole", "Role")
|
|
480
446
|
}),
|
|
481
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ f("th", {
|
|
482
448
|
scope: "col",
|
|
483
449
|
className: "text-left p-4 text-sm font-medium text-text-secondary w-[100px]",
|
|
484
|
-
children:
|
|
450
|
+
children: _("auth.users.columnStatus", "Status")
|
|
485
451
|
}),
|
|
486
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ f("th", {
|
|
487
453
|
scope: "col",
|
|
488
454
|
className: "text-left p-4 text-sm font-medium text-text-secondary w-[80px]",
|
|
489
|
-
children:
|
|
455
|
+
children: _("auth.users.columnVerified", "Verified")
|
|
490
456
|
}),
|
|
491
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ f("th", {
|
|
492
458
|
scope: "col",
|
|
493
459
|
className: "text-left p-4 text-sm font-medium text-text-secondary w-[100px]",
|
|
494
|
-
children:
|
|
460
|
+
children: _("auth.users.columnLastLogin", "Last Login")
|
|
495
461
|
}),
|
|
496
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ f("th", {
|
|
497
463
|
scope: "col",
|
|
498
464
|
className: "text-right p-4 text-sm font-medium text-text-secondary w-[180px]",
|
|
499
|
-
children:
|
|
465
|
+
children: _("auth.users.columnActions", "Actions")
|
|
500
466
|
})
|
|
501
467
|
]
|
|
502
|
-
}) }), /* @__PURE__ */
|
|
468
|
+
}) }), /* @__PURE__ */ f("tbody", { children: O.map((e) => /* @__PURE__ */ p("tr", {
|
|
503
469
|
className: "border-b border-border-subtle last:border-b-0 hover:bg-bg-sunken/50 transition-colors",
|
|
504
470
|
children: [
|
|
505
|
-
/* @__PURE__ */
|
|
471
|
+
/* @__PURE__ */ f("td", {
|
|
506
472
|
className: "p-4",
|
|
507
|
-
children: /* @__PURE__ */
|
|
473
|
+
children: /* @__PURE__ */ p("div", {
|
|
508
474
|
className: "flex items-center gap-3 min-w-0",
|
|
509
|
-
children: [/* @__PURE__ */
|
|
475
|
+
children: [/* @__PURE__ */ f("div", {
|
|
510
476
|
className: "auth-brand-badge flex size-10 shrink-0 items-center justify-center rounded-full font-medium",
|
|
511
477
|
children: (e.name || e.username || e.email).charAt(0).toUpperCase()
|
|
512
|
-
}), /* @__PURE__ */
|
|
478
|
+
}), /* @__PURE__ */ p("div", {
|
|
513
479
|
className: "min-w-0 flex-1",
|
|
514
|
-
children: [/* @__PURE__ */
|
|
480
|
+
children: [/* @__PURE__ */ f("p", {
|
|
515
481
|
className: "font-medium text-text-primary truncate",
|
|
516
482
|
children: e.name || e.username
|
|
517
|
-
}), /* @__PURE__ */
|
|
483
|
+
}), /* @__PURE__ */ f("p", {
|
|
518
484
|
className: "text-sm text-text-secondary truncate",
|
|
519
485
|
children: e.email
|
|
520
486
|
})]
|
|
521
487
|
})]
|
|
522
488
|
})
|
|
523
489
|
}),
|
|
524
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ f("td", {
|
|
525
491
|
className: "p-4",
|
|
526
|
-
children: /* @__PURE__ */
|
|
492
|
+
children: /* @__PURE__ */ f("span", {
|
|
527
493
|
className: `inline-block px-2.5 py-1 rounded-full text-xs font-medium whitespace-nowrap ${Q(e.role)}`,
|
|
528
494
|
children: e.role.replace("_", " ")
|
|
529
495
|
})
|
|
530
496
|
}),
|
|
531
|
-
/* @__PURE__ */
|
|
497
|
+
/* @__PURE__ */ f("td", {
|
|
532
498
|
className: "p-4",
|
|
533
|
-
children: /* @__PURE__ */
|
|
499
|
+
children: /* @__PURE__ */ f("span", {
|
|
534
500
|
className: `inline-block px-2.5 py-1 rounded-full text-xs font-medium whitespace-nowrap ${$(e.status)}`,
|
|
535
501
|
children: e.status
|
|
536
502
|
})
|
|
537
503
|
}),
|
|
538
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ f("td", {
|
|
539
505
|
className: "p-4",
|
|
540
|
-
children: e.emailVerified ? /* @__PURE__ */
|
|
506
|
+
children: e.emailVerified ? /* @__PURE__ */ p("span", {
|
|
541
507
|
className: "inline-flex items-center gap-1 text-status-success-text whitespace-nowrap",
|
|
542
|
-
children: [/* @__PURE__ */
|
|
508
|
+
children: [/* @__PURE__ */ f("svg", {
|
|
543
509
|
className: "size-4 flex-shrink-0",
|
|
544
510
|
fill: "currentColor",
|
|
545
511
|
viewBox: "0 0 20 20",
|
|
546
|
-
children: /* @__PURE__ */
|
|
512
|
+
children: /* @__PURE__ */ f("path", {
|
|
547
513
|
fillRule: "evenodd",
|
|
548
514
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
|
|
549
515
|
clipRule: "evenodd"
|
|
550
516
|
})
|
|
551
|
-
}), /* @__PURE__ */
|
|
517
|
+
}), /* @__PURE__ */ f("span", {
|
|
552
518
|
className: "text-sm",
|
|
553
|
-
children:
|
|
519
|
+
children: _("auth.users.verifiedYes", "Yes")
|
|
554
520
|
})]
|
|
555
|
-
}) : /* @__PURE__ */
|
|
521
|
+
}) : /* @__PURE__ */ p("span", {
|
|
556
522
|
className: "inline-flex items-center gap-1 text-status-warning-text whitespace-nowrap",
|
|
557
|
-
children: [/* @__PURE__ */
|
|
523
|
+
children: [/* @__PURE__ */ f("svg", {
|
|
558
524
|
className: "size-4 flex-shrink-0",
|
|
559
525
|
fill: "currentColor",
|
|
560
526
|
viewBox: "0 0 20 20",
|
|
561
|
-
children: /* @__PURE__ */
|
|
527
|
+
children: /* @__PURE__ */ f("path", {
|
|
562
528
|
fillRule: "evenodd",
|
|
563
529
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",
|
|
564
530
|
clipRule: "evenodd"
|
|
565
531
|
})
|
|
566
|
-
}), /* @__PURE__ */
|
|
532
|
+
}), /* @__PURE__ */ f("span", {
|
|
567
533
|
className: "text-sm",
|
|
568
|
-
children:
|
|
534
|
+
children: _("auth.users.verifiedNo", "No")
|
|
569
535
|
})]
|
|
570
536
|
})
|
|
571
537
|
}),
|
|
572
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ f("td", {
|
|
573
539
|
className: "p-4 text-sm text-text-secondary whitespace-nowrap",
|
|
574
|
-
children: e.lastLoginAt ? new Date(e.lastLoginAt).toLocaleDateString() :
|
|
540
|
+
children: e.lastLoginAt ? new Date(e.lastLoginAt).toLocaleDateString() : _("auth.users.lastLoginNever", "Never")
|
|
575
541
|
}),
|
|
576
|
-
/* @__PURE__ */
|
|
542
|
+
/* @__PURE__ */ f("td", {
|
|
577
543
|
className: "p-4",
|
|
578
|
-
children: /* @__PURE__ */
|
|
544
|
+
children: /* @__PURE__ */ p("div", {
|
|
579
545
|
className: "flex justify-end gap-1.5 flex-nowrap",
|
|
580
546
|
children: [
|
|
581
|
-
/* @__PURE__ */
|
|
547
|
+
/* @__PURE__ */ f("button", {
|
|
582
548
|
type: "button",
|
|
583
|
-
onClick: () =>
|
|
584
|
-
"aria-label": `${
|
|
549
|
+
onClick: () => g(`/auth/users/${e.id}`),
|
|
550
|
+
"aria-label": `${_("auth.users.actionView", "View")} ${e.name || e.username || e.email}`,
|
|
585
551
|
className: "px-2.5 py-1.5 rounded-lg text-xs font-medium border border-border-default text-text-primary bg-bg-surface hover:bg-bg-sunken transition-colors whitespace-nowrap flex-shrink-0",
|
|
586
|
-
children:
|
|
552
|
+
children: _("auth.users.actionView", "View")
|
|
587
553
|
}),
|
|
588
|
-
oe && /* @__PURE__ */
|
|
554
|
+
oe && /* @__PURE__ */ f("button", {
|
|
589
555
|
type: "button",
|
|
590
556
|
onClick: () => X(e),
|
|
591
|
-
"aria-label": `${
|
|
557
|
+
"aria-label": `${_("auth.users.actionEdit", "Edit")} ${e.name || e.username || e.email}`,
|
|
592
558
|
className: "px-2.5 py-1.5 rounded-lg text-xs font-medium border border-status-info-border text-text-link bg-bg-surface hover:bg-status-info-bg-subtle transition-colors whitespace-nowrap flex-shrink-0",
|
|
593
|
-
children:
|
|
559
|
+
children: _("auth.users.actionEdit", "Edit")
|
|
594
560
|
}),
|
|
595
|
-
y && e.status !== "DELETED" && /* @__PURE__ */
|
|
561
|
+
y && e.status !== "DELETED" && /* @__PURE__ */ f("button", {
|
|
596
562
|
type: "button",
|
|
597
563
|
onClick: () => H({
|
|
598
564
|
type: "deactivate",
|
|
599
565
|
user: e
|
|
600
566
|
}),
|
|
601
|
-
"aria-label": `${
|
|
567
|
+
"aria-label": `${_("auth.users.actionDelete", "Delete")} ${e.name || e.username || e.email}`,
|
|
602
568
|
className: "px-2.5 py-1.5 rounded-lg text-xs font-medium border border-status-error-border text-status-error-text bg-bg-surface hover:bg-status-error-bg-subtle transition-colors whitespace-nowrap flex-shrink-0",
|
|
603
|
-
children:
|
|
569
|
+
children: _("auth.users.actionDelete", "Delete")
|
|
604
570
|
})
|
|
605
571
|
]
|
|
606
572
|
})
|
|
@@ -609,307 +575,307 @@ function h() {
|
|
|
609
575
|
}, e.id)) })]
|
|
610
576
|
})
|
|
611
577
|
})
|
|
612
|
-
}), /* @__PURE__ */
|
|
578
|
+
}), /* @__PURE__ */ p("div", {
|
|
613
579
|
className: "mt-6 flex items-center justify-between",
|
|
614
|
-
children: [/* @__PURE__ */
|
|
580
|
+
children: [/* @__PURE__ */ p("p", {
|
|
615
581
|
className: "text-sm text-text-secondary",
|
|
616
582
|
children: [
|
|
617
|
-
|
|
583
|
+
_("auth.users.showing", "Showing"),
|
|
618
584
|
" ",
|
|
619
585
|
K * 10 + 1,
|
|
620
586
|
" ",
|
|
621
|
-
|
|
587
|
+
_("auth.users.to", "to"),
|
|
622
588
|
" ",
|
|
623
589
|
Math.min((K + 1) * 10, k),
|
|
624
590
|
" ",
|
|
625
|
-
|
|
591
|
+
_("auth.users.of", "of"),
|
|
626
592
|
" ",
|
|
627
593
|
k,
|
|
628
594
|
" ",
|
|
629
|
-
|
|
595
|
+
_("auth.users.paginationUsers", "users")
|
|
630
596
|
]
|
|
631
|
-
}), /* @__PURE__ */
|
|
632
|
-
"aria-label":
|
|
633
|
-
children: /* @__PURE__ */
|
|
597
|
+
}), /* @__PURE__ */ f("nav", {
|
|
598
|
+
"aria-label": _("auth.users.paginationAriaLabel", "User list pagination"),
|
|
599
|
+
children: /* @__PURE__ */ p("div", {
|
|
634
600
|
className: "flex gap-2",
|
|
635
|
-
children: [/* @__PURE__ */
|
|
601
|
+
children: [/* @__PURE__ */ f("button", {
|
|
636
602
|
type: "button",
|
|
637
603
|
onClick: () => q((e) => Math.max(0, e - 1)),
|
|
638
604
|
disabled: K === 0,
|
|
639
|
-
"aria-label":
|
|
605
|
+
"aria-label": _("auth.users.previousPageAriaLabel", "Go to previous page"),
|
|
640
606
|
className: "px-4 py-2 rounded-lg border border-border-default text-text-primary bg-bg-surface disabled:opacity-50 disabled:cursor-not-allowed hover:bg-bg-sunken transition-colors",
|
|
641
|
-
children:
|
|
642
|
-
}), /* @__PURE__ */
|
|
607
|
+
children: _("auth.users.previousPage", "Previous")
|
|
608
|
+
}), /* @__PURE__ */ f("button", {
|
|
643
609
|
type: "button",
|
|
644
610
|
onClick: () => q((e) => e + 1),
|
|
645
611
|
disabled: !he,
|
|
646
|
-
"aria-label":
|
|
612
|
+
"aria-label": _("auth.users.nextPageAriaLabel", "Go to next page"),
|
|
647
613
|
className: "px-4 py-2 rounded-lg border border-border-default text-text-primary bg-bg-surface disabled:opacity-50 disabled:cursor-not-allowed hover:bg-bg-sunken transition-colors",
|
|
648
|
-
children:
|
|
614
|
+
children: _("auth.users.nextPage", "Next")
|
|
649
615
|
})]
|
|
650
616
|
})
|
|
651
617
|
})]
|
|
652
618
|
})] })
|
|
653
619
|
]
|
|
654
|
-
}) : A === "view" && M ? /* @__PURE__ */
|
|
620
|
+
}) : A === "view" && M ? /* @__PURE__ */ p("div", {
|
|
655
621
|
className: "max-w-4xl mx-auto p-6",
|
|
656
622
|
children: [
|
|
657
623
|
Z,
|
|
658
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ p("button", {
|
|
659
625
|
type: "button",
|
|
660
626
|
onClick: () => {
|
|
661
627
|
j("list"), Y();
|
|
662
628
|
},
|
|
663
629
|
className: "mb-6 flex items-center gap-2 text-text-link hover:underline font-medium",
|
|
664
|
-
children: [/* @__PURE__ */
|
|
630
|
+
children: [/* @__PURE__ */ f("svg", {
|
|
665
631
|
className: "size-4",
|
|
666
632
|
fill: "none",
|
|
667
633
|
viewBox: "0 0 24 24",
|
|
668
634
|
stroke: "currentColor",
|
|
669
|
-
children: /* @__PURE__ */
|
|
635
|
+
children: /* @__PURE__ */ f("path", {
|
|
670
636
|
strokeLinecap: "round",
|
|
671
637
|
strokeLinejoin: "round",
|
|
672
638
|
strokeWidth: 2,
|
|
673
639
|
d: "M10 19l-7-7m0 0l7-7m-7 7h18"
|
|
674
640
|
})
|
|
675
|
-
}),
|
|
641
|
+
}), _("auth.users.backToUsers", "Back to Users")]
|
|
676
642
|
}),
|
|
677
|
-
/* @__PURE__ */
|
|
643
|
+
/* @__PURE__ */ p("div", {
|
|
678
644
|
className: "p-6 rounded-xl border border-border-subtle bg-bg-surface shadow-sm",
|
|
679
645
|
children: [
|
|
680
|
-
/* @__PURE__ */
|
|
646
|
+
/* @__PURE__ */ p("div", {
|
|
681
647
|
className: "flex items-center gap-4 mb-8",
|
|
682
|
-
children: [/* @__PURE__ */
|
|
648
|
+
children: [/* @__PURE__ */ f("div", {
|
|
683
649
|
className: "auth-brand-badge flex size-20 items-center justify-center rounded-full text-3xl font-semibold",
|
|
684
650
|
children: (M.name || M.username || M.email).charAt(0).toUpperCase()
|
|
685
|
-
}), /* @__PURE__ */
|
|
686
|
-
/* @__PURE__ */
|
|
651
|
+
}), /* @__PURE__ */ p("div", { children: [
|
|
652
|
+
/* @__PURE__ */ f("h1", {
|
|
687
653
|
className: "text-2xl font-semibold text-text-primary",
|
|
688
654
|
children: M.name || M.username
|
|
689
655
|
}),
|
|
690
|
-
/* @__PURE__ */
|
|
656
|
+
/* @__PURE__ */ f("p", {
|
|
691
657
|
className: "text-text-secondary",
|
|
692
658
|
children: M.email
|
|
693
659
|
}),
|
|
694
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ p("div", {
|
|
695
661
|
className: "flex items-center gap-2 mt-2",
|
|
696
|
-
children: [/* @__PURE__ */
|
|
662
|
+
children: [/* @__PURE__ */ f("span", {
|
|
697
663
|
className: `px-2.5 py-1 rounded-full text-xs font-medium ${Q(M.role)}`,
|
|
698
664
|
children: M.role.replace("_", " ")
|
|
699
|
-
}), /* @__PURE__ */
|
|
665
|
+
}), /* @__PURE__ */ f("span", {
|
|
700
666
|
className: `px-2.5 py-1 rounded-full text-xs font-medium ${$(M.status)}`,
|
|
701
667
|
children: M.status
|
|
702
668
|
})]
|
|
703
669
|
})
|
|
704
670
|
] })]
|
|
705
671
|
}),
|
|
706
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ p("div", {
|
|
707
673
|
className: "grid grid-cols-2 gap-6",
|
|
708
674
|
children: [
|
|
709
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ p("div", {
|
|
710
676
|
className: "p-4 rounded-lg bg-bg-canvas/50",
|
|
711
|
-
children: [/* @__PURE__ */
|
|
677
|
+
children: [/* @__PURE__ */ f("label", {
|
|
712
678
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
713
|
-
children:
|
|
714
|
-
}), /* @__PURE__ */
|
|
679
|
+
children: _("auth.users.viewDetailsUsername", "Username")
|
|
680
|
+
}), /* @__PURE__ */ f("p", {
|
|
715
681
|
className: "text-text-primary font-medium",
|
|
716
682
|
children: M.username
|
|
717
683
|
})]
|
|
718
684
|
}),
|
|
719
|
-
/* @__PURE__ */
|
|
685
|
+
/* @__PURE__ */ p("div", {
|
|
720
686
|
className: "p-4 rounded-lg bg-bg-canvas/50",
|
|
721
|
-
children: [/* @__PURE__ */
|
|
687
|
+
children: [/* @__PURE__ */ f("label", {
|
|
722
688
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
723
|
-
children:
|
|
724
|
-
}), /* @__PURE__ */
|
|
689
|
+
children: _("auth.users.viewDetailsEmail", "Email")
|
|
690
|
+
}), /* @__PURE__ */ f("p", {
|
|
725
691
|
className: "text-text-primary font-medium",
|
|
726
692
|
children: M.email
|
|
727
693
|
})]
|
|
728
694
|
}),
|
|
729
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ p("div", {
|
|
730
696
|
className: "p-4 rounded-lg bg-bg-canvas/50",
|
|
731
|
-
children: [/* @__PURE__ */
|
|
697
|
+
children: [/* @__PURE__ */ f("label", {
|
|
732
698
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
733
|
-
children:
|
|
734
|
-
}), /* @__PURE__ */
|
|
699
|
+
children: _("auth.users.viewDetailsEmailVerified", "Email Verified")
|
|
700
|
+
}), /* @__PURE__ */ f("p", {
|
|
735
701
|
className: "text-text-primary font-medium",
|
|
736
|
-
children: M.emailVerified ? /* @__PURE__ */
|
|
702
|
+
children: M.emailVerified ? /* @__PURE__ */ f("span", {
|
|
737
703
|
className: "text-status-success-text",
|
|
738
|
-
children:
|
|
739
|
-
}) : /* @__PURE__ */
|
|
704
|
+
children: _("auth.users.verifiedYes", "Yes")
|
|
705
|
+
}) : /* @__PURE__ */ f("span", {
|
|
740
706
|
className: "text-status-warning-text",
|
|
741
|
-
children:
|
|
707
|
+
children: _("auth.users.verifiedNo", "No")
|
|
742
708
|
})
|
|
743
709
|
})]
|
|
744
710
|
}),
|
|
745
|
-
/* @__PURE__ */
|
|
711
|
+
/* @__PURE__ */ p("div", {
|
|
746
712
|
className: "p-4 rounded-lg bg-bg-canvas/50",
|
|
747
|
-
children: [/* @__PURE__ */
|
|
713
|
+
children: [/* @__PURE__ */ f("label", {
|
|
748
714
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
749
|
-
children:
|
|
750
|
-
}), /* @__PURE__ */
|
|
715
|
+
children: _("auth.users.viewDetailsMfaEnabled", "MFA Enabled")
|
|
716
|
+
}), /* @__PURE__ */ f("p", {
|
|
751
717
|
className: "text-text-primary font-medium",
|
|
752
|
-
children: M.mfaEnabled ? /* @__PURE__ */
|
|
718
|
+
children: M.mfaEnabled ? /* @__PURE__ */ f("span", {
|
|
753
719
|
className: "text-status-success-text",
|
|
754
|
-
children:
|
|
755
|
-
}) : /* @__PURE__ */
|
|
720
|
+
children: _("auth.users.verifiedYes", "Yes")
|
|
721
|
+
}) : /* @__PURE__ */ f("span", {
|
|
756
722
|
className: "text-text-secondary",
|
|
757
|
-
children:
|
|
723
|
+
children: _("auth.users.verifiedNo", "No")
|
|
758
724
|
})
|
|
759
725
|
})]
|
|
760
726
|
}),
|
|
761
|
-
M.phoneNumber && /* @__PURE__ */
|
|
727
|
+
M.phoneNumber && /* @__PURE__ */ p("div", {
|
|
762
728
|
className: "p-4 rounded-lg bg-bg-canvas/50",
|
|
763
|
-
children: [/* @__PURE__ */
|
|
729
|
+
children: [/* @__PURE__ */ f("label", {
|
|
764
730
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
765
|
-
children:
|
|
766
|
-
}), /* @__PURE__ */
|
|
731
|
+
children: _("auth.users.viewDetailsPhoneNumber", "Phone Number")
|
|
732
|
+
}), /* @__PURE__ */ f("p", {
|
|
767
733
|
className: "text-text-primary font-medium",
|
|
768
734
|
children: M.phoneNumber
|
|
769
735
|
})]
|
|
770
736
|
}),
|
|
771
|
-
/* @__PURE__ */
|
|
737
|
+
/* @__PURE__ */ p("div", {
|
|
772
738
|
className: "p-4 rounded-lg bg-bg-canvas/50",
|
|
773
|
-
children: [/* @__PURE__ */
|
|
739
|
+
children: [/* @__PURE__ */ f("label", {
|
|
774
740
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
775
|
-
children:
|
|
776
|
-
}), /* @__PURE__ */
|
|
741
|
+
children: _("auth.users.viewDetailsLastLogin", "Last Login")
|
|
742
|
+
}), /* @__PURE__ */ f("p", {
|
|
777
743
|
className: "text-text-primary font-medium",
|
|
778
|
-
children: M.lastLoginAt ? new Date(M.lastLoginAt).toLocaleString() :
|
|
744
|
+
children: M.lastLoginAt ? new Date(M.lastLoginAt).toLocaleString() : _("auth.users.lastLoginNever", "Never")
|
|
779
745
|
})]
|
|
780
746
|
}),
|
|
781
|
-
/* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ p("div", {
|
|
782
748
|
className: "p-4 rounded-lg bg-bg-canvas/50",
|
|
783
|
-
children: [/* @__PURE__ */
|
|
749
|
+
children: [/* @__PURE__ */ f("label", {
|
|
784
750
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
785
|
-
children:
|
|
786
|
-
}), /* @__PURE__ */
|
|
751
|
+
children: _("auth.users.viewDetailsCreated", "Created")
|
|
752
|
+
}), /* @__PURE__ */ f("p", {
|
|
787
753
|
className: "text-text-primary font-medium",
|
|
788
754
|
children: new Date(M.createdAt).toLocaleString()
|
|
789
755
|
})]
|
|
790
756
|
}),
|
|
791
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ p("div", {
|
|
792
758
|
className: "p-4 rounded-lg bg-bg-canvas/50",
|
|
793
|
-
children: [/* @__PURE__ */
|
|
759
|
+
children: [/* @__PURE__ */ f("label", {
|
|
794
760
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
795
|
-
children:
|
|
796
|
-
}), /* @__PURE__ */
|
|
761
|
+
children: _("auth.users.viewDetailsLastUpdated", "Last Updated")
|
|
762
|
+
}), /* @__PURE__ */ f("p", {
|
|
797
763
|
className: "text-text-primary font-medium",
|
|
798
764
|
children: new Date(M.updatedAt).toLocaleString()
|
|
799
765
|
})]
|
|
800
766
|
})
|
|
801
767
|
]
|
|
802
768
|
}),
|
|
803
|
-
/* @__PURE__ */
|
|
769
|
+
/* @__PURE__ */ p("div", {
|
|
804
770
|
className: "mt-8 pt-6 border-t border-border-subtle flex gap-3",
|
|
805
771
|
children: [
|
|
806
|
-
/* @__PURE__ */
|
|
772
|
+
/* @__PURE__ */ f("button", {
|
|
807
773
|
type: "button",
|
|
808
774
|
onClick: () => X(M),
|
|
809
775
|
className: "auth-primary-button px-4 py-2.5 font-medium",
|
|
810
|
-
children:
|
|
776
|
+
children: _("auth.users.editUser", "Edit User")
|
|
811
777
|
}),
|
|
812
|
-
M.status !== "DELETED" && /* @__PURE__ */
|
|
778
|
+
M.status !== "DELETED" && /* @__PURE__ */ f("button", {
|
|
813
779
|
type: "button",
|
|
814
780
|
onClick: () => H({
|
|
815
781
|
type: "deactivate",
|
|
816
782
|
user: M
|
|
817
783
|
}),
|
|
818
784
|
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",
|
|
819
|
-
children:
|
|
785
|
+
children: _("auth.users.deleteUser", "Delete User")
|
|
820
786
|
}),
|
|
821
|
-
y && M.status === "DELETED" &&
|
|
787
|
+
y && M.status === "DELETED" && ie?.role === "SUPER_ADMIN" && /* @__PURE__ */ f("button", {
|
|
822
788
|
type: "button",
|
|
823
789
|
onClick: () => H({
|
|
824
790
|
type: "hard-delete",
|
|
825
791
|
user: M
|
|
826
792
|
}),
|
|
827
793
|
className: "px-4 py-2.5 rounded-xl bg-status-error-bg text-white font-medium hover:bg-status-error-bg-hover transition-colors",
|
|
828
|
-
children:
|
|
794
|
+
children: _("auth.users.permanentlyDelete", "Permanently Delete")
|
|
829
795
|
})
|
|
830
796
|
]
|
|
831
797
|
})
|
|
832
798
|
]
|
|
833
799
|
})
|
|
834
800
|
]
|
|
835
|
-
}) : /* @__PURE__ */
|
|
801
|
+
}) : /* @__PURE__ */ p("div", {
|
|
836
802
|
className: "max-w-2xl mx-auto p-6",
|
|
837
803
|
children: [
|
|
838
804
|
Z,
|
|
839
|
-
/* @__PURE__ */
|
|
805
|
+
/* @__PURE__ */ p("button", {
|
|
840
806
|
type: "button",
|
|
841
807
|
onClick: () => {
|
|
842
808
|
j("list"), Y();
|
|
843
809
|
},
|
|
844
810
|
className: "mb-6 flex items-center gap-2 text-text-link hover:underline font-medium",
|
|
845
|
-
children: [/* @__PURE__ */
|
|
811
|
+
children: [/* @__PURE__ */ f("svg", {
|
|
846
812
|
className: "size-4",
|
|
847
813
|
fill: "none",
|
|
848
814
|
viewBox: "0 0 24 24",
|
|
849
815
|
stroke: "currentColor",
|
|
850
|
-
children: /* @__PURE__ */
|
|
816
|
+
children: /* @__PURE__ */ f("path", {
|
|
851
817
|
strokeLinecap: "round",
|
|
852
818
|
strokeLinejoin: "round",
|
|
853
819
|
strokeWidth: 2,
|
|
854
820
|
d: "M10 19l-7-7m0 0l7-7m-7 7h18"
|
|
855
821
|
})
|
|
856
|
-
}),
|
|
822
|
+
}), _("auth.users.backToUsers", "Back to Users")]
|
|
857
823
|
}),
|
|
858
|
-
/* @__PURE__ */
|
|
824
|
+
/* @__PURE__ */ p("div", {
|
|
859
825
|
className: "p-6 rounded-xl border border-border-subtle bg-bg-surface shadow-sm",
|
|
860
826
|
children: [
|
|
861
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ f("h1", {
|
|
862
828
|
className: "text-2xl font-semibold text-text-primary mb-2",
|
|
863
|
-
children:
|
|
829
|
+
children: _("auth.users.editUser", "Edit User")
|
|
864
830
|
}),
|
|
865
|
-
M && /* @__PURE__ */
|
|
831
|
+
M && /* @__PURE__ */ p("p", {
|
|
866
832
|
className: "text-text-secondary mb-6",
|
|
867
833
|
children: [
|
|
868
|
-
|
|
834
|
+
_("auth.users.editingUser", "Editing:"),
|
|
869
835
|
" ",
|
|
870
|
-
/* @__PURE__ */
|
|
836
|
+
/* @__PURE__ */ f("strong", { children: M.email })
|
|
871
837
|
]
|
|
872
838
|
}),
|
|
873
|
-
I && /* @__PURE__ */
|
|
839
|
+
I && /* @__PURE__ */ p("div", {
|
|
874
840
|
className: "mb-6 flex items-start gap-3 p-4 rounded-xl bg-status-error-bg-subtle border border-status-error-border",
|
|
875
|
-
children: [/* @__PURE__ */
|
|
841
|
+
children: [/* @__PURE__ */ f(t, { className: "size-5 text-status-error-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ f("div", {
|
|
876
842
|
className: "flex-1",
|
|
877
|
-
children: /* @__PURE__ */
|
|
843
|
+
children: /* @__PURE__ */ f("p", {
|
|
878
844
|
className: "text-sm text-status-error-text",
|
|
879
845
|
children: I
|
|
880
846
|
})
|
|
881
847
|
})]
|
|
882
848
|
}),
|
|
883
|
-
/* @__PURE__ */
|
|
849
|
+
/* @__PURE__ */ p("form", {
|
|
884
850
|
onSubmit: xe,
|
|
885
851
|
className: "space-y-6",
|
|
886
852
|
"aria-describedby": I ? T : void 0,
|
|
887
853
|
noValidate: !0,
|
|
888
854
|
children: [
|
|
889
|
-
/* @__PURE__ */
|
|
855
|
+
/* @__PURE__ */ p("div", {
|
|
890
856
|
className: "grid grid-cols-2 gap-4",
|
|
891
|
-
children: [/* @__PURE__ */
|
|
857
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
892
858
|
htmlFor: "edit-username",
|
|
893
859
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
894
|
-
children:
|
|
895
|
-
}), /* @__PURE__ */
|
|
860
|
+
children: _("auth.users.fieldUsername", "Username")
|
|
861
|
+
}), /* @__PURE__ */ f("input", {
|
|
896
862
|
id: "edit-username",
|
|
897
863
|
type: "text",
|
|
898
|
-
"aria-label":
|
|
864
|
+
"aria-label": _("auth.users.fieldUsername", "Username"),
|
|
899
865
|
value: P.username,
|
|
900
866
|
onChange: (e) => F({
|
|
901
867
|
...P,
|
|
902
868
|
username: e.target.value
|
|
903
869
|
}),
|
|
904
870
|
className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all"
|
|
905
|
-
})] }), /* @__PURE__ */
|
|
871
|
+
})] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
906
872
|
htmlFor: "edit-name",
|
|
907
873
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
908
|
-
children:
|
|
909
|
-
}), /* @__PURE__ */
|
|
874
|
+
children: _("auth.users.fieldName", "Name")
|
|
875
|
+
}), /* @__PURE__ */ f("input", {
|
|
910
876
|
id: "edit-name",
|
|
911
877
|
type: "text",
|
|
912
|
-
"aria-label":
|
|
878
|
+
"aria-label": _("auth.users.fieldName", "Name"),
|
|
913
879
|
value: P.name,
|
|
914
880
|
onChange: (e) => F({
|
|
915
881
|
...P,
|
|
@@ -918,30 +884,30 @@ function h() {
|
|
|
918
884
|
className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all"
|
|
919
885
|
})] })]
|
|
920
886
|
}),
|
|
921
|
-
/* @__PURE__ */
|
|
887
|
+
/* @__PURE__ */ p("div", {
|
|
922
888
|
className: "grid grid-cols-2 gap-4",
|
|
923
|
-
children: [/* @__PURE__ */
|
|
889
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
924
890
|
htmlFor: "edit-firstName",
|
|
925
891
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
926
|
-
children:
|
|
927
|
-
}), /* @__PURE__ */
|
|
892
|
+
children: _("auth.users.fieldFirstName", "First Name")
|
|
893
|
+
}), /* @__PURE__ */ f("input", {
|
|
928
894
|
id: "edit-firstName",
|
|
929
895
|
type: "text",
|
|
930
|
-
"aria-label":
|
|
896
|
+
"aria-label": _("auth.users.fieldFirstName", "First Name"),
|
|
931
897
|
value: P.firstName,
|
|
932
898
|
onChange: (e) => F({
|
|
933
899
|
...P,
|
|
934
900
|
firstName: e.target.value
|
|
935
901
|
}),
|
|
936
902
|
className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all"
|
|
937
|
-
})] }), /* @__PURE__ */
|
|
903
|
+
})] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
938
904
|
htmlFor: "edit-lastName",
|
|
939
905
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
940
|
-
children:
|
|
941
|
-
}), /* @__PURE__ */
|
|
906
|
+
children: _("auth.users.fieldLastName", "Last Name")
|
|
907
|
+
}), /* @__PURE__ */ f("input", {
|
|
942
908
|
id: "edit-lastName",
|
|
943
909
|
type: "text",
|
|
944
|
-
"aria-label":
|
|
910
|
+
"aria-label": _("auth.users.fieldLastName", "Last Name"),
|
|
945
911
|
value: P.lastName,
|
|
946
912
|
onChange: (e) => F({
|
|
947
913
|
...P,
|
|
@@ -950,14 +916,14 @@ function h() {
|
|
|
950
916
|
className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all"
|
|
951
917
|
})] })]
|
|
952
918
|
}),
|
|
953
|
-
/* @__PURE__ */
|
|
919
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
954
920
|
htmlFor: "edit-phoneNumber",
|
|
955
921
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
956
|
-
children:
|
|
957
|
-
}), /* @__PURE__ */
|
|
922
|
+
children: _("auth.users.fieldPhoneNumber", "Phone Number")
|
|
923
|
+
}), /* @__PURE__ */ f("input", {
|
|
958
924
|
id: "edit-phoneNumber",
|
|
959
925
|
type: "tel",
|
|
960
|
-
"aria-label":
|
|
926
|
+
"aria-label": _("auth.users.fieldPhoneNumber", "Phone Number"),
|
|
961
927
|
value: P.phoneNumber,
|
|
962
928
|
onChange: (e) => F({
|
|
963
929
|
...P,
|
|
@@ -965,47 +931,47 @@ function h() {
|
|
|
965
931
|
}),
|
|
966
932
|
className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all"
|
|
967
933
|
})] }),
|
|
968
|
-
/* @__PURE__ */
|
|
934
|
+
/* @__PURE__ */ p("div", {
|
|
969
935
|
className: "grid grid-cols-2 gap-4",
|
|
970
|
-
children: [/* @__PURE__ */
|
|
936
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
971
937
|
htmlFor: "edit-role",
|
|
972
938
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
973
|
-
children:
|
|
974
|
-
}), /* @__PURE__ */
|
|
939
|
+
children: _("auth.users.fieldRole", "Role")
|
|
940
|
+
}), /* @__PURE__ */ f("select", {
|
|
975
941
|
id: "edit-role",
|
|
976
|
-
"aria-label":
|
|
942
|
+
"aria-label": _("auth.users.fieldRole", "Role"),
|
|
977
943
|
value: P.role,
|
|
978
944
|
onChange: (e) => F({
|
|
979
945
|
...P,
|
|
980
946
|
role: e.target.value
|
|
981
947
|
}),
|
|
982
948
|
className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
|
|
983
|
-
children:
|
|
949
|
+
children: m.map((e) => /* @__PURE__ */ f("option", {
|
|
984
950
|
value: e,
|
|
985
951
|
children: e.replace("_", " ")
|
|
986
952
|
}, e))
|
|
987
|
-
})] }), /* @__PURE__ */
|
|
953
|
+
})] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
988
954
|
htmlFor: "edit-status",
|
|
989
955
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
990
|
-
children:
|
|
991
|
-
}), /* @__PURE__ */
|
|
956
|
+
children: _("auth.users.fieldStatus", "Status")
|
|
957
|
+
}), /* @__PURE__ */ f("select", {
|
|
992
958
|
id: "edit-status",
|
|
993
|
-
"aria-label":
|
|
959
|
+
"aria-label": _("auth.users.fieldStatus", "Status"),
|
|
994
960
|
value: P.status,
|
|
995
961
|
onChange: (e) => F({
|
|
996
962
|
...P,
|
|
997
963
|
status: e.target.value
|
|
998
964
|
}),
|
|
999
965
|
className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
|
|
1000
|
-
children:
|
|
966
|
+
children: h.map((e) => /* @__PURE__ */ f("option", {
|
|
1001
967
|
value: e,
|
|
1002
968
|
children: e
|
|
1003
969
|
}, e))
|
|
1004
970
|
})] })]
|
|
1005
971
|
}),
|
|
1006
|
-
/* @__PURE__ */
|
|
972
|
+
/* @__PURE__ */ p("div", {
|
|
1007
973
|
className: "flex items-center gap-3 p-4 rounded-xl bg-bg-canvas/50",
|
|
1008
|
-
children: [/* @__PURE__ */
|
|
974
|
+
children: [/* @__PURE__ */ f("input", {
|
|
1009
975
|
type: "checkbox",
|
|
1010
976
|
id: "emailVerified",
|
|
1011
977
|
checked: P.emailVerified,
|
|
@@ -1014,26 +980,26 @@ function h() {
|
|
|
1014
980
|
emailVerified: e.target.checked
|
|
1015
981
|
}),
|
|
1016
982
|
className: "size-5 rounded border-border-default text-text-link focus:ring-action-primary-bg"
|
|
1017
|
-
}), /* @__PURE__ */
|
|
983
|
+
}), /* @__PURE__ */ f("label", {
|
|
1018
984
|
htmlFor: "emailVerified",
|
|
1019
985
|
className: "text-sm font-medium text-text-primary",
|
|
1020
|
-
children:
|
|
986
|
+
children: _("auth.users.fieldEmailVerified", "Email Verified")
|
|
1021
987
|
})]
|
|
1022
988
|
}),
|
|
1023
|
-
/* @__PURE__ */
|
|
989
|
+
/* @__PURE__ */ p("div", {
|
|
1024
990
|
className: "flex gap-3 pt-4",
|
|
1025
|
-
children: [/* @__PURE__ */
|
|
991
|
+
children: [/* @__PURE__ */ f("button", {
|
|
1026
992
|
type: "submit",
|
|
1027
993
|
disabled: x,
|
|
1028
994
|
className: "auth-primary-button flex items-center gap-2 px-6 py-3 font-medium",
|
|
1029
|
-
children: x ? /* @__PURE__ */
|
|
1030
|
-
}), /* @__PURE__ */
|
|
995
|
+
children: x ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(n, { className: "size-4 animate-spin" }), _("auth.users.saving", "Saving...")] }) : _("auth.users.saveChanges", "Save Changes")
|
|
996
|
+
}), /* @__PURE__ */ f("button", {
|
|
1031
997
|
type: "button",
|
|
1032
998
|
onClick: () => {
|
|
1033
999
|
j("list"), Y();
|
|
1034
1000
|
},
|
|
1035
1001
|
className: "px-6 py-3 rounded-xl border border-border-default text-text-primary font-medium hover:bg-bg-sunken transition-colors",
|
|
1036
|
-
children:
|
|
1002
|
+
children: _("auth.users.cancel", "Cancel")
|
|
1037
1003
|
})]
|
|
1038
1004
|
})
|
|
1039
1005
|
]
|
|
@@ -1041,28 +1007,28 @@ function h() {
|
|
|
1041
1007
|
]
|
|
1042
1008
|
})
|
|
1043
1009
|
]
|
|
1044
|
-
}) : /* @__PURE__ */
|
|
1010
|
+
}) : /* @__PURE__ */ f("div", {
|
|
1045
1011
|
className: "max-w-6xl mx-auto p-6",
|
|
1046
|
-
children: /* @__PURE__ */
|
|
1012
|
+
children: /* @__PURE__ */ p("div", {
|
|
1047
1013
|
className: "text-center py-16 border-2 border-dashed border-border-subtle rounded-xl",
|
|
1048
1014
|
children: [
|
|
1049
|
-
/* @__PURE__ */
|
|
1015
|
+
/* @__PURE__ */ f("div", {
|
|
1050
1016
|
className: "size-16 mx-auto mb-4 rounded-full bg-status-warning-bg-subtle flex items-center justify-center",
|
|
1051
|
-
children: /* @__PURE__ */
|
|
1017
|
+
children: /* @__PURE__ */ f(t, { className: "size-8 text-status-warning-text" })
|
|
1052
1018
|
}),
|
|
1053
|
-
/* @__PURE__ */
|
|
1019
|
+
/* @__PURE__ */ f("h2", {
|
|
1054
1020
|
className: "text-xl font-semibold text-text-primary mb-2",
|
|
1055
|
-
children:
|
|
1021
|
+
children: _("auth.users.authRequired", "Authentication Required")
|
|
1056
1022
|
}),
|
|
1057
|
-
/* @__PURE__ */
|
|
1023
|
+
/* @__PURE__ */ f("p", {
|
|
1058
1024
|
className: "text-text-secondary",
|
|
1059
|
-
children:
|
|
1025
|
+
children: _("auth.users.signInToManage", "Please sign in to manage users")
|
|
1060
1026
|
})
|
|
1061
1027
|
]
|
|
1062
1028
|
})
|
|
1063
1029
|
});
|
|
1064
1030
|
}
|
|
1065
1031
|
//#endregion
|
|
1066
|
-
export {
|
|
1032
|
+
export { g as UsersPage };
|
|
1067
1033
|
|
|
1068
1034
|
//# sourceMappingURL=UsersPage.js.map
|