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