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