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