@burdenoff/microfe-auth 2026.511.1 → 2026.514.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/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/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/useDelegationOperations.d.ts +10 -2
- package/dist/auth/hooks/useDelegationOperations.d.ts.map +1 -1
- package/dist/auth/hooks/useSessionOperations.js +1 -1
- 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/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/SecurityPage.d.ts.map +1 -1
- package/dist/auth/pages/SecurityPage.js +335 -267
- 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/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
|
@@ -2,576 +2,644 @@ import { useAuthStore as e } from "../store/authStore.js";
|
|
|
2
2
|
import { useAuthOperations as t } from "../hooks/useAuthOperations.js";
|
|
3
3
|
import { useAccountOperations as n } from "../hooks/useAccountOperations.js";
|
|
4
4
|
import "../hooks/index.js";
|
|
5
|
-
import { formatDate as
|
|
6
|
-
import { ConfirmActionDialog as
|
|
7
|
-
import { nativeImpact as
|
|
8
|
-
import {
|
|
9
|
-
import { useNavigate as
|
|
10
|
-
import { useI18n as
|
|
11
|
-
import { jsx as
|
|
5
|
+
import { formatDate as ee } from "../utils/formatters.js";
|
|
6
|
+
import { ConfirmActionDialog as r } from "../components/ConfirmActionDialog.js";
|
|
7
|
+
import { nativeImpact as i, nativeNotify as a } from "../../utils/nativeBridge.js";
|
|
8
|
+
import { useEffect as o, useId as s, useRef as c, useState as l } from "react";
|
|
9
|
+
import { useNavigate as u } from "react-router-dom";
|
|
10
|
+
import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
11
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
12
12
|
//#region src/auth/pages/SecurityPage.tsx
|
|
13
|
-
var
|
|
13
|
+
var m = ({ className: e }) => /* @__PURE__ */ f("svg", {
|
|
14
14
|
className: e,
|
|
15
15
|
fill: "none",
|
|
16
16
|
viewBox: "0 0 24 24",
|
|
17
17
|
stroke: "currentColor",
|
|
18
|
-
|
|
18
|
+
"aria-hidden": "true",
|
|
19
|
+
children: /* @__PURE__ */ f("path", {
|
|
19
20
|
strokeLinecap: "round",
|
|
20
21
|
strokeLinejoin: "round",
|
|
21
22
|
strokeWidth: 1.5,
|
|
22
23
|
d: "M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"
|
|
23
24
|
})
|
|
24
|
-
}),
|
|
25
|
+
}), te = ({ className: e }) => /* @__PURE__ */ f("svg", {
|
|
25
26
|
className: e,
|
|
26
27
|
fill: "none",
|
|
27
28
|
viewBox: "0 0 24 24",
|
|
28
29
|
stroke: "currentColor",
|
|
29
|
-
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
children: /* @__PURE__ */ f("path", {
|
|
30
32
|
strokeLinecap: "round",
|
|
31
33
|
strokeLinejoin: "round",
|
|
32
34
|
strokeWidth: 1.5,
|
|
33
35
|
d: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"
|
|
34
36
|
})
|
|
35
|
-
}),
|
|
37
|
+
}), ne = ({ className: e }) => /* @__PURE__ */ f("svg", {
|
|
36
38
|
className: e,
|
|
37
39
|
fill: "none",
|
|
38
40
|
viewBox: "0 0 24 24",
|
|
39
41
|
stroke: "currentColor",
|
|
40
|
-
|
|
42
|
+
"aria-hidden": "true",
|
|
43
|
+
children: /* @__PURE__ */ f("path", {
|
|
41
44
|
strokeLinecap: "round",
|
|
42
45
|
strokeLinejoin: "round",
|
|
43
46
|
strokeWidth: 1.5,
|
|
44
47
|
d: "M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"
|
|
45
48
|
})
|
|
46
|
-
}),
|
|
49
|
+
}), re = ({ className: e }) => /* @__PURE__ */ f("svg", {
|
|
47
50
|
className: e,
|
|
48
51
|
fill: "none",
|
|
49
52
|
viewBox: "0 0 24 24",
|
|
50
53
|
stroke: "currentColor",
|
|
51
|
-
|
|
54
|
+
"aria-hidden": "true",
|
|
55
|
+
children: /* @__PURE__ */ f("path", {
|
|
52
56
|
strokeLinecap: "round",
|
|
53
57
|
strokeLinejoin: "round",
|
|
54
58
|
strokeWidth: 1.5,
|
|
55
59
|
d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
|
|
56
60
|
})
|
|
57
|
-
}),
|
|
61
|
+
}), ie = ({ className: e }) => /* @__PURE__ */ f("svg", {
|
|
58
62
|
className: e,
|
|
59
63
|
fill: "none",
|
|
60
64
|
viewBox: "0 0 24 24",
|
|
61
65
|
stroke: "currentColor",
|
|
62
|
-
|
|
66
|
+
"aria-hidden": "true",
|
|
67
|
+
children: /* @__PURE__ */ f("path", {
|
|
63
68
|
strokeLinecap: "round",
|
|
64
69
|
strokeLinejoin: "round",
|
|
65
70
|
strokeWidth: 1.5,
|
|
66
71
|
d: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"
|
|
67
72
|
})
|
|
68
|
-
}),
|
|
73
|
+
}), h = ({ className: e }) => /* @__PURE__ */ f("svg", {
|
|
69
74
|
className: e,
|
|
70
75
|
fill: "none",
|
|
71
76
|
viewBox: "0 0 24 24",
|
|
72
77
|
stroke: "currentColor",
|
|
73
|
-
|
|
78
|
+
"aria-hidden": "true",
|
|
79
|
+
children: /* @__PURE__ */ f("path", {
|
|
74
80
|
strokeLinecap: "round",
|
|
75
81
|
strokeLinejoin: "round",
|
|
76
82
|
strokeWidth: 1.5,
|
|
77
83
|
d: "M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"
|
|
78
84
|
})
|
|
79
|
-
}),
|
|
85
|
+
}), g = ({ className: e }) => /* @__PURE__ */ f("svg", {
|
|
80
86
|
className: e,
|
|
81
87
|
fill: "none",
|
|
82
88
|
viewBox: "0 0 24 24",
|
|
83
89
|
stroke: "currentColor",
|
|
84
|
-
|
|
90
|
+
"aria-hidden": "true",
|
|
91
|
+
children: /* @__PURE__ */ f("path", {
|
|
85
92
|
strokeLinecap: "round",
|
|
86
93
|
strokeLinejoin: "round",
|
|
87
94
|
strokeWidth: 2,
|
|
88
95
|
d: "M9 5l7 7-7 7"
|
|
89
96
|
})
|
|
90
|
-
}),
|
|
97
|
+
}), _ = ({ className: e }) => /* @__PURE__ */ f("svg", {
|
|
91
98
|
className: e,
|
|
92
99
|
fill: "currentColor",
|
|
93
100
|
viewBox: "0 0 20 20",
|
|
94
|
-
|
|
101
|
+
"aria-hidden": "true",
|
|
102
|
+
children: /* @__PURE__ */ f("path", {
|
|
95
103
|
fillRule: "evenodd",
|
|
96
104
|
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",
|
|
97
105
|
clipRule: "evenodd"
|
|
98
106
|
})
|
|
99
|
-
}),
|
|
107
|
+
}), ae = ({ className: e }) => /* @__PURE__ */ f("svg", {
|
|
100
108
|
className: e,
|
|
101
109
|
fill: "currentColor",
|
|
102
110
|
viewBox: "0 0 20 20",
|
|
103
|
-
|
|
111
|
+
"aria-hidden": "true",
|
|
112
|
+
children: /* @__PURE__ */ f("path", {
|
|
104
113
|
fillRule: "evenodd",
|
|
105
114
|
d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
|
|
106
115
|
clipRule: "evenodd"
|
|
107
116
|
})
|
|
108
|
-
}),
|
|
117
|
+
}), v = ({ className: e }) => /* @__PURE__ */ p("svg", {
|
|
109
118
|
className: e,
|
|
110
119
|
fill: "none",
|
|
111
120
|
viewBox: "0 0 24 24",
|
|
112
|
-
|
|
121
|
+
"aria-hidden": "true",
|
|
122
|
+
children: [/* @__PURE__ */ f("circle", {
|
|
113
123
|
className: "opacity-25",
|
|
114
124
|
cx: "12",
|
|
115
125
|
cy: "12",
|
|
116
126
|
r: "10",
|
|
117
127
|
stroke: "currentColor",
|
|
118
128
|
strokeWidth: "4"
|
|
119
|
-
}), /* @__PURE__ */
|
|
129
|
+
}), /* @__PURE__ */ f("path", {
|
|
120
130
|
className: "opacity-75",
|
|
121
131
|
fill: "currentColor",
|
|
122
132
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
123
133
|
})]
|
|
124
|
-
}),
|
|
125
|
-
function
|
|
126
|
-
let { t:
|
|
127
|
-
let n =
|
|
134
|
+
}), y = "DELETE MY ACCOUNT";
|
|
135
|
+
function b() {
|
|
136
|
+
let { t: b } = d(), x = (e, t) => {
|
|
137
|
+
let n = b(e);
|
|
128
138
|
return n === e ? t : n;
|
|
129
|
-
},
|
|
139
|
+
}, S = u(), C = e((e) => e.user), { signOut: oe } = t({ disableCurrentUserQuery: !0 }), { deactivateAccount: se, deleteAccount: ce, isDeactivating: w, isDeleting: T } = n(), [E, D] = l(!1), [le, O] = l(!1), ue = [
|
|
130
140
|
{
|
|
131
|
-
name:
|
|
132
|
-
description:
|
|
141
|
+
name: x("auth.security.navProfile", "User Profile"),
|
|
142
|
+
description: x("auth.security.navProfileDesc", "View and edit your profile information"),
|
|
133
143
|
path: "/auth/profile",
|
|
134
|
-
icon:
|
|
144
|
+
icon: re,
|
|
135
145
|
color: "text-accent-teal",
|
|
136
146
|
bgColor: "bg-accent-teal-subtle"
|
|
137
147
|
},
|
|
138
148
|
{
|
|
139
|
-
name:
|
|
140
|
-
description:
|
|
149
|
+
name: x("auth.security.navMfa", "Two-Factor Authentication"),
|
|
150
|
+
description: x("auth.security.navMfaDesc", "Secure your account with TOTP"),
|
|
141
151
|
path: "/auth/mfa",
|
|
142
|
-
icon:
|
|
152
|
+
icon: te,
|
|
143
153
|
color: "text-accent-purple",
|
|
144
154
|
bgColor: "bg-accent-purple-subtle"
|
|
145
155
|
},
|
|
146
156
|
{
|
|
147
|
-
name:
|
|
148
|
-
description:
|
|
157
|
+
name: x("auth.security.navUsers", "Users"),
|
|
158
|
+
description: x("auth.security.navUsersDesc", "Manage system users"),
|
|
149
159
|
path: "/auth/users",
|
|
150
|
-
icon:
|
|
160
|
+
icon: ne,
|
|
151
161
|
color: "text-accent-indigo",
|
|
152
162
|
bgColor: "bg-accent-indigo-subtle",
|
|
153
163
|
adminOnly: !0
|
|
154
164
|
}
|
|
155
|
-
],
|
|
156
|
-
name:
|
|
157
|
-
description:
|
|
165
|
+
], de = [{
|
|
166
|
+
name: x("auth.security.navMagicLink", "Magic Link Login"),
|
|
167
|
+
description: x("auth.security.navMagicLinkDesc", "Passwordless authentication"),
|
|
158
168
|
path: "/auth/magic-link",
|
|
159
|
-
icon:
|
|
169
|
+
icon: h,
|
|
160
170
|
color: "text-accent-pink",
|
|
161
171
|
bgColor: "bg-accent-pink-subtle"
|
|
162
172
|
}, {
|
|
163
|
-
name:
|
|
164
|
-
description:
|
|
173
|
+
name: x("auth.security.navSso", "SSO Configuration"),
|
|
174
|
+
description: x("auth.security.navSsoDesc", "Enterprise single sign-on"),
|
|
165
175
|
path: "/auth/sso",
|
|
166
|
-
icon:
|
|
176
|
+
icon: ie,
|
|
167
177
|
color: "text-accent-cyan",
|
|
168
178
|
bgColor: "bg-accent-cyan-subtle",
|
|
169
179
|
adminOnly: !0
|
|
170
|
-
}], [
|
|
171
|
-
|
|
180
|
+
}], [k, A] = l(!1), [j, M] = l(!1), [N, P] = l(""), [F, I] = l(""), [L, R] = l(null), [z, B] = l(null), V = s(), H = s(), U = s(), W = s(), G = s(), K = s(), q = s(), J = c(null), Y = c(null), X = c(null), Z = c(null);
|
|
181
|
+
o(() => {
|
|
182
|
+
k ? X.current?.focus() : J.current?.focus();
|
|
183
|
+
}, [k]), o(() => {
|
|
184
|
+
j ? Z.current?.focus() : Y.current?.focus();
|
|
185
|
+
}, [j]);
|
|
186
|
+
let fe = async () => {
|
|
187
|
+
D(!0);
|
|
172
188
|
try {
|
|
173
|
-
await
|
|
189
|
+
await oe(), S("/auth/login"), O(!1);
|
|
174
190
|
} catch (e) {
|
|
175
|
-
console.error("Logout failed:", e),
|
|
191
|
+
console.error("Logout failed:", e), D(!1);
|
|
176
192
|
}
|
|
177
|
-
},
|
|
178
|
-
|
|
193
|
+
}, pe = async () => {
|
|
194
|
+
R(null);
|
|
179
195
|
try {
|
|
180
|
-
let e = await
|
|
181
|
-
e.success ?
|
|
196
|
+
let e = await se(N);
|
|
197
|
+
e.success ? S("/auth/login", { replace: !0 }) : R(e.message || x("auth.security.deactivateFailed", "Failed to deactivate account"));
|
|
182
198
|
} catch (e) {
|
|
183
|
-
|
|
199
|
+
R(e instanceof Error ? e.message : x("auth.security.deactivateFailed", "Failed to deactivate account"));
|
|
184
200
|
}
|
|
185
|
-
},
|
|
186
|
-
if (
|
|
187
|
-
|
|
201
|
+
}, me = async () => {
|
|
202
|
+
if (R(null), F !== y) {
|
|
203
|
+
R(x("auth.security.deleteConfirmMismatch", "Please type \"DELETE MY ACCOUNT\" to confirm"));
|
|
188
204
|
return;
|
|
189
205
|
}
|
|
190
|
-
|
|
206
|
+
i("medium");
|
|
191
207
|
try {
|
|
192
|
-
let e = await
|
|
193
|
-
e.success ? (
|
|
208
|
+
let e = await ce(N, F);
|
|
209
|
+
e.success ? (a("success"), S("/auth/login", { replace: !0 })) : (a("error"), R(e.message || x("auth.security.deleteFailed", "Failed to delete account")));
|
|
194
210
|
} catch (e) {
|
|
195
|
-
|
|
211
|
+
a("error"), R(e instanceof Error ? e.message : x("auth.security.deleteFailed", "Failed to delete account"));
|
|
196
212
|
}
|
|
197
213
|
}, Q = () => {
|
|
198
|
-
|
|
199
|
-
}, $ =
|
|
200
|
-
return /* @__PURE__ */
|
|
201
|
-
className: "bg-
|
|
202
|
-
children: [/* @__PURE__ */
|
|
203
|
-
open:
|
|
204
|
-
onOpenChange:
|
|
205
|
-
title:
|
|
206
|
-
description:
|
|
207
|
-
confirmText:
|
|
214
|
+
A(!1), M(!1), P(""), I(""), R(null), B(null);
|
|
215
|
+
}, $ = C?.role === "SUPER_ADMIN" || C?.role === "TENANT_ADMIN" || C?.role === "ORG_ADMIN", he = ue.filter((e) => !e.adminOnly || $), ge = de.filter((e) => !e.adminOnly || $);
|
|
216
|
+
return /* @__PURE__ */ p("div", {
|
|
217
|
+
className: "bg-bg-canvas p-6",
|
|
218
|
+
children: [/* @__PURE__ */ f(r, {
|
|
219
|
+
open: le,
|
|
220
|
+
onOpenChange: O,
|
|
221
|
+
title: x("auth.security.signOutDialogTitle", "Sign out now?"),
|
|
222
|
+
description: x("auth.security.signOutDialogDescription", "You will be signed out of this device and returned to the login screen."),
|
|
223
|
+
confirmText: x("auth.security.signOutDialogConfirm", "Sign out"),
|
|
208
224
|
variant: "warning",
|
|
209
|
-
isPending:
|
|
210
|
-
onConfirm:
|
|
211
|
-
}), /* @__PURE__ */
|
|
225
|
+
isPending: E,
|
|
226
|
+
onConfirm: fe
|
|
227
|
+
}), /* @__PURE__ */ p("main", {
|
|
212
228
|
className: "max-w-7xl mx-auto space-y-8",
|
|
213
229
|
children: [
|
|
214
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ p("div", {
|
|
215
231
|
className: "flex items-center gap-3",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
232
|
+
children: [/* @__PURE__ */ f("div", {
|
|
217
233
|
className: "auth-brand-badge flex h-10 w-10 items-center justify-center rounded-xl",
|
|
218
|
-
children: /* @__PURE__ */
|
|
219
|
-
}), /* @__PURE__ */
|
|
234
|
+
children: /* @__PURE__ */ f(m, { className: "w-6 h-6 text-white" })
|
|
235
|
+
}), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h1", {
|
|
220
236
|
className: "text-lg font-bold text-text-primary",
|
|
221
|
-
children:
|
|
222
|
-
}), /* @__PURE__ */
|
|
237
|
+
children: x("auth.security.title", "Security Center")
|
|
238
|
+
}), /* @__PURE__ */ f("p", {
|
|
223
239
|
className: "text-xs text-text-secondary ",
|
|
224
|
-
children:
|
|
240
|
+
children: x("auth.security.subtitle", "Account & Authentication")
|
|
225
241
|
})] })]
|
|
226
242
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ f("div", {
|
|
228
244
|
className: "auth-hero-card rounded-2xl p-6",
|
|
229
|
-
children: /* @__PURE__ */
|
|
245
|
+
children: /* @__PURE__ */ p("div", {
|
|
230
246
|
className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4",
|
|
231
|
-
children: [/* @__PURE__ */
|
|
247
|
+
children: [/* @__PURE__ */ p("div", {
|
|
232
248
|
className: "flex items-center gap-4",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ f("div", {
|
|
234
250
|
className: "w-14 h-14 rounded-2xl bg-bg-surface/20 backdrop-blur flex items-center justify-center",
|
|
235
|
-
children: /* @__PURE__ */
|
|
236
|
-
}), /* @__PURE__ */
|
|
251
|
+
children: /* @__PURE__ */ f(m, { className: "w-8 h-8 text-white" })
|
|
252
|
+
}), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h2", {
|
|
237
253
|
className: "text-xl font-bold",
|
|
238
|
-
children:
|
|
239
|
-
}), /* @__PURE__ */
|
|
254
|
+
children: x("auth.security.securityStatus", "Security Status")
|
|
255
|
+
}), /* @__PURE__ */ f("p", {
|
|
240
256
|
className: "opacity-80",
|
|
241
|
-
children:
|
|
257
|
+
children: C?.mfaEnabled ? x("auth.security.wellProtected", "Your account is well protected") : x("auth.security.enableMfaSuggestion", "Enable MFA for better security")
|
|
242
258
|
})] })]
|
|
243
|
-
}), /* @__PURE__ */
|
|
259
|
+
}), /* @__PURE__ */ f("div", {
|
|
244
260
|
className: "flex items-center gap-3",
|
|
245
|
-
children:
|
|
261
|
+
children: C?.mfaEnabled ? /* @__PURE__ */ p("span", {
|
|
246
262
|
className: "inline-flex items-center gap-2 px-4 py-2 rounded-xl bg-bg-surface/20 backdrop-blur text-white font-medium",
|
|
247
|
-
children: [/* @__PURE__ */
|
|
248
|
-
}) : /* @__PURE__ */
|
|
249
|
-
|
|
263
|
+
children: [/* @__PURE__ */ f(_, { className: "w-5 h-5 text-status-success-text" }), x("auth.security.mfaEnabled", "MFA Enabled")]
|
|
264
|
+
}) : /* @__PURE__ */ p("button", {
|
|
265
|
+
type: "button",
|
|
266
|
+
onClick: () => S("/auth/mfa"),
|
|
250
267
|
className: "inline-flex items-center gap-2 px-4 py-2 rounded-xl bg-bg-surface text-text-link font-semibold hover:bg-status-info-bg-subtle transition-colors shadow-lg",
|
|
251
|
-
children: [/* @__PURE__ */
|
|
268
|
+
children: [/* @__PURE__ */ f(ae, { className: "w-5 h-5 text-status-warning-text" }), x("auth.security.enableMfaNow", "Enable MFA Now")]
|
|
252
269
|
})
|
|
253
270
|
})]
|
|
254
271
|
})
|
|
255
272
|
}),
|
|
256
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ p("div", {
|
|
257
274
|
className: "mb-8 p-6 rounded-2xl bg-bg-surface border border-border-subtle shadow-sm",
|
|
258
|
-
children: [/* @__PURE__ */
|
|
275
|
+
children: [/* @__PURE__ */ f("h3", {
|
|
259
276
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
260
|
-
children:
|
|
261
|
-
}), /* @__PURE__ */
|
|
277
|
+
children: x("auth.security.accountInfo", "Account Information")
|
|
278
|
+
}), /* @__PURE__ */ p("dl", {
|
|
262
279
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",
|
|
263
280
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ p("div", {
|
|
265
282
|
className: "sm:col-span-2 lg:col-span-1",
|
|
266
|
-
children: [/* @__PURE__ */
|
|
283
|
+
children: [/* @__PURE__ */ f("dt", {
|
|
267
284
|
className: "text-sm font-medium text-text-secondary",
|
|
268
|
-
children:
|
|
269
|
-
}), /* @__PURE__ */
|
|
285
|
+
children: x("auth.security.email", "Email")
|
|
286
|
+
}), /* @__PURE__ */ p("dd", {
|
|
270
287
|
className: "mt-1 text-text-primary",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
288
|
+
children: [/* @__PURE__ */ f("span", {
|
|
272
289
|
className: "block truncate",
|
|
273
|
-
title:
|
|
274
|
-
children:
|
|
275
|
-
}),
|
|
290
|
+
title: C?.email,
|
|
291
|
+
children: C?.email
|
|
292
|
+
}), C?.emailVerified && /* @__PURE__ */ p("span", {
|
|
276
293
|
className: "mt-1 inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-status-success-bg-subtle text-status-success-text text-xs font-medium",
|
|
277
|
-
children: [/* @__PURE__ */
|
|
294
|
+
children: [/* @__PURE__ */ f(_, { className: "w-3 h-3" }), x("auth.security.verified", "Verified")]
|
|
278
295
|
})]
|
|
279
296
|
})]
|
|
280
297
|
}),
|
|
281
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
|
|
282
299
|
className: "text-sm font-medium text-text-secondary",
|
|
283
|
-
children:
|
|
284
|
-
}), /* @__PURE__ */
|
|
300
|
+
children: x("auth.security.username", "Username")
|
|
301
|
+
}), /* @__PURE__ */ f("dd", {
|
|
285
302
|
className: "mt-1 text-text-primary truncate",
|
|
286
|
-
title:
|
|
287
|
-
children:
|
|
303
|
+
title: C?.username ?? void 0,
|
|
304
|
+
children: C?.username || "-"
|
|
288
305
|
})] }),
|
|
289
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
|
|
290
307
|
className: "text-sm font-medium text-text-secondary",
|
|
291
|
-
children:
|
|
292
|
-
}), /* @__PURE__ */
|
|
308
|
+
children: x("auth.security.role", "Role")
|
|
309
|
+
}), /* @__PURE__ */ f("dd", {
|
|
293
310
|
className: "mt-1",
|
|
294
|
-
children: /* @__PURE__ */
|
|
311
|
+
children: /* @__PURE__ */ f("span", {
|
|
295
312
|
className: "inline-flex px-2.5 py-0.5 rounded-full bg-accent-indigo-subtle text-accent-indigo text-xs font-medium",
|
|
296
|
-
children:
|
|
313
|
+
children: C?.role || "USER"
|
|
297
314
|
})
|
|
298
315
|
})] }),
|
|
299
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
|
|
300
317
|
className: "text-sm font-medium text-text-secondary",
|
|
301
|
-
children:
|
|
302
|
-
}), /* @__PURE__ */
|
|
318
|
+
children: x("auth.security.memberSince", "Member Since")
|
|
319
|
+
}), /* @__PURE__ */ f("dd", {
|
|
303
320
|
className: "mt-1 text-text-primary",
|
|
304
|
-
children:
|
|
321
|
+
children: C?.createdAt ? ee(C.createdAt) : "-"
|
|
305
322
|
})] })
|
|
306
323
|
]
|
|
307
324
|
})]
|
|
308
325
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ p("div", {
|
|
310
327
|
className: "mb-8",
|
|
311
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ f("h3", {
|
|
312
329
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
313
|
-
children:
|
|
314
|
-
}), /* @__PURE__ */
|
|
330
|
+
children: x("auth.security.securityAuth", "Security & Authentication")
|
|
331
|
+
}), /* @__PURE__ */ f("div", {
|
|
315
332
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
316
|
-
children:
|
|
317
|
-
|
|
333
|
+
children: he.map((e) => /* @__PURE__ */ f("button", {
|
|
334
|
+
type: "button",
|
|
335
|
+
onClick: () => S(e.path),
|
|
336
|
+
"aria-label": e.name,
|
|
318
337
|
className: "group relative p-5 rounded-2xl bg-bg-surface border border-border-subtle hover:border-border-default hover:shadow-lg transition-all duration-200 text-left",
|
|
319
|
-
children: /* @__PURE__ */
|
|
338
|
+
children: /* @__PURE__ */ p("div", {
|
|
320
339
|
className: "flex items-start gap-4",
|
|
321
340
|
children: [
|
|
322
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ f("div", {
|
|
323
342
|
className: `w-12 h-12 rounded-xl ${e.bgColor} flex items-center justify-center flex-shrink-0 transition-transform group-hover:scale-110`,
|
|
324
|
-
children: /* @__PURE__ */
|
|
343
|
+
children: /* @__PURE__ */ f(e.icon, { className: `w-6 h-6 ${e.color}` })
|
|
325
344
|
}),
|
|
326
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ p("div", {
|
|
327
346
|
className: "flex-1 min-w-0",
|
|
328
|
-
children: [/* @__PURE__ */
|
|
347
|
+
children: [/* @__PURE__ */ f("h4", {
|
|
329
348
|
className: "text-base font-semibold text-text-primary group-hover:text-accent-indigo transition-colors",
|
|
330
349
|
children: e.name
|
|
331
|
-
}), /* @__PURE__ */
|
|
350
|
+
}), /* @__PURE__ */ f("p", {
|
|
332
351
|
className: "mt-1 text-sm text-text-secondary ",
|
|
333
352
|
children: e.description
|
|
334
353
|
})]
|
|
335
354
|
}),
|
|
336
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ f(g, { className: "w-5 h-5 text-text-tertiary group-hover:text-indigo-500 transition-colors flex-shrink-0" })
|
|
337
356
|
]
|
|
338
357
|
})
|
|
339
358
|
}, e.path))
|
|
340
359
|
})]
|
|
341
360
|
}),
|
|
342
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ p("div", {
|
|
343
362
|
className: "mb-8",
|
|
344
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ f("h3", {
|
|
345
364
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
346
|
-
children:
|
|
347
|
-
}), /* @__PURE__ */
|
|
365
|
+
children: x("auth.security.quickActions", "Quick Actions")
|
|
366
|
+
}), /* @__PURE__ */ f("div", {
|
|
348
367
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
349
|
-
children:
|
|
350
|
-
|
|
368
|
+
children: ge.map((e) => /* @__PURE__ */ f("button", {
|
|
369
|
+
type: "button",
|
|
370
|
+
onClick: () => S(e.path),
|
|
371
|
+
"aria-label": e.name,
|
|
351
372
|
className: "group relative p-5 rounded-2xl bg-bg-surface border border-border-subtle hover:border-border-default hover:shadow-lg transition-all duration-200 text-left",
|
|
352
|
-
children: /* @__PURE__ */
|
|
373
|
+
children: /* @__PURE__ */ p("div", {
|
|
353
374
|
className: "flex items-start gap-4",
|
|
354
375
|
children: [
|
|
355
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ f("div", {
|
|
356
377
|
className: `w-12 h-12 rounded-xl ${e.bgColor} flex items-center justify-center flex-shrink-0 transition-transform group-hover:scale-110`,
|
|
357
|
-
children: /* @__PURE__ */
|
|
378
|
+
children: /* @__PURE__ */ f(e.icon, { className: `w-6 h-6 ${e.color}` })
|
|
358
379
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ p("div", {
|
|
360
381
|
className: "flex-1 min-w-0",
|
|
361
|
-
children: [/* @__PURE__ */
|
|
382
|
+
children: [/* @__PURE__ */ f("h4", {
|
|
362
383
|
className: "text-base font-semibold text-text-primary group-hover:text-accent-indigo transition-colors",
|
|
363
384
|
children: e.name
|
|
364
|
-
}), /* @__PURE__ */
|
|
385
|
+
}), /* @__PURE__ */ f("p", {
|
|
365
386
|
className: "mt-1 text-sm text-text-secondary ",
|
|
366
387
|
children: e.description
|
|
367
388
|
})]
|
|
368
389
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ f(g, { className: "w-5 h-5 text-text-tertiary group-hover:text-indigo-500 transition-colors flex-shrink-0" })
|
|
370
391
|
]
|
|
371
392
|
})
|
|
372
393
|
}, e.path))
|
|
373
394
|
})]
|
|
374
395
|
}),
|
|
375
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ p("div", {
|
|
376
397
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
377
|
-
children: [/* @__PURE__ */
|
|
398
|
+
children: [/* @__PURE__ */ p("div", {
|
|
378
399
|
className: "p-6 rounded-2xl bg-bg-surface border border-border-subtle ",
|
|
379
|
-
children: [/* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ f("div", {
|
|
380
401
|
className: "flex items-start justify-between",
|
|
381
|
-
children: /* @__PURE__ */
|
|
382
|
-
/* @__PURE__ */
|
|
402
|
+
children: /* @__PURE__ */ p("div", { children: [
|
|
403
|
+
/* @__PURE__ */ f("h3", {
|
|
383
404
|
className: "text-lg font-semibold text-text-primary",
|
|
384
|
-
children:
|
|
405
|
+
children: x("auth.security.password", "Password")
|
|
385
406
|
}),
|
|
386
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ f("p", {
|
|
387
408
|
className: "mt-1 text-sm text-text-secondary ",
|
|
388
|
-
children:
|
|
409
|
+
children: x("auth.security.updatePassword", "Update your password to keep your account secure")
|
|
389
410
|
}),
|
|
390
|
-
/* @__PURE__ */
|
|
411
|
+
/* @__PURE__ */ f("p", {
|
|
391
412
|
className: "mt-2 text-xs text-text-tertiary ",
|
|
392
|
-
children:
|
|
413
|
+
children: x("auth.security.lastChanged", "Last changed: Never")
|
|
393
414
|
})
|
|
394
415
|
] })
|
|
395
|
-
}), /* @__PURE__ */
|
|
396
|
-
|
|
416
|
+
}), /* @__PURE__ */ f("button", {
|
|
417
|
+
type: "button",
|
|
418
|
+
onClick: () => S("/auth/reset-password"),
|
|
397
419
|
className: "auth-primary-button mt-4 w-full px-5 py-2.5 font-semibold sm:w-auto",
|
|
398
|
-
children:
|
|
420
|
+
children: x("auth.security.changePassword", "Change Password")
|
|
399
421
|
})]
|
|
400
|
-
}), /* @__PURE__ */
|
|
422
|
+
}), /* @__PURE__ */ p("div", {
|
|
401
423
|
className: "p-6 rounded-2xl bg-status-error-bg-subtle border border-status-error-border",
|
|
402
424
|
children: [
|
|
403
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ f("h3", {
|
|
404
426
|
className: "text-lg font-semibold text-status-error-text",
|
|
405
|
-
children:
|
|
427
|
+
children: x("auth.security.dangerZone", "Danger Zone")
|
|
406
428
|
}),
|
|
407
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ f("p", {
|
|
408
430
|
className: "mt-1 text-sm text-status-error-text/80",
|
|
409
|
-
children:
|
|
431
|
+
children: x("auth.security.dangerWarning", "These actions affect your account. Proceed with caution.")
|
|
410
432
|
}),
|
|
411
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ p("div", {
|
|
412
434
|
className: "mt-4 flex flex-wrap gap-3",
|
|
413
|
-
children: [/* @__PURE__ */
|
|
414
|
-
|
|
435
|
+
children: [/* @__PURE__ */ f("button", {
|
|
436
|
+
ref: J,
|
|
437
|
+
type: "button",
|
|
438
|
+
onClick: () => A(!0),
|
|
415
439
|
className: "px-5 py-2.5 rounded-xl border-2 border-status-warning-border text-status-warning-text font-semibold hover:bg-status-warning-bg-subtle transition-all duration-200",
|
|
416
|
-
children:
|
|
417
|
-
}), /* @__PURE__ */
|
|
418
|
-
|
|
440
|
+
children: x("auth.security.deactivateAccount", "Deactivate Account")
|
|
441
|
+
}), /* @__PURE__ */ f("button", {
|
|
442
|
+
ref: Y,
|
|
443
|
+
type: "button",
|
|
444
|
+
onClick: () => M(!0),
|
|
419
445
|
className: "px-5 py-2.5 rounded-xl border-2 border-status-error-border text-status-error-text font-semibold hover:bg-status-error-bg-subtle transition-all duration-200",
|
|
420
|
-
children:
|
|
446
|
+
children: x("auth.security.deleteAccount", "Delete Account")
|
|
421
447
|
})]
|
|
422
448
|
})
|
|
423
449
|
]
|
|
424
450
|
})]
|
|
425
451
|
}),
|
|
426
|
-
|
|
452
|
+
k && /* @__PURE__ */ f("div", {
|
|
427
453
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4",
|
|
428
|
-
|
|
429
|
-
|
|
454
|
+
role: "presentation",
|
|
455
|
+
onClick: (e) => {
|
|
456
|
+
e.target === e.currentTarget && Q();
|
|
457
|
+
},
|
|
458
|
+
children: /* @__PURE__ */ p("div", {
|
|
459
|
+
ref: X,
|
|
460
|
+
role: "dialog",
|
|
461
|
+
"aria-modal": "true",
|
|
462
|
+
"aria-labelledby": V,
|
|
463
|
+
tabIndex: -1,
|
|
464
|
+
className: "w-full max-w-md bg-bg-surface rounded-2xl shadow-2xl p-6 outline-none",
|
|
430
465
|
children: [
|
|
431
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ f("h3", {
|
|
467
|
+
id: V,
|
|
432
468
|
className: "text-xl font-bold text-text-primary mb-2",
|
|
433
|
-
children:
|
|
469
|
+
children: x("auth.security.deactivateTitle", "Deactivate Account")
|
|
434
470
|
}),
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
className: "text-sm text-text-secondary
|
|
437
|
-
children:
|
|
471
|
+
/* @__PURE__ */ f("p", {
|
|
472
|
+
className: "text-sm text-text-secondary mb-4",
|
|
473
|
+
children: x("auth.security.deactivateDesc", "Your account will be temporarily disabled. You can reactivate it by signing in again with your credentials.")
|
|
438
474
|
}),
|
|
439
|
-
|
|
475
|
+
L && /* @__PURE__ */ f("div", {
|
|
476
|
+
id: U,
|
|
477
|
+
role: "alert",
|
|
440
478
|
className: "mb-4 p-3 rounded-lg bg-status-error-bg-subtle text-status-error-text text-sm",
|
|
441
|
-
children:
|
|
479
|
+
children: L
|
|
442
480
|
}),
|
|
443
|
-
|
|
481
|
+
z && /* @__PURE__ */ f("div", {
|
|
482
|
+
role: "status",
|
|
444
483
|
className: "mb-4 p-3 rounded-lg bg-status-success-bg-subtle text-status-success-text text-sm",
|
|
445
|
-
children:
|
|
484
|
+
children: z
|
|
446
485
|
}),
|
|
447
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ p("div", {
|
|
448
487
|
className: "mb-4",
|
|
449
|
-
children: [/* @__PURE__ */
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
488
|
+
children: [/* @__PURE__ */ f("label", {
|
|
489
|
+
htmlFor: H,
|
|
490
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
491
|
+
children: x("auth.security.enterPasswordConfirm", "Enter your password to confirm")
|
|
492
|
+
}), /* @__PURE__ */ f("input", {
|
|
493
|
+
id: H,
|
|
453
494
|
type: "password",
|
|
454
|
-
value:
|
|
455
|
-
onChange: (e) =>
|
|
456
|
-
|
|
457
|
-
|
|
495
|
+
value: N,
|
|
496
|
+
onChange: (e) => P(e.target.value),
|
|
497
|
+
"aria-describedby": L ? U : void 0,
|
|
498
|
+
className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-warning-bg focus:border-transparent",
|
|
499
|
+
placeholder: x("auth.security.yourPassword", "Your password")
|
|
458
500
|
})]
|
|
459
501
|
}),
|
|
460
|
-
/* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ p("div", {
|
|
461
503
|
className: "flex gap-3",
|
|
462
|
-
children: [/* @__PURE__ */
|
|
504
|
+
children: [/* @__PURE__ */ f("button", {
|
|
505
|
+
type: "button",
|
|
463
506
|
onClick: Q,
|
|
464
|
-
className: "flex-1 px-4 py-2 rounded-lg border border-border-default
|
|
465
|
-
children:
|
|
466
|
-
}), /* @__PURE__ */
|
|
467
|
-
|
|
468
|
-
|
|
507
|
+
className: "flex-1 px-4 py-2 rounded-lg border border-border-default text-text-primary font-medium hover:bg-bg-sunken transition-colors",
|
|
508
|
+
children: x("auth.security.cancel", "Cancel")
|
|
509
|
+
}), /* @__PURE__ */ p("button", {
|
|
510
|
+
type: "button",
|
|
511
|
+
onClick: () => void pe(),
|
|
512
|
+
disabled: !N || w,
|
|
469
513
|
className: "flex-1 px-4 py-2 rounded-lg bg-status-warning-bg text-white font-medium hover:bg-status-warning-bg-hover disabled:opacity-50 disabled:cursor-not-allowed transition-colors flex items-center justify-center gap-2",
|
|
470
|
-
children: [
|
|
514
|
+
children: [w && /* @__PURE__ */ f(v, { className: "w-4 h-4 animate-spin" }), x("auth.security.deactivateBtn", "Deactivate")]
|
|
471
515
|
})]
|
|
472
516
|
})
|
|
473
517
|
]
|
|
474
518
|
})
|
|
475
519
|
}),
|
|
476
|
-
|
|
520
|
+
j && /* @__PURE__ */ f("div", {
|
|
477
521
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4",
|
|
478
|
-
|
|
479
|
-
|
|
522
|
+
role: "presentation",
|
|
523
|
+
onClick: (e) => {
|
|
524
|
+
e.target === e.currentTarget && Q();
|
|
525
|
+
},
|
|
526
|
+
children: /* @__PURE__ */ p("div", {
|
|
527
|
+
ref: Z,
|
|
528
|
+
role: "dialog",
|
|
529
|
+
"aria-modal": "true",
|
|
530
|
+
"aria-labelledby": W,
|
|
531
|
+
tabIndex: -1,
|
|
532
|
+
className: "w-full max-w-md bg-bg-surface rounded-2xl shadow-2xl p-6 outline-none",
|
|
480
533
|
children: [
|
|
481
|
-
/* @__PURE__ */
|
|
534
|
+
/* @__PURE__ */ f("h3", {
|
|
535
|
+
id: W,
|
|
482
536
|
className: "text-xl font-bold text-status-error-text mb-2",
|
|
483
|
-
children:
|
|
537
|
+
children: x("auth.security.deleteTitle", "Delete Account Permanently")
|
|
484
538
|
}),
|
|
485
|
-
/* @__PURE__ */
|
|
486
|
-
className: "text-sm text-text-secondary
|
|
487
|
-
children:
|
|
539
|
+
/* @__PURE__ */ f("p", {
|
|
540
|
+
className: "text-sm text-text-secondary mb-4",
|
|
541
|
+
children: x("auth.security.deleteDesc", "This action is irreversible. All your data will be permanently deleted and cannot be recovered.")
|
|
488
542
|
}),
|
|
489
|
-
|
|
543
|
+
L && /* @__PURE__ */ f("div", {
|
|
544
|
+
id: q,
|
|
545
|
+
role: "alert",
|
|
490
546
|
className: "mb-4 p-3 rounded-lg bg-status-error-bg-subtle text-status-error-text text-sm",
|
|
491
|
-
children:
|
|
547
|
+
children: L
|
|
492
548
|
}),
|
|
493
|
-
|
|
549
|
+
z && /* @__PURE__ */ f("div", {
|
|
550
|
+
role: "status",
|
|
494
551
|
className: "mb-4 p-3 rounded-lg bg-status-success-bg-subtle text-status-success-text text-sm",
|
|
495
|
-
children:
|
|
552
|
+
children: z
|
|
496
553
|
}),
|
|
497
|
-
/* @__PURE__ */
|
|
554
|
+
/* @__PURE__ */ p("div", {
|
|
498
555
|
className: "mb-4",
|
|
499
|
-
children: [/* @__PURE__ */
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
556
|
+
children: [/* @__PURE__ */ f("label", {
|
|
557
|
+
htmlFor: G,
|
|
558
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
559
|
+
children: x("auth.security.enterPasswordDelete", "Enter your password")
|
|
560
|
+
}), /* @__PURE__ */ f("input", {
|
|
561
|
+
id: G,
|
|
503
562
|
type: "password",
|
|
504
|
-
value:
|
|
505
|
-
onChange: (e) =>
|
|
506
|
-
|
|
507
|
-
|
|
563
|
+
value: N,
|
|
564
|
+
onChange: (e) => P(e.target.value),
|
|
565
|
+
"aria-describedby": L ? q : void 0,
|
|
566
|
+
className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-error-bg focus:border-transparent",
|
|
567
|
+
placeholder: x("auth.security.yourPassword", "Your password")
|
|
508
568
|
})]
|
|
509
569
|
}),
|
|
510
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ p("div", {
|
|
511
571
|
className: "mb-4",
|
|
512
|
-
children: [/* @__PURE__ */
|
|
513
|
-
|
|
572
|
+
children: [/* @__PURE__ */ p("label", {
|
|
573
|
+
htmlFor: K,
|
|
574
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
514
575
|
children: [
|
|
515
|
-
|
|
576
|
+
x("auth.security.type", "Type"),
|
|
516
577
|
" ",
|
|
517
|
-
/* @__PURE__ */
|
|
518
|
-
className: "px-1 py-0.5 rounded bg-bg-sunken
|
|
519
|
-
children:
|
|
578
|
+
/* @__PURE__ */ f("code", {
|
|
579
|
+
className: "px-1 py-0.5 rounded bg-bg-sunken text-status-error-text font-mono text-sm",
|
|
580
|
+
children: y
|
|
520
581
|
}),
|
|
521
582
|
" ",
|
|
522
|
-
|
|
583
|
+
x("auth.security.toConfirm", "to confirm")
|
|
523
584
|
]
|
|
524
|
-
}), /* @__PURE__ */
|
|
585
|
+
}), /* @__PURE__ */ f("input", {
|
|
586
|
+
id: K,
|
|
525
587
|
type: "text",
|
|
526
|
-
value:
|
|
527
|
-
onChange: (e) =>
|
|
528
|
-
|
|
529
|
-
|
|
588
|
+
value: F,
|
|
589
|
+
onChange: (e) => I(e.target.value),
|
|
590
|
+
"aria-describedby": L ? q : void 0,
|
|
591
|
+
className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-error-bg focus:border-transparent font-mono",
|
|
592
|
+
placeholder: x("auth.security.deleteConfirmPlaceholder", "DELETE MY ACCOUNT")
|
|
530
593
|
})]
|
|
531
594
|
}),
|
|
532
|
-
/* @__PURE__ */
|
|
595
|
+
/* @__PURE__ */ p("div", {
|
|
533
596
|
className: "flex gap-3",
|
|
534
|
-
children: [/* @__PURE__ */
|
|
597
|
+
children: [/* @__PURE__ */ f("button", {
|
|
598
|
+
type: "button",
|
|
535
599
|
onClick: Q,
|
|
536
|
-
className: "flex-1 px-4 py-2 rounded-lg border border-border-default
|
|
537
|
-
children:
|
|
538
|
-
}), /* @__PURE__ */
|
|
539
|
-
|
|
540
|
-
|
|
600
|
+
className: "flex-1 px-4 py-2 rounded-lg border border-border-default text-text-primary font-medium hover:bg-bg-sunken transition-colors",
|
|
601
|
+
children: x("auth.security.cancel", "Cancel")
|
|
602
|
+
}), /* @__PURE__ */ p("button", {
|
|
603
|
+
type: "button",
|
|
604
|
+
onClick: () => void me(),
|
|
605
|
+
disabled: !N || F !== y || T,
|
|
541
606
|
className: "flex-1 px-4 py-2 rounded-lg bg-status-error-bg text-white font-medium hover:bg-status-error-bg-hover disabled:opacity-50 disabled:cursor-not-allowed transition-colors flex items-center justify-center gap-2",
|
|
542
|
-
children: [
|
|
607
|
+
children: [T && /* @__PURE__ */ f(v, { className: "w-4 h-4 animate-spin" }), x("auth.security.deleteForever", "Delete Forever")]
|
|
543
608
|
})]
|
|
544
609
|
})
|
|
545
610
|
]
|
|
546
611
|
})
|
|
547
612
|
}),
|
|
548
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ f("footer", {
|
|
549
614
|
className: "mt-12 pt-6 border-t border-border-subtle ",
|
|
550
|
-
children: /* @__PURE__ */
|
|
615
|
+
children: /* @__PURE__ */ p("div", {
|
|
551
616
|
className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 text-sm text-text-secondary ",
|
|
552
|
-
children: [/* @__PURE__ */
|
|
553
|
-
|
|
617
|
+
children: [/* @__PURE__ */ p("p", { children: [
|
|
618
|
+
x("auth.security.signedInAs", "Signed in as"),
|
|
554
619
|
" ",
|
|
555
|
-
/* @__PURE__ */
|
|
620
|
+
/* @__PURE__ */ f("span", {
|
|
556
621
|
className: "font-medium text-text-primary ",
|
|
557
|
-
children:
|
|
622
|
+
children: C?.email
|
|
558
623
|
})
|
|
559
|
-
] }), /* @__PURE__ */
|
|
624
|
+
] }), /* @__PURE__ */ p("div", {
|
|
560
625
|
className: "flex items-center gap-4",
|
|
561
626
|
children: [
|
|
562
|
-
/* @__PURE__ */
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
627
|
+
/* @__PURE__ */ f("button", {
|
|
628
|
+
type: "button",
|
|
629
|
+
onClick: () => S("/auth/login"),
|
|
630
|
+
className: "hover:text-text-primary transition-colors",
|
|
631
|
+
children: x("auth.security.switchAccount", "Switch Account")
|
|
566
632
|
}),
|
|
567
|
-
/* @__PURE__ */
|
|
568
|
-
className: "text-text-muted
|
|
633
|
+
/* @__PURE__ */ f("span", {
|
|
634
|
+
className: "text-text-muted",
|
|
635
|
+
"aria-hidden": "true",
|
|
569
636
|
children: "|"
|
|
570
637
|
}),
|
|
571
|
-
/* @__PURE__ */
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
638
|
+
/* @__PURE__ */ f("button", {
|
|
639
|
+
type: "button",
|
|
640
|
+
onClick: () => O(!0),
|
|
641
|
+
className: "hover:text-status-error-text transition-colors",
|
|
642
|
+
children: x("auth.security.signOut", "Sign Out")
|
|
575
643
|
})
|
|
576
644
|
]
|
|
577
645
|
})]
|
|
@@ -582,6 +650,6 @@ function S() {
|
|
|
582
650
|
});
|
|
583
651
|
}
|
|
584
652
|
//#endregion
|
|
585
|
-
export {
|
|
653
|
+
export { b as SecurityPage };
|
|
586
654
|
|
|
587
655
|
//# sourceMappingURL=SecurityPage.js.map
|