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