@burdenoff/microfe-auth 2026.916.1 → 2026.917.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/pages/RegisterPage.js +210 -204
- package/dist/auth/pages/RegisterPage.js.map +1 -1
- package/dist/auth/pages/UserProfilePage.js +301 -278
- package/dist/auth/pages/UserProfilePage.js.map +1 -1
- package/dist/auth/pages/UsersPage.js +203 -181
- package/dist/auth/pages/UsersPage.js.map +1 -1
- package/dist/auth/utils/validation.d.ts +117 -0
- package/dist/auth/utils/validation.js +107 -1
- package/dist/auth/utils/validation.js.map +1 -1
- package/dist/microfe-auth.css +1 -1
- package/dist/translations/en.d.ts +41 -2
- package/dist/translations/en.js +41 -2
- package/dist/translations/en.js.map +1 -1
- package/package.json +3 -2
|
@@ -3,31 +3,32 @@ import { useTr as t } from "../../shared/hooks/useTr.js";
|
|
|
3
3
|
import { AuthLayout as n } from "../components/AuthLayout.js";
|
|
4
4
|
import { AlertIcon as r, CheckIcon as i, EmailIcon as a, SpinnerIcon as o, UserIcon as s } from "../components/AuthIcons.js";
|
|
5
5
|
import { useUserOperations as c } from "../hooks/useUserOperations.js";
|
|
6
|
-
import { useCompleteAvatarUploadMutation as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
6
|
+
import { useCompleteAvatarUploadMutation as ee, useInitiateAvatarUploadMutation as l } from "../../generated/wspace-operations.js";
|
|
7
|
+
import { validatePhoneNumber as u, validateUserFields as d } from "../utils/validation.js";
|
|
8
|
+
import { useEffect as f, useId as p, useRef as m, useState as h } from "react";
|
|
9
|
+
import { useNavigate as g } from "react-router";
|
|
10
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
11
|
+
import { Button as b } from "@burdenoff/fe-libs/button";
|
|
12
|
+
import { NextSteps as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
import { useGatewayClient as te } from "@burdenoff/fe-libs/shared/graphql";
|
|
14
|
+
import { useAuth as ne } from "@burdenoff/fe-libs/shared/providers/shell/AuthProvider";
|
|
14
15
|
//#region src/auth/pages/UserProfilePage.tsx
|
|
15
|
-
function
|
|
16
|
-
let
|
|
16
|
+
function C() {
|
|
17
|
+
let C = t(), w = g(), T = ne(), E = e((e) => e.isAuthenticated), D = e((e) => e.user), O = e((e) => e.setUser), { updateCurrentUserProfile: k, isLoading: A } = c(), j = p(), M = p(), N = p(), P = p(), F = p(), I = e((e) => e.currentWorkspaceId), L = te("workspace"), [R] = l({ client: L }), [z] = ee({ client: L }), B = m(null), [V, H] = h(!1), U = async (e) => {
|
|
17
18
|
let t = e.target.files?.[0];
|
|
18
19
|
if (!t) return;
|
|
19
20
|
if (!t.type.startsWith("image/")) {
|
|
20
|
-
|
|
21
|
+
Y(C("auth.profile.invalidImageType", "Please select an image file"));
|
|
21
22
|
return;
|
|
22
23
|
}
|
|
23
|
-
if (!
|
|
24
|
-
|
|
24
|
+
if (!I) {
|
|
25
|
+
Y(C("auth.profile.noWorkspace", "Please select a workspace before uploading a profile picture"));
|
|
25
26
|
return;
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
-
let n = { "x-workspace-id":
|
|
28
|
+
H(!0), Y(null);
|
|
29
|
+
let n = { "x-workspace-id": I };
|
|
29
30
|
try {
|
|
30
|
-
let e = t.name.split(".").pop()?.toLowerCase() ?? "", r = await
|
|
31
|
+
let e = t.name.split(".").pop()?.toLowerCase() ?? "", r = await R({
|
|
31
32
|
variables: { input: {
|
|
32
33
|
fileName: t.name,
|
|
33
34
|
fileSize: t.size.toString(),
|
|
@@ -42,152 +43,152 @@ function w() {
|
|
|
42
43
|
headers: { "Content-Type": t.type },
|
|
43
44
|
body: t
|
|
44
45
|
})).ok) throw Error("Failed to upload file");
|
|
45
|
-
let o = (await
|
|
46
|
+
let o = (await z({
|
|
46
47
|
variables: { input: { sessionId: i.id } },
|
|
47
48
|
context: { headers: n }
|
|
48
49
|
})).data?.completeUpload.file?.downloadUrl;
|
|
49
50
|
if (!o) throw Error("Upload succeeded but no URL returned");
|
|
50
|
-
await
|
|
51
|
-
...
|
|
51
|
+
await k({ avatar: o }), D && O({
|
|
52
|
+
...D,
|
|
52
53
|
avatar: o
|
|
53
|
-
}),
|
|
54
|
+
}), T.updateUser({ avatar: o }), $(C("auth.profile.avatarUpdated", "Profile picture updated!"));
|
|
54
55
|
} catch (e) {
|
|
55
|
-
|
|
56
|
+
Y(e instanceof Error ? e.message : C("auth.profile.avatarFailed", "Failed to upload picture"));
|
|
56
57
|
} finally {
|
|
57
|
-
|
|
58
|
+
H(!1), B.current && (B.current.value = "");
|
|
58
59
|
}
|
|
59
|
-
}, [
|
|
60
|
+
}, [W, G] = h(!1), [K, q] = h({
|
|
60
61
|
username: "",
|
|
61
62
|
firstName: "",
|
|
62
63
|
lastName: "",
|
|
63
64
|
name: "",
|
|
64
65
|
phoneNumber: ""
|
|
65
|
-
}), [Y, X] =
|
|
66
|
-
return
|
|
67
|
-
|
|
68
|
-
username:
|
|
69
|
-
firstName:
|
|
70
|
-
lastName:
|
|
71
|
-
name:
|
|
72
|
-
phoneNumber:
|
|
66
|
+
}), [J, Y] = h(null), [X, Z] = h(null), [Q, $] = h(null);
|
|
67
|
+
return f(() => {
|
|
68
|
+
D && q({
|
|
69
|
+
username: D.username || "",
|
|
70
|
+
firstName: D.firstName || "",
|
|
71
|
+
lastName: D.lastName || "",
|
|
72
|
+
name: D.name || "",
|
|
73
|
+
phoneNumber: D.phoneNumber || ""
|
|
73
74
|
});
|
|
74
|
-
}, [
|
|
75
|
-
title:
|
|
76
|
-
subtitle:
|
|
77
|
-
children: /* @__PURE__ */
|
|
75
|
+
}, [D]), !E || !D ? /* @__PURE__ */ v(n, {
|
|
76
|
+
title: C("auth.profile.title", "Profile"),
|
|
77
|
+
subtitle: C("auth.profile.subtitle", "View and manage your profile"),
|
|
78
|
+
children: /* @__PURE__ */ y("div", {
|
|
78
79
|
className: "text-center py-12",
|
|
79
80
|
children: [
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ v("div", {
|
|
81
82
|
className: "size-16 mx-auto mb-4 rounded-full bg-[var(--color-status-warning-bg-subtle)] flex items-center justify-center",
|
|
82
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */ v(r, { className: "size-8 text-[var(--color-status-warning-text)]" })
|
|
83
84
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ v("h2", {
|
|
85
86
|
className: "text-xl font-semibold text-[var(--color-text-primary)] mb-2",
|
|
86
|
-
children:
|
|
87
|
+
children: C("auth.profile.authRequired", "Authentication Required")
|
|
87
88
|
}),
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ v("p", {
|
|
89
90
|
className: "text-[var(--color-text-secondary)] mb-6",
|
|
90
|
-
children:
|
|
91
|
+
children: C("auth.profile.signInToView", "Please sign in to view your profile")
|
|
91
92
|
}),
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ v(b, {
|
|
93
94
|
type: "button",
|
|
94
|
-
onClick: () =>
|
|
95
|
+
onClick: () => w("/auth/login"),
|
|
95
96
|
variant: "default",
|
|
96
97
|
size: "lg",
|
|
97
98
|
className: "font-semibold",
|
|
98
|
-
children:
|
|
99
|
+
children: C("auth.profile.signIn", "Sign In")
|
|
99
100
|
})
|
|
100
101
|
]
|
|
101
102
|
})
|
|
102
|
-
}) : /* @__PURE__ */
|
|
103
|
+
}) : /* @__PURE__ */ y("div", {
|
|
103
104
|
className: "max-w-4xl mx-auto p-6",
|
|
104
105
|
children: [
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ y("div", {
|
|
106
107
|
className: "mb-8",
|
|
107
108
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ v("h1", {
|
|
109
110
|
className: "text-3xl font-semibold text-[var(--color-text-primary)]",
|
|
110
|
-
children:
|
|
111
|
+
children: C("auth.profile.myProfile", "My Profile")
|
|
111
112
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ v("p", {
|
|
113
114
|
className: "text-[var(--color-text-secondary)] mt-2",
|
|
114
|
-
children:
|
|
115
|
+
children: C("auth.profile.viewAndManage", "View and manage your account information")
|
|
115
116
|
}),
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ v(S, {
|
|
117
118
|
className: "mt-3",
|
|
118
|
-
children:
|
|
119
|
+
children: C("auth.profile.purpose", "This is how you appear across the platform. Update your name, photo, and contact details here — teammates see this information, and we use your email for sign-in and important notices.")
|
|
119
120
|
})
|
|
120
121
|
]
|
|
121
122
|
}),
|
|
122
|
-
|
|
123
|
+
Q && /* @__PURE__ */ y("div", {
|
|
123
124
|
className: "mb-6 flex items-center gap-3 p-4 rounded-xl bg-[var(--color-status-success-bg-subtle)] border border-[var(--color-status-success-border)]",
|
|
124
125
|
children: [
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ v(i, { className: "size-5 text-[var(--color-status-success-text)] flex-shrink-0" }),
|
|
127
|
+
/* @__PURE__ */ v("p", {
|
|
127
128
|
className: "text-[var(--color-status-success-text)]",
|
|
128
|
-
children:
|
|
129
|
+
children: Q
|
|
129
130
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ v("button", {
|
|
131
132
|
type: "button",
|
|
132
|
-
onClick: () =>
|
|
133
|
+
onClick: () => $(null),
|
|
133
134
|
className: "ml-auto text-sm text-[var(--color-status-success-text)] hover:underline transition-colors duration-200",
|
|
134
|
-
children:
|
|
135
|
+
children: C("auth.profile.dismiss", "Dismiss")
|
|
135
136
|
})
|
|
136
137
|
]
|
|
137
138
|
}),
|
|
138
|
-
|
|
139
|
+
J && /* @__PURE__ */ y("div", {
|
|
139
140
|
className: "mb-6 flex items-start gap-3 p-4 rounded-xl bg-[var(--color-status-error-bg-subtle)] border border-[var(--color-status-error-border)]",
|
|
140
141
|
children: [
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ v(r, { className: "size-5 text-[var(--color-status-error-text)] flex-shrink-0 mt-0.5" }),
|
|
143
|
+
/* @__PURE__ */ v("div", {
|
|
143
144
|
className: "flex-1",
|
|
144
|
-
children: /* @__PURE__ */
|
|
145
|
+
children: /* @__PURE__ */ v("p", {
|
|
145
146
|
className: "text-sm text-[var(--color-status-error-text)]",
|
|
146
|
-
children:
|
|
147
|
+
children: J
|
|
147
148
|
})
|
|
148
149
|
}),
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ v("button", {
|
|
150
151
|
type: "button",
|
|
151
|
-
onClick: () =>
|
|
152
|
+
onClick: () => Y(null),
|
|
152
153
|
className: "text-sm text-[var(--color-status-error-text)] hover:underline transition-colors duration-200",
|
|
153
|
-
children:
|
|
154
|
+
children: C("auth.profile.dismiss", "Dismiss")
|
|
154
155
|
})
|
|
155
156
|
]
|
|
156
157
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ y("div", {
|
|
158
159
|
className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] shadow-sm overflow-hidden",
|
|
159
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ v("div", {
|
|
160
161
|
className: "bg-accent-wash border-b border-border-seam p-6 text-text-primary",
|
|
161
|
-
children: /* @__PURE__ */
|
|
162
|
+
children: /* @__PURE__ */ y("div", {
|
|
162
163
|
className: "flex items-center gap-4",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
164
|
+
children: [/* @__PURE__ */ y("div", {
|
|
164
165
|
className: "relative group",
|
|
165
166
|
children: [
|
|
166
|
-
|
|
167
|
-
src:
|
|
168
|
-
alt:
|
|
167
|
+
D.avatar ? /* @__PURE__ */ v("img", {
|
|
168
|
+
src: D.avatar,
|
|
169
|
+
alt: C("auth.profile.avatarAlt", "Profile picture"),
|
|
169
170
|
className: "size-20 rounded-full object-cover shadow-lg"
|
|
170
|
-
}) : /* @__PURE__ */
|
|
171
|
+
}) : /* @__PURE__ */ v("div", {
|
|
171
172
|
className: "size-20 rounded-full bg-accent-soft backdrop-blur-sm flex items-center justify-center text-[var(--color-action-primary-bg)] text-3xl font-semibold shadow-lg",
|
|
172
|
-
children: (
|
|
173
|
+
children: (D.name || D.username || D.email).charAt(0).toUpperCase()
|
|
173
174
|
}),
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ v("button", {
|
|
175
176
|
type: "button",
|
|
176
|
-
onClick: () =>
|
|
177
|
-
disabled:
|
|
178
|
-
"aria-label":
|
|
177
|
+
onClick: () => B.current?.click(),
|
|
178
|
+
disabled: V,
|
|
179
|
+
"aria-label": C("auth.profile.changeAvatar", "Change profile picture"),
|
|
179
180
|
className: "absolute inset-0 rounded-full flex items-center justify-center bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity duration-200 cursor-pointer",
|
|
180
|
-
children:
|
|
181
|
+
children: V ? /* @__PURE__ */ v(o, { className: "size-6 text-white animate-spin" }) : /* @__PURE__ */ y("svg", {
|
|
181
182
|
className: "size-6 text-white",
|
|
182
183
|
fill: "none",
|
|
183
184
|
viewBox: "0 0 24 24",
|
|
184
185
|
stroke: "currentColor",
|
|
185
|
-
children: [/* @__PURE__ */
|
|
186
|
+
children: [/* @__PURE__ */ v("path", {
|
|
186
187
|
strokeLinecap: "round",
|
|
187
188
|
strokeLinejoin: "round",
|
|
188
189
|
strokeWidth: 2,
|
|
189
190
|
d: "M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"
|
|
190
|
-
}), /* @__PURE__ */
|
|
191
|
+
}), /* @__PURE__ */ v("path", {
|
|
191
192
|
strokeLinecap: "round",
|
|
192
193
|
strokeLinejoin: "round",
|
|
193
194
|
strokeWidth: 2,
|
|
@@ -195,350 +196,372 @@ function w() {
|
|
|
195
196
|
})]
|
|
196
197
|
})
|
|
197
198
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
ref:
|
|
199
|
+
/* @__PURE__ */ v("input", {
|
|
200
|
+
ref: B,
|
|
200
201
|
type: "file",
|
|
201
202
|
accept: "image/*",
|
|
202
203
|
className: "hidden",
|
|
203
|
-
onChange: (e) => void
|
|
204
|
+
onChange: (e) => void U(e),
|
|
204
205
|
tabIndex: -1,
|
|
205
|
-
"aria-label":
|
|
206
|
+
"aria-label": C("auth.profile.avatarUpload", "Upload avatar image")
|
|
206
207
|
})
|
|
207
208
|
]
|
|
208
|
-
}), /* @__PURE__ */
|
|
209
|
+
}), /* @__PURE__ */ y("div", {
|
|
209
210
|
className: "text-text-primary",
|
|
210
211
|
children: [
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ v("h2", {
|
|
212
213
|
className: "text-2xl font-semibold",
|
|
213
|
-
children:
|
|
214
|
+
children: D.name || `${D.firstName || ""} ${D.lastName || ""}`.trim() || D.username
|
|
214
215
|
}),
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ y("p", {
|
|
216
217
|
className: "text-text-secondary flex items-center gap-2",
|
|
217
|
-
children: [/* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ v(a, { className: "size-4" }), D.email]
|
|
218
219
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ y("div", {
|
|
220
221
|
className: "flex items-center gap-2 mt-2",
|
|
221
|
-
children: [/* @__PURE__ */
|
|
222
|
+
children: [/* @__PURE__ */ v("span", {
|
|
222
223
|
className: "px-2.5 py-1 rounded-full text-xs font-medium bg-bg-surface/60 text-text-secondary backdrop-blur-sm",
|
|
223
|
-
children:
|
|
224
|
-
}),
|
|
224
|
+
children: D.role?.replace("_", " ") || C("auth.profile.member", "Member")
|
|
225
|
+
}), D.emailVerified && /* @__PURE__ */ y("span", {
|
|
225
226
|
className: "px-2.5 py-1 rounded-full text-xs font-medium bg-status-success-bg-subtle text-status-success-text flex items-center gap-1",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
227
|
+
children: [/* @__PURE__ */ v(i, { className: "size-3" }), C("auth.profile.verified", "Verified")]
|
|
227
228
|
})]
|
|
228
229
|
})
|
|
229
230
|
]
|
|
230
231
|
})]
|
|
231
232
|
})
|
|
232
|
-
}), /* @__PURE__ */
|
|
233
|
+
}), /* @__PURE__ */ v("div", {
|
|
233
234
|
className: "p-6",
|
|
234
|
-
children:
|
|
235
|
+
children: W ? /* @__PURE__ */ y("form", {
|
|
235
236
|
onSubmit: async (e) => {
|
|
236
|
-
e.preventDefault(),
|
|
237
|
+
if (e.preventDefault(), Y(null), Z(null), $(null), !u(K.phoneNumber).valid) {
|
|
238
|
+
let e = C("auth.profile.phoneNumber_invalid", "Invalid phone number");
|
|
239
|
+
Z(e), Y(e);
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
let t = d(K, { requireAll: !1 });
|
|
243
|
+
if (!t.valid) {
|
|
244
|
+
Y(t.errors.map((e) => C(`auth.profile.${e.field}_${e.code}`, e.message)).join(" · "));
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
237
247
|
try {
|
|
238
|
-
await
|
|
239
|
-
username:
|
|
240
|
-
firstName:
|
|
241
|
-
lastName:
|
|
242
|
-
name:
|
|
243
|
-
phoneNumber:
|
|
244
|
-
}),
|
|
248
|
+
await k({
|
|
249
|
+
username: t.values.username || void 0,
|
|
250
|
+
firstName: t.values.firstName || void 0,
|
|
251
|
+
lastName: t.values.lastName || void 0,
|
|
252
|
+
name: K.name || void 0,
|
|
253
|
+
phoneNumber: K.phoneNumber || void 0
|
|
254
|
+
}), $(C("auth.profile.updateSuccess", "Profile updated successfully!")), G(!1);
|
|
245
255
|
} catch (e) {
|
|
246
|
-
|
|
256
|
+
Y(e instanceof Error ? e.message : C("auth.profile.updateFailed", "Failed to update profile"));
|
|
247
257
|
}
|
|
248
258
|
},
|
|
249
259
|
className: "space-y-6",
|
|
250
|
-
children: [/* @__PURE__ */
|
|
260
|
+
children: [/* @__PURE__ */ y("div", {
|
|
251
261
|
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
252
262
|
children: [
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
htmlFor:
|
|
263
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
264
|
+
htmlFor: j,
|
|
255
265
|
className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
|
|
256
|
-
children:
|
|
257
|
-
}), /* @__PURE__ */
|
|
266
|
+
children: C("auth.profile.username", "Username")
|
|
267
|
+
}), /* @__PURE__ */ y("div", {
|
|
258
268
|
className: "relative",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
269
|
+
children: [/* @__PURE__ */ v("div", {
|
|
260
270
|
className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
|
|
261
|
-
children: /* @__PURE__ */
|
|
271
|
+
children: /* @__PURE__ */ v(s, {
|
|
262
272
|
className: "size-5 text-[var(--color-text-tertiary)]",
|
|
263
273
|
"aria-hidden": "true"
|
|
264
274
|
})
|
|
265
|
-
}), /* @__PURE__ */
|
|
266
|
-
id:
|
|
275
|
+
}), /* @__PURE__ */ v("input", {
|
|
276
|
+
id: j,
|
|
267
277
|
type: "text",
|
|
268
|
-
"aria-label":
|
|
269
|
-
value:
|
|
270
|
-
onChange: (e) =>
|
|
271
|
-
...
|
|
278
|
+
"aria-label": C("auth.profile.username", "Username"),
|
|
279
|
+
value: K.username,
|
|
280
|
+
onChange: (e) => q({
|
|
281
|
+
...K,
|
|
272
282
|
username: e.target.value
|
|
273
283
|
}),
|
|
274
284
|
className: "block w-full pl-[3.5rem] pr-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
|
|
275
|
-
placeholder:
|
|
285
|
+
placeholder: C("auth.profile.usernamePlaceholder", "Enter username")
|
|
276
286
|
})]
|
|
277
287
|
})] }),
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
-
htmlFor:
|
|
288
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
289
|
+
htmlFor: M,
|
|
280
290
|
className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
|
|
281
|
-
children:
|
|
282
|
-
}), /* @__PURE__ */
|
|
283
|
-
id:
|
|
291
|
+
children: C("auth.profile.displayName", "Display Name")
|
|
292
|
+
}), /* @__PURE__ */ v("input", {
|
|
293
|
+
id: M,
|
|
284
294
|
type: "text",
|
|
285
|
-
"aria-label":
|
|
286
|
-
value:
|
|
287
|
-
onChange: (e) =>
|
|
288
|
-
...
|
|
295
|
+
"aria-label": C("auth.profile.displayName", "Display Name"),
|
|
296
|
+
value: K.name,
|
|
297
|
+
onChange: (e) => q({
|
|
298
|
+
...K,
|
|
289
299
|
name: e.target.value
|
|
290
300
|
}),
|
|
291
301
|
className: "block w-full px-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
|
|
292
|
-
placeholder:
|
|
302
|
+
placeholder: C("auth.profile.displayNamePlaceholder", "Enter display name")
|
|
293
303
|
})] }),
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
-
htmlFor:
|
|
304
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
305
|
+
htmlFor: N,
|
|
296
306
|
className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
|
|
297
|
-
children:
|
|
298
|
-
}), /* @__PURE__ */
|
|
299
|
-
id:
|
|
307
|
+
children: C("auth.profile.firstName", "First Name")
|
|
308
|
+
}), /* @__PURE__ */ v("input", {
|
|
309
|
+
id: N,
|
|
300
310
|
type: "text",
|
|
301
|
-
"aria-label":
|
|
302
|
-
value:
|
|
303
|
-
onChange: (e) =>
|
|
304
|
-
...
|
|
311
|
+
"aria-label": C("auth.profile.firstName", "First Name"),
|
|
312
|
+
value: K.firstName,
|
|
313
|
+
onChange: (e) => q({
|
|
314
|
+
...K,
|
|
305
315
|
firstName: e.target.value
|
|
306
316
|
}),
|
|
307
317
|
className: "block w-full px-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
|
|
308
|
-
placeholder:
|
|
318
|
+
placeholder: C("auth.profile.firstNamePlaceholder", "Enter first name")
|
|
309
319
|
})] }),
|
|
310
|
-
/* @__PURE__ */
|
|
311
|
-
htmlFor:
|
|
320
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
321
|
+
htmlFor: P,
|
|
312
322
|
className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
|
|
313
|
-
children:
|
|
314
|
-
}), /* @__PURE__ */
|
|
315
|
-
id:
|
|
323
|
+
children: C("auth.profile.lastName", "Last Name")
|
|
324
|
+
}), /* @__PURE__ */ v("input", {
|
|
325
|
+
id: P,
|
|
316
326
|
type: "text",
|
|
317
|
-
"aria-label":
|
|
318
|
-
value:
|
|
319
|
-
onChange: (e) =>
|
|
320
|
-
...
|
|
327
|
+
"aria-label": C("auth.profile.lastName", "Last Name"),
|
|
328
|
+
value: K.lastName,
|
|
329
|
+
onChange: (e) => q({
|
|
330
|
+
...K,
|
|
321
331
|
lastName: e.target.value
|
|
322
332
|
}),
|
|
323
333
|
className: "block w-full px-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
|
|
324
|
-
placeholder:
|
|
334
|
+
placeholder: C("auth.profile.lastNamePlaceholder", "Enter last name")
|
|
325
335
|
})] }),
|
|
326
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ y("div", {
|
|
327
337
|
className: "md:col-span-2",
|
|
328
|
-
children: [
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
id: I,
|
|
334
|
-
type: "tel",
|
|
335
|
-
"aria-label": w("auth.profile.phoneNumber", "Phone Number"),
|
|
336
|
-
value: q.phoneNumber,
|
|
337
|
-
onChange: (e) => J({
|
|
338
|
-
...q,
|
|
339
|
-
phoneNumber: e.target.value
|
|
338
|
+
children: [
|
|
339
|
+
/* @__PURE__ */ v("label", {
|
|
340
|
+
htmlFor: F,
|
|
341
|
+
className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
|
|
342
|
+
children: C("auth.profile.phoneNumber", "Phone Number")
|
|
340
343
|
}),
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
+
/* @__PURE__ */ v("input", {
|
|
345
|
+
id: F,
|
|
346
|
+
type: "tel",
|
|
347
|
+
"aria-label": C("auth.profile.phoneNumber", "Phone Number"),
|
|
348
|
+
"aria-invalid": X ? !0 : void 0,
|
|
349
|
+
"aria-describedby": X ? `${F}-error` : void 0,
|
|
350
|
+
value: K.phoneNumber,
|
|
351
|
+
onChange: (e) => {
|
|
352
|
+
q({
|
|
353
|
+
...K,
|
|
354
|
+
phoneNumber: e.target.value
|
|
355
|
+
}), X && (Z(null), Y(null));
|
|
356
|
+
},
|
|
357
|
+
className: "block w-full px-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
|
|
358
|
+
placeholder: C("auth.profile.phonePlaceholder", "Enter phone number")
|
|
359
|
+
}),
|
|
360
|
+
X && /* @__PURE__ */ v("p", {
|
|
361
|
+
id: `${F}-error`,
|
|
362
|
+
role: "alert",
|
|
363
|
+
className: "mt-2 text-sm text-[var(--color-status-error-text)]",
|
|
364
|
+
children: X
|
|
365
|
+
})
|
|
366
|
+
]
|
|
344
367
|
})
|
|
345
368
|
]
|
|
346
|
-
}), /* @__PURE__ */
|
|
347
|
-
className: "flex gap-3 pt-
|
|
348
|
-
children: [/* @__PURE__ */
|
|
369
|
+
}), /* @__PURE__ */ y("div", {
|
|
370
|
+
className: "flex gap-3 pt-6 mt-6 border-t border-[var(--color-border-default)]",
|
|
371
|
+
children: [/* @__PURE__ */ v(b, {
|
|
349
372
|
type: "submit",
|
|
350
|
-
disabled:
|
|
373
|
+
disabled: A,
|
|
351
374
|
variant: "default",
|
|
352
375
|
size: "lg",
|
|
353
376
|
className: "font-semibold",
|
|
354
|
-
children:
|
|
355
|
-
}), /* @__PURE__ */
|
|
377
|
+
children: A ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(o, { className: "size-4 animate-spin" }), C("auth.profile.saving", "Saving...")] }) : C("auth.profile.saveChanges", "Save Changes")
|
|
378
|
+
}), /* @__PURE__ */ v("button", {
|
|
356
379
|
type: "button",
|
|
357
380
|
onClick: () => {
|
|
358
|
-
|
|
359
|
-
username:
|
|
360
|
-
firstName:
|
|
361
|
-
lastName:
|
|
362
|
-
name:
|
|
363
|
-
phoneNumber:
|
|
364
|
-
}),
|
|
381
|
+
D && q({
|
|
382
|
+
username: D.username || "",
|
|
383
|
+
firstName: D.firstName || "",
|
|
384
|
+
lastName: D.lastName || "",
|
|
385
|
+
name: D.name || "",
|
|
386
|
+
phoneNumber: D.phoneNumber || ""
|
|
387
|
+
}), G(!1), Y(null), Z(null);
|
|
365
388
|
},
|
|
366
|
-
className: "
|
|
367
|
-
children:
|
|
389
|
+
className: "inline-flex items-center h-10 px-8 rounded-xl border border-[var(--color-border-default)] text-[var(--color-text-secondary)] font-medium hover:bg-[var(--color-bg-muted)] transition-colors duration-200",
|
|
390
|
+
children: C("auth.profile.cancel", "Cancel")
|
|
368
391
|
})]
|
|
369
392
|
})]
|
|
370
|
-
}) : /* @__PURE__ */
|
|
393
|
+
}) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", {
|
|
371
394
|
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
372
395
|
children: [
|
|
373
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ y("div", {
|
|
374
397
|
className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
|
|
375
|
-
children: [/* @__PURE__ */
|
|
398
|
+
children: [/* @__PURE__ */ v("label", {
|
|
376
399
|
className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
|
|
377
|
-
children:
|
|
378
|
-
}), /* @__PURE__ */
|
|
400
|
+
children: C("auth.profile.username", "Username")
|
|
401
|
+
}), /* @__PURE__ */ v("p", {
|
|
379
402
|
className: "text-[var(--color-text-primary)] font-medium",
|
|
380
|
-
children:
|
|
403
|
+
children: D.username || "-"
|
|
381
404
|
})]
|
|
382
405
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ y("div", {
|
|
384
407
|
className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
|
|
385
|
-
children: [/* @__PURE__ */
|
|
408
|
+
children: [/* @__PURE__ */ v("label", {
|
|
386
409
|
className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
|
|
387
|
-
children:
|
|
388
|
-
}), /* @__PURE__ */
|
|
410
|
+
children: C("auth.profile.displayName", "Display Name")
|
|
411
|
+
}), /* @__PURE__ */ v("p", {
|
|
389
412
|
className: "text-[var(--color-text-primary)] font-medium",
|
|
390
|
-
children:
|
|
413
|
+
children: D.name || "-"
|
|
391
414
|
})]
|
|
392
415
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ y("div", {
|
|
394
417
|
className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
|
|
395
|
-
children: [/* @__PURE__ */
|
|
418
|
+
children: [/* @__PURE__ */ v("label", {
|
|
396
419
|
className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
|
|
397
|
-
children:
|
|
398
|
-
}), /* @__PURE__ */
|
|
420
|
+
children: C("auth.profile.firstName", "First Name")
|
|
421
|
+
}), /* @__PURE__ */ v("p", {
|
|
399
422
|
className: "text-[var(--color-text-primary)] font-medium",
|
|
400
|
-
children:
|
|
423
|
+
children: D.firstName || "-"
|
|
401
424
|
})]
|
|
402
425
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
426
|
+
/* @__PURE__ */ y("div", {
|
|
404
427
|
className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
|
|
405
|
-
children: [/* @__PURE__ */
|
|
428
|
+
children: [/* @__PURE__ */ v("label", {
|
|
406
429
|
className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
|
|
407
|
-
children:
|
|
408
|
-
}), /* @__PURE__ */
|
|
430
|
+
children: C("auth.profile.lastName", "Last Name")
|
|
431
|
+
}), /* @__PURE__ */ v("p", {
|
|
409
432
|
className: "text-[var(--color-text-primary)] font-medium",
|
|
410
|
-
children:
|
|
433
|
+
children: D.lastName || "-"
|
|
411
434
|
})]
|
|
412
435
|
}),
|
|
413
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ y("div", {
|
|
414
437
|
className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
|
|
415
|
-
children: [/* @__PURE__ */
|
|
438
|
+
children: [/* @__PURE__ */ v("label", {
|
|
416
439
|
className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
|
|
417
|
-
children:
|
|
418
|
-
}), /* @__PURE__ */
|
|
440
|
+
children: C("auth.profile.email", "Email")
|
|
441
|
+
}), /* @__PURE__ */ y("p", {
|
|
419
442
|
className: "text-[var(--color-text-primary)] font-medium flex items-center gap-2",
|
|
420
|
-
children: [
|
|
443
|
+
children: [D.email, D.emailVerified && /* @__PURE__ */ y("span", {
|
|
421
444
|
className: "inline-flex items-center gap-1 text-[var(--color-status-success-text)] text-xs",
|
|
422
|
-
children: [/* @__PURE__ */
|
|
445
|
+
children: [/* @__PURE__ */ v(i, { className: "size-3" }), C("auth.profile.verified", "Verified")]
|
|
423
446
|
})]
|
|
424
447
|
})]
|
|
425
448
|
}),
|
|
426
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ y("div", {
|
|
427
450
|
className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
|
|
428
|
-
children: [/* @__PURE__ */
|
|
451
|
+
children: [/* @__PURE__ */ v("label", {
|
|
429
452
|
className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
|
|
430
|
-
children:
|
|
431
|
-
}), /* @__PURE__ */
|
|
453
|
+
children: C("auth.profile.phoneNumber", "Phone Number")
|
|
454
|
+
}), /* @__PURE__ */ v("p", {
|
|
432
455
|
className: "text-[var(--color-text-primary)] font-medium",
|
|
433
|
-
children:
|
|
456
|
+
children: D.phoneNumber || "-"
|
|
434
457
|
})]
|
|
435
458
|
}),
|
|
436
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ y("div", {
|
|
437
460
|
className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
|
|
438
|
-
children: [/* @__PURE__ */
|
|
461
|
+
children: [/* @__PURE__ */ v("label", {
|
|
439
462
|
className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
|
|
440
|
-
children:
|
|
441
|
-
}), /* @__PURE__ */
|
|
463
|
+
children: C("auth.profile.role", "Role")
|
|
464
|
+
}), /* @__PURE__ */ v("p", {
|
|
442
465
|
className: "text-[var(--color-text-primary)] font-medium",
|
|
443
|
-
children:
|
|
466
|
+
children: D.role?.replace("_", " ") || C("auth.profile.member", "Member")
|
|
444
467
|
})]
|
|
445
468
|
}),
|
|
446
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ y("div", {
|
|
447
470
|
className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
|
|
448
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ v("label", {
|
|
449
472
|
className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
|
|
450
|
-
children:
|
|
451
|
-
}), /* @__PURE__ */
|
|
473
|
+
children: C("auth.profile.mfaStatus", "MFA Status")
|
|
474
|
+
}), /* @__PURE__ */ v("p", {
|
|
452
475
|
className: "text-[var(--color-text-primary)] font-medium",
|
|
453
|
-
children:
|
|
476
|
+
children: D.mfaEnabled ? /* @__PURE__ */ y("span", {
|
|
454
477
|
className: "text-[var(--color-status-success-text)] flex items-center gap-1",
|
|
455
|
-
children: [/* @__PURE__ */
|
|
456
|
-
}) : /* @__PURE__ */
|
|
478
|
+
children: [/* @__PURE__ */ v(i, { className: "size-4" }), C("auth.profile.enabled", "Enabled")]
|
|
479
|
+
}) : /* @__PURE__ */ v("span", {
|
|
457
480
|
className: "text-[var(--color-status-warning-text)]",
|
|
458
|
-
children:
|
|
481
|
+
children: C("auth.profile.notEnabled", "Not Enabled")
|
|
459
482
|
})
|
|
460
483
|
})]
|
|
461
484
|
}),
|
|
462
|
-
/* @__PURE__ */
|
|
485
|
+
/* @__PURE__ */ y("div", {
|
|
463
486
|
className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
|
|
464
|
-
children: [/* @__PURE__ */
|
|
487
|
+
children: [/* @__PURE__ */ v("label", {
|
|
465
488
|
className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
|
|
466
|
-
children:
|
|
467
|
-
}), /* @__PURE__ */
|
|
489
|
+
children: C("auth.profile.lastLogin", "Last Login")
|
|
490
|
+
}), /* @__PURE__ */ v("p", {
|
|
468
491
|
className: "text-[var(--color-text-primary)] font-medium",
|
|
469
|
-
children:
|
|
492
|
+
children: D.lastLoginAt ? new Date(D.lastLoginAt).toLocaleString() : C("auth.profile.never", "Never")
|
|
470
493
|
})]
|
|
471
494
|
}),
|
|
472
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ y("div", {
|
|
473
496
|
className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
|
|
474
|
-
children: [/* @__PURE__ */
|
|
497
|
+
children: [/* @__PURE__ */ v("label", {
|
|
475
498
|
className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
|
|
476
|
-
children:
|
|
477
|
-
}), /* @__PURE__ */
|
|
499
|
+
children: C("auth.profile.accountCreated", "Account Created")
|
|
500
|
+
}), /* @__PURE__ */ v("p", {
|
|
478
501
|
className: "text-[var(--color-text-primary)] font-medium",
|
|
479
|
-
children:
|
|
502
|
+
children: D.createdAt ? new Date(D.createdAt).toLocaleString() : "-"
|
|
480
503
|
})]
|
|
481
504
|
})
|
|
482
505
|
]
|
|
483
|
-
}), /* @__PURE__ */
|
|
506
|
+
}), /* @__PURE__ */ y("div", {
|
|
484
507
|
className: "flex gap-3 pt-6 mt-6 border-t border-[var(--color-border-default)]",
|
|
485
|
-
children: [/* @__PURE__ */
|
|
508
|
+
children: [/* @__PURE__ */ v(b, {
|
|
486
509
|
type: "button",
|
|
487
|
-
onClick: () =>
|
|
510
|
+
onClick: () => G(!0),
|
|
488
511
|
variant: "default",
|
|
489
512
|
size: "lg",
|
|
490
513
|
className: "font-semibold",
|
|
491
|
-
children:
|
|
492
|
-
}), /* @__PURE__ */
|
|
514
|
+
children: C("auth.profile.editProfile", "Edit Profile")
|
|
515
|
+
}), /* @__PURE__ */ v("button", {
|
|
493
516
|
type: "button",
|
|
494
|
-
onClick: () =>
|
|
495
|
-
className: "
|
|
496
|
-
children:
|
|
517
|
+
onClick: () => w("/auth/security"),
|
|
518
|
+
className: "inline-flex items-center h-10 px-8 rounded-xl border border-[var(--color-border-default)] text-[var(--color-text-secondary)] font-medium hover:bg-[var(--color-bg-muted)] transition-colors duration-200",
|
|
519
|
+
children: C("auth.profile.securitySettings", "Security Settings")
|
|
497
520
|
})]
|
|
498
521
|
})] })
|
|
499
522
|
})]
|
|
500
523
|
}),
|
|
501
|
-
/* @__PURE__ */
|
|
524
|
+
/* @__PURE__ */ v(x, {
|
|
502
525
|
className: "mt-8",
|
|
503
526
|
storageKey: "auth-profile",
|
|
504
527
|
steps: [
|
|
505
528
|
{
|
|
506
529
|
id: "edit-profile",
|
|
507
|
-
label:
|
|
508
|
-
description:
|
|
509
|
-
onClick: () =>
|
|
510
|
-
done: !!(
|
|
530
|
+
label: C("auth.profile.nextEdit", "Complete your profile"),
|
|
531
|
+
description: C("auth.profile.nextEditDesc", "Add your display name and photo so teammates recognise you."),
|
|
532
|
+
onClick: () => G(!0),
|
|
533
|
+
done: !!(D.name && D.avatar)
|
|
511
534
|
},
|
|
512
535
|
{
|
|
513
536
|
id: "enable-mfa",
|
|
514
|
-
label:
|
|
515
|
-
description:
|
|
516
|
-
onClick: () =>
|
|
517
|
-
done: !!
|
|
537
|
+
label: C("auth.profile.nextMfa", "Secure your account with 2FA"),
|
|
538
|
+
description: C("auth.profile.nextMfaDesc", "Turn on two-factor authentication for stronger protection."),
|
|
539
|
+
onClick: () => w("/auth/mfa"),
|
|
540
|
+
done: !!D.mfaEnabled
|
|
518
541
|
},
|
|
519
542
|
{
|
|
520
543
|
id: "security-center",
|
|
521
|
-
label:
|
|
522
|
-
description:
|
|
523
|
-
onClick: () =>
|
|
544
|
+
label: C("auth.profile.nextSecurity", "Visit the Security Center"),
|
|
545
|
+
description: C("auth.profile.nextSecurityDesc", "Review sessions, password, and account options."),
|
|
546
|
+
onClick: () => w("/auth/security")
|
|
524
547
|
}
|
|
525
548
|
]
|
|
526
549
|
}),
|
|
527
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ y("div", {
|
|
528
551
|
className: "mt-8 grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
529
|
-
children: [/* @__PURE__ */
|
|
552
|
+
children: [/* @__PURE__ */ y("button", {
|
|
530
553
|
type: "button",
|
|
531
|
-
onClick: () =>
|
|
554
|
+
onClick: () => w("/auth/mfa"),
|
|
532
555
|
className: "p-4 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] hover:border-[var(--color-action-primary-border)] transition-colors duration-200 text-left group",
|
|
533
556
|
children: [
|
|
534
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ v("div", {
|
|
535
558
|
className: "size-10 rounded-lg bg-[var(--color-bg-accent)] flex items-center justify-center mb-3 group-hover:bg-[var(--color-action-primary-bg-subtle)] transition-colors duration-200",
|
|
536
|
-
children: /* @__PURE__ */
|
|
559
|
+
children: /* @__PURE__ */ v("svg", {
|
|
537
560
|
className: "size-5 text-[var(--color-text-link)]",
|
|
538
561
|
fill: "none",
|
|
539
562
|
viewBox: "0 0 24 24",
|
|
540
563
|
stroke: "currentColor",
|
|
541
|
-
children: /* @__PURE__ */
|
|
564
|
+
children: /* @__PURE__ */ v("path", {
|
|
542
565
|
strokeLinecap: "round",
|
|
543
566
|
strokeLinejoin: "round",
|
|
544
567
|
strokeWidth: 2,
|
|
@@ -546,28 +569,28 @@ function w() {
|
|
|
546
569
|
})
|
|
547
570
|
})
|
|
548
571
|
}),
|
|
549
|
-
/* @__PURE__ */
|
|
572
|
+
/* @__PURE__ */ v("h3", {
|
|
550
573
|
className: "font-medium text-[var(--color-text-primary)]",
|
|
551
|
-
children:
|
|
574
|
+
children: C("auth.profile.twoFactorAuth", "Two-Factor Auth")
|
|
552
575
|
}),
|
|
553
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ v("p", {
|
|
554
577
|
className: "text-sm text-[var(--color-text-tertiary)] mt-1",
|
|
555
|
-
children:
|
|
578
|
+
children: D.mfaEnabled ? C("auth.profile.manageMfa", "Manage MFA settings") : C("auth.profile.enableMfa", "Enable MFA for extra security")
|
|
556
579
|
})
|
|
557
580
|
]
|
|
558
|
-
}), /* @__PURE__ */
|
|
581
|
+
}), /* @__PURE__ */ y("button", {
|
|
559
582
|
type: "button",
|
|
560
|
-
onClick: () =>
|
|
583
|
+
onClick: () => w("/devportal/api-keys"),
|
|
561
584
|
className: "p-4 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] hover:border-[var(--color-action-secondary-border)] transition-colors duration-200 text-left group",
|
|
562
585
|
children: [
|
|
563
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ v("div", {
|
|
564
587
|
className: "size-10 rounded-lg bg-[var(--color-action-secondary-bg-subtle)] flex items-center justify-center mb-3 group-hover:bg-[var(--color-action-secondary-bg-subtle)] transition-colors duration-200",
|
|
565
|
-
children: /* @__PURE__ */
|
|
588
|
+
children: /* @__PURE__ */ v("svg", {
|
|
566
589
|
className: "size-5 text-[var(--color-action-secondary-text)]",
|
|
567
590
|
fill: "none",
|
|
568
591
|
viewBox: "0 0 24 24",
|
|
569
592
|
stroke: "currentColor",
|
|
570
|
-
children: /* @__PURE__ */
|
|
593
|
+
children: /* @__PURE__ */ v("path", {
|
|
571
594
|
strokeLinecap: "round",
|
|
572
595
|
strokeLinejoin: "round",
|
|
573
596
|
strokeWidth: 2,
|
|
@@ -575,13 +598,13 @@ function w() {
|
|
|
575
598
|
})
|
|
576
599
|
})
|
|
577
600
|
}),
|
|
578
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ v("h3", {
|
|
579
602
|
className: "font-medium text-[var(--color-text-primary)]",
|
|
580
|
-
children:
|
|
603
|
+
children: C("auth.profile.apiKeys", "API Keys")
|
|
581
604
|
}),
|
|
582
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ v("p", {
|
|
583
606
|
className: "text-sm text-[var(--color-text-tertiary)] mt-1",
|
|
584
|
-
children:
|
|
607
|
+
children: C("auth.profile.manageApiKeys", "Manage your API access credentials")
|
|
585
608
|
})
|
|
586
609
|
]
|
|
587
610
|
})]
|
|
@@ -590,6 +613,6 @@ function w() {
|
|
|
590
613
|
});
|
|
591
614
|
}
|
|
592
615
|
//#endregion
|
|
593
|
-
export {
|
|
616
|
+
export { C as UserProfilePage };
|
|
594
617
|
|
|
595
618
|
//# sourceMappingURL=UserProfilePage.js.map
|