@burdenoff/microfe-auth 2026.713.1 → 2026.717.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.
|
@@ -70,10 +70,10 @@ function we(e) {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
function y() {
|
|
73
|
-
let v = ce(), y = se(), [b] = le(), { t:
|
|
74
|
-
let n =
|
|
73
|
+
let v = ce(), y = se(), [b] = le(), { t: Te } = de(), x = f((e, t) => {
|
|
74
|
+
let n = Te(e);
|
|
75
75
|
return n === e ? t : n;
|
|
76
|
-
}, [
|
|
76
|
+
}, [Te]), { signIn: Ee, isLoading: S, error: C, errorCode: w, resendVerification: De } = n(), { completeAuthFlow: Oe } = r(), { setWorkspace: T, setOrganization: E } = ue(), { defaultPostLoginPath: D } = e(), { initiateGoogleOAuth: ke, initiateMicrosoftOAuth: Ae, isProviderConfigured: O } = i(), k = t((e) => e.mfaRequired), { executeRecaptcha: je } = ne(), [A, j] = m(!1), [Me, Ne] = m(!1), Pe = f((e) => {
|
|
77
77
|
if (typeof window > "u" || be()) return e;
|
|
78
78
|
try {
|
|
79
79
|
let t = fe(), n = new URL(t.url), r = window.location.origin;
|
|
@@ -95,7 +95,7 @@ function y() {
|
|
|
95
95
|
} catch {
|
|
96
96
|
return e;
|
|
97
97
|
}
|
|
98
|
-
}, []),
|
|
98
|
+
}, []), M = f((e) => {
|
|
99
99
|
if (typeof window < "u") {
|
|
100
100
|
try {
|
|
101
101
|
sessionStorage.setItem("bf-post-login-return-to", e);
|
|
@@ -104,33 +104,35 @@ function y() {
|
|
|
104
104
|
v(xe(e));
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
|
-
window.location.assign(
|
|
107
|
+
window.location.assign(Pe(e));
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
v(e);
|
|
111
|
-
}, [v,
|
|
111
|
+
}, [v, Pe]), [N, Fe] = m(!1), [P, F] = m(!1), [Ie, I] = m(!1), [Le, L] = m(!1), [R, z] = m(!1), [B, V] = m(!1), [Re, ze] = m(!1), [Be, H] = m(!1), [Ve, U] = m(null), [He, W] = m(null), [G, K] = m({
|
|
112
112
|
email: "",
|
|
113
113
|
password: "",
|
|
114
114
|
rememberMe: !1
|
|
115
|
-
}), [q, J] = m(null), [Ue, Y] = m(!1), X = b.get("mode") === "add-account", Z = b.get("returnTo"), Q = ie(Z);
|
|
115
|
+
}), [q, J] = m(null), [Ue, Y] = m(!1), X = b.get("mode") === "add-account", Z = b.get("returnTo"), Q = ie(Z), $ = b.get("reason");
|
|
116
116
|
p(() => {
|
|
117
|
+
$ === "session-expired" ? W(x("auth.login.sessionExpired", "Your session has expired. Please sign in again.")) : $ === "logout" && W(x("auth.login.signedOut", "You have been signed out."));
|
|
118
|
+
}, [$, x]), p(() => {
|
|
117
119
|
!Q.current && Z && (Q.current = Z);
|
|
118
120
|
}, [Z]), p(() => {
|
|
119
|
-
if (X ||
|
|
121
|
+
if (X || A) return;
|
|
120
122
|
let e = ye();
|
|
121
123
|
if (e) {
|
|
122
124
|
let n = he(e), r = ge(e);
|
|
123
125
|
if (n?.accessToken && r && Se(n.accessToken)) {
|
|
124
|
-
t.getState().loadFromProfile(e),
|
|
126
|
+
t.getState().loadFromProfile(e), M(Ce(Z) ?? "/");
|
|
125
127
|
return;
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
130
|
let n = oe();
|
|
129
|
-
n && (
|
|
131
|
+
n && (Ne(!0), window.location.replace(n));
|
|
130
132
|
}, [
|
|
131
133
|
X,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
A,
|
|
135
|
+
M,
|
|
134
136
|
Z
|
|
135
137
|
]), p(() => {
|
|
136
138
|
try {
|
|
@@ -146,7 +148,7 @@ function y() {
|
|
|
146
148
|
}
|
|
147
149
|
}, []), p(() => {
|
|
148
150
|
let e = y.state;
|
|
149
|
-
e?.message &&
|
|
151
|
+
e?.message && W(e.message), e?.email && K((t) => ({
|
|
150
152
|
...t,
|
|
151
153
|
email: e.email
|
|
152
154
|
})), e && window.history.replaceState({}, document.title);
|
|
@@ -170,26 +172,26 @@ function y() {
|
|
|
170
172
|
...t,
|
|
171
173
|
email: e
|
|
172
174
|
})), b.get("expired") === "true") {
|
|
173
|
-
|
|
175
|
+
W(x("auth.login.sessionExpired", "Your session has expired. Please sign in again."));
|
|
174
176
|
let e = window.location.pathname;
|
|
175
177
|
window.history.replaceState({}, document.title, e);
|
|
176
178
|
}
|
|
177
|
-
}, [b,
|
|
178
|
-
|
|
179
|
-
}, [
|
|
179
|
+
}, [b, x]), p(() => {
|
|
180
|
+
k && v("/auth/mfa-verify");
|
|
181
|
+
}, [k, v]);
|
|
180
182
|
let Ge = async (e) => {
|
|
181
|
-
e.preventDefault(),
|
|
183
|
+
e.preventDefault(), F(!1), I(!1), L(!1), z(!1), V(!1), Y(!1), H(!1), J(null);
|
|
182
184
|
let n = (G.email ?? "").trim();
|
|
183
185
|
if (!n) {
|
|
184
|
-
J(
|
|
186
|
+
J(x("auth.login.enterEmailOrUsername", "Please enter your email or username"));
|
|
185
187
|
return;
|
|
186
188
|
}
|
|
187
189
|
if (n.includes("@") && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)) {
|
|
188
|
-
J(
|
|
190
|
+
J(x("auth.login.invalidEmail", "Please enter a valid email address"));
|
|
189
191
|
return;
|
|
190
192
|
}
|
|
191
193
|
if (!G.password || G.password.length < 1) {
|
|
192
|
-
J(
|
|
194
|
+
J(x("auth.login.enterPassword", "Please enter your password"));
|
|
193
195
|
return;
|
|
194
196
|
}
|
|
195
197
|
if (X && ve().some((e) => e.email.toLowerCase() === n.toLowerCase())) {
|
|
@@ -198,14 +200,14 @@ function y() {
|
|
|
198
200
|
}
|
|
199
201
|
Y(!1);
|
|
200
202
|
try {
|
|
201
|
-
let e = await
|
|
203
|
+
let e = await je("login"), t = await Ee({
|
|
202
204
|
email: n,
|
|
203
205
|
password: G.password,
|
|
204
206
|
rememberMe: G.rememberMe,
|
|
205
207
|
...e ? { recaptchaToken: e } : {}
|
|
206
208
|
});
|
|
207
209
|
if (t.requiresMFA) {
|
|
208
|
-
let e = we(Q.current || Z || (
|
|
210
|
+
let e = we(Q.current || Z || (D ?? "/dashboard"));
|
|
209
211
|
try {
|
|
210
212
|
sessionStorage.setItem(re, e);
|
|
211
213
|
} catch {}
|
|
@@ -227,10 +229,10 @@ function y() {
|
|
|
227
229
|
} catch (e) {
|
|
228
230
|
console.warn("[LoginPage] Failed to save/clear remembered email:", e);
|
|
229
231
|
}
|
|
230
|
-
|
|
231
|
-
let e = we(Q.current || Z || (
|
|
232
|
+
j(!0);
|
|
233
|
+
let e = we(Q.current || Z || (D ?? "/dashboard"));
|
|
232
234
|
try {
|
|
233
|
-
let n = await Promise.race([
|
|
235
|
+
let n = await Promise.race([Oe(t.token), new Promise((e) => {
|
|
234
236
|
window.setTimeout(() => {
|
|
235
237
|
e({
|
|
236
238
|
success: !1,
|
|
@@ -238,75 +240,75 @@ function y() {
|
|
|
238
240
|
});
|
|
239
241
|
}, 5e3);
|
|
240
242
|
})]);
|
|
241
|
-
n.success ? (n.workspace && (
|
|
243
|
+
n.success ? (n.workspace && (T(n.workspace.id), n.workspace.organizationId && E(n.workspace.organizationId)), M(e)) : n.error?.includes("No workspaces found") ? v("/onboarding/create-workspace") : (n.workspace && (T(n.workspace.id), n.workspace.organizationId && E(n.workspace.organizationId)), console.warn("Auth flow warning:", n.error), M(e));
|
|
242
244
|
} catch (t) {
|
|
243
|
-
console.error("Auth flow error (login succeeded):", t),
|
|
245
|
+
console.error("Auth flow error (login succeeded):", t), M(e);
|
|
244
246
|
} finally {
|
|
245
|
-
|
|
247
|
+
j(!1);
|
|
246
248
|
}
|
|
247
249
|
}
|
|
248
250
|
} catch (e) {
|
|
249
251
|
let n = e instanceof Error ? e.message : String(e);
|
|
250
252
|
n.includes("reCAPTCHA") && J(n);
|
|
251
253
|
let r = t.getState().errorCode, i = We(n, r);
|
|
252
|
-
i === "DELETED" ?
|
|
254
|
+
i === "DELETED" ? I(!0) : i === "SUSPENDED" ? L(!0) : i === "OAUTH_ONLY" ? z(!0) : i === "INACTIVE" ? F(!0) : i === "EMAIL_NOT_VERIFIED" && V(!0);
|
|
253
255
|
}
|
|
254
256
|
};
|
|
255
257
|
p(() => {
|
|
256
|
-
if (
|
|
257
|
-
let e = We(
|
|
258
|
-
e === "DELETED" ?
|
|
258
|
+
if (C) {
|
|
259
|
+
let e = We(C, w);
|
|
260
|
+
e === "DELETED" ? I(!0) : e === "SUSPENDED" ? L(!0) : e === "OAUTH_ONLY" ? z(!0) : e === "INACTIVE" ? F(!0) : e === "EMAIL_NOT_VERIFIED" && V(!0);
|
|
259
261
|
}
|
|
260
|
-
}, [
|
|
262
|
+
}, [C, w]);
|
|
261
263
|
let Ke = () => {
|
|
262
|
-
|
|
264
|
+
U(null);
|
|
263
265
|
try {
|
|
264
|
-
|
|
266
|
+
ke();
|
|
265
267
|
} catch (e) {
|
|
266
|
-
|
|
268
|
+
U(e instanceof Error ? e.message : x("auth.login.googleSignInFailed", "Failed to initiate Google sign in"));
|
|
267
269
|
}
|
|
268
270
|
}, qe = () => {
|
|
269
|
-
|
|
271
|
+
U(null);
|
|
270
272
|
try {
|
|
271
|
-
|
|
273
|
+
Ae();
|
|
272
274
|
} catch (e) {
|
|
273
|
-
|
|
275
|
+
U(e instanceof Error ? e.message : x("auth.login.microsoftSignInFailed", "Failed to initiate Microsoft sign in"));
|
|
274
276
|
}
|
|
275
277
|
}, Je = async () => {
|
|
276
|
-
|
|
278
|
+
ze(!0), H(!1);
|
|
277
279
|
try {
|
|
278
|
-
(await
|
|
280
|
+
(await De((G.email ?? "").trim())).success ? H(!0) : J(x("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
|
|
279
281
|
} catch (e) {
|
|
280
|
-
console.error("Failed to resend verification email:", e), J(e instanceof Error ? e.message :
|
|
282
|
+
console.error("Failed to resend verification email:", e), J(e instanceof Error ? e.message : x("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
|
|
281
283
|
} finally {
|
|
282
|
-
|
|
284
|
+
ze(!1);
|
|
283
285
|
}
|
|
284
|
-
}, Ye =
|
|
286
|
+
}, Ye = O("google"), Xe = O("microsoft"), Ze = [{
|
|
285
287
|
name: "Google",
|
|
286
288
|
icon: l,
|
|
287
289
|
onClick: Ke,
|
|
288
290
|
disabled: !Ye,
|
|
289
|
-
tooltip: Ye ? void 0 :
|
|
291
|
+
tooltip: Ye ? void 0 : x("auth.login.googleNotConfigured", "Google sign in is not configured")
|
|
290
292
|
}, {
|
|
291
293
|
name: "Microsoft",
|
|
292
294
|
icon: te,
|
|
293
295
|
onClick: qe,
|
|
294
|
-
disabled:
|
|
295
|
-
tooltip:
|
|
296
|
+
disabled: !Xe,
|
|
297
|
+
tooltip: Xe ? void 0 : x("auth.login.microsoftNotConfigured", "Microsoft sign in is not configured")
|
|
296
298
|
}];
|
|
297
|
-
return
|
|
298
|
-
title:
|
|
299
|
-
subtitle:
|
|
299
|
+
return Me ? /* @__PURE__ */ g(ae, {}) : /* @__PURE__ */ _(a, {
|
|
300
|
+
title: x("auth.login.welcomeBack", "Welcome back"),
|
|
301
|
+
subtitle: x("auth.login.enterCredentials", "Enter your credentials to continue"),
|
|
300
302
|
children: [
|
|
301
303
|
/* @__PURE__ */ g(me, {
|
|
302
304
|
className: "mb-5",
|
|
303
|
-
children:
|
|
305
|
+
children: x("auth.login.purpose", "Sign in to reach your workspaces, agents, and settings. Use your email and password, a social provider, or a passwordless magic link.")
|
|
304
306
|
}),
|
|
305
307
|
/* @__PURE__ */ _("form", {
|
|
306
308
|
onSubmit: Ge,
|
|
307
309
|
className: "space-y-5",
|
|
308
310
|
children: [
|
|
309
|
-
|
|
311
|
+
He && /* @__PURE__ */ _("div", {
|
|
310
312
|
className: "flex items-start gap-3 p-4 rounded-xl border bg-status-info-bg-subtle border-status-info-border",
|
|
311
313
|
children: [/* @__PURE__ */ g("svg", {
|
|
312
314
|
className: "size-5 flex-shrink-0 mt-0.5 text-text-link",
|
|
@@ -321,7 +323,7 @@ function y() {
|
|
|
321
323
|
})
|
|
322
324
|
}), /* @__PURE__ */ g("p", {
|
|
323
325
|
className: "text-sm text-status-info-text",
|
|
324
|
-
children:
|
|
326
|
+
children: He
|
|
325
327
|
})]
|
|
326
328
|
}),
|
|
327
329
|
q && /* @__PURE__ */ _("div", {
|
|
@@ -338,11 +340,11 @@ function y() {
|
|
|
338
340
|
children: [
|
|
339
341
|
/* @__PURE__ */ g("p", {
|
|
340
342
|
className: "text-sm font-medium text-status-warning-text",
|
|
341
|
-
children:
|
|
343
|
+
children: x("auth.login.duplicateAccount", "This account is already signed in.")
|
|
342
344
|
}),
|
|
343
345
|
/* @__PURE__ */ g("p", {
|
|
344
346
|
className: "mt-1 text-sm text-status-warning-text/80",
|
|
345
|
-
children:
|
|
347
|
+
children: x("auth.login.duplicateAccountHint", "Please use a different account, or go back and switch to this account from the profile menu.")
|
|
346
348
|
}),
|
|
347
349
|
(Q.current || Z) && /* @__PURE__ */ _("button", {
|
|
348
350
|
type: "button",
|
|
@@ -359,29 +361,29 @@ function y() {
|
|
|
359
361
|
strokeWidth: 2,
|
|
360
362
|
d: "M10 19l-7-7m0 0l7-7m-7 7h18"
|
|
361
363
|
})
|
|
362
|
-
}),
|
|
364
|
+
}), x("auth.login.goBackSwitchAccount", "Go back and switch account")]
|
|
363
365
|
})
|
|
364
366
|
]
|
|
365
367
|
})]
|
|
366
368
|
}),
|
|
367
|
-
|
|
368
|
-
className: `flex items-start gap-3 p-4 rounded-xl border ${
|
|
369
|
-
children: [/* @__PURE__ */ g(o, { className: `size-5 flex-shrink-0 mt-0.5 ${
|
|
369
|
+
C && !q && !Ue && /* @__PURE__ */ _("div", {
|
|
370
|
+
className: `flex items-start gap-3 p-4 rounded-xl border ${P || R || B ? "bg-status-warning-bg-subtle border-status-warning-border" : "bg-status-error-bg-subtle border-status-error-border"}`,
|
|
371
|
+
children: [/* @__PURE__ */ g(o, { className: `size-5 flex-shrink-0 mt-0.5 ${P || R || B ? "text-status-warning-text" : "text-status-error-text"}` }), /* @__PURE__ */ _("div", {
|
|
370
372
|
className: "flex-1",
|
|
371
373
|
children: [
|
|
372
374
|
/* @__PURE__ */ g("p", {
|
|
373
|
-
className: `text-sm ${
|
|
374
|
-
children:
|
|
375
|
+
className: `text-sm ${P || R || B ? "text-status-warning-text" : "text-status-error-text"}`,
|
|
376
|
+
children: Ie ? x("auth.login.accountDeleted", "This account has been permanently deleted and cannot be recovered.") : Le ? x("auth.login.accountSuspended", "Your account has been suspended. Please contact support for assistance.") : P ? x("auth.login.accountDeactivated", "Your account has been deactivated.") : R ? x("auth.login.oauthOnly", "This account uses OAuth sign-in. Please use Google or Microsoft to sign in.") : B ? x("auth.login.emailNotVerified", "Please verify your email before signing in. Check your inbox for the verification link.") : C
|
|
375
377
|
}),
|
|
376
|
-
|
|
378
|
+
P && /* @__PURE__ */ g("button", {
|
|
377
379
|
type: "button",
|
|
378
380
|
onClick: () => v("/auth/reactivate", { state: { email: G.email } }),
|
|
379
381
|
className: "mt-2 text-sm font-semibold text-status-warning-text hover:text-status-warning-text underline underline-offset-2",
|
|
380
|
-
children:
|
|
382
|
+
children: x("auth.login.clickReactivate", "Click here to reactivate your account")
|
|
381
383
|
}),
|
|
382
|
-
|
|
384
|
+
B && /* @__PURE__ */ g("div", {
|
|
383
385
|
className: "mt-3",
|
|
384
|
-
children:
|
|
386
|
+
children: Be ? /* @__PURE__ */ _("div", {
|
|
385
387
|
className: "flex items-center gap-2 text-sm text-status-success-text",
|
|
386
388
|
children: [/* @__PURE__ */ g("svg", {
|
|
387
389
|
className: "size-4",
|
|
@@ -394,13 +396,13 @@ function y() {
|
|
|
394
396
|
strokeWidth: 2,
|
|
395
397
|
d: "M5 13l4 4L19 7"
|
|
396
398
|
})
|
|
397
|
-
}),
|
|
399
|
+
}), x("auth.login.verificationSent", "Verification email sent! Please check your inbox.")]
|
|
398
400
|
}) : /* @__PURE__ */ g("button", {
|
|
399
401
|
type: "button",
|
|
400
402
|
onClick: Je,
|
|
401
|
-
disabled:
|
|
403
|
+
disabled: Re,
|
|
402
404
|
className: "inline-flex items-center gap-2 px-4 py-2.5 rounded-xl border border-status-warning-border bg-bg-surface text-status-warning-text text-sm font-medium hover:bg-status-warning-bg-subtle hover:border-status-warning-border transition-all shadow-sm disabled:opacity-50 disabled:cursor-not-allowed",
|
|
403
|
-
children:
|
|
405
|
+
children: Re ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(d, { className: "size-4 animate-spin" }), x("auth.login.sending", "Sending...")] }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("svg", {
|
|
404
406
|
className: "size-4",
|
|
405
407
|
fill: "none",
|
|
406
408
|
viewBox: "0 0 24 24",
|
|
@@ -411,21 +413,21 @@ function y() {
|
|
|
411
413
|
strokeWidth: 2,
|
|
412
414
|
d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
|
|
413
415
|
})
|
|
414
|
-
}),
|
|
416
|
+
}), x("auth.login.resendVerification", "Resend verification email")] })
|
|
415
417
|
})
|
|
416
418
|
}),
|
|
417
|
-
|
|
419
|
+
R && /* @__PURE__ */ _("div", {
|
|
418
420
|
className: "mt-3 flex flex-col gap-2",
|
|
419
|
-
children: [
|
|
421
|
+
children: [O("google") && /* @__PURE__ */ _("button", {
|
|
420
422
|
type: "button",
|
|
421
423
|
onClick: Ke,
|
|
422
424
|
className: "inline-flex items-center justify-center gap-2 px-4 py-2.5 rounded-xl border border-border-default bg-bg-surface text-text-primary text-sm font-medium hover:bg-bg-canvas hover:border-border-default transition-all shadow-sm",
|
|
423
|
-
children: [/* @__PURE__ */ g(l, { className: "size-5" }),
|
|
424
|
-
}),
|
|
425
|
+
children: [/* @__PURE__ */ g(l, { className: "size-5" }), x("auth.login.signInWithGoogle", "Sign in with Google")]
|
|
426
|
+
}), O("microsoft") && /* @__PURE__ */ _("button", {
|
|
425
427
|
type: "button",
|
|
426
428
|
onClick: qe,
|
|
427
429
|
className: "inline-flex items-center justify-center gap-2 px-4 py-2.5 rounded-xl border border-border-default bg-bg-surface text-text-primary text-sm font-medium hover:bg-bg-canvas hover:border-border-default transition-all shadow-sm",
|
|
428
|
-
children: [/* @__PURE__ */ g(te, { className: "size-5" }),
|
|
430
|
+
children: [/* @__PURE__ */ g(te, { className: "size-5" }), x("auth.login.signInWithMicrosoft", "Sign in with Microsoft")]
|
|
429
431
|
})]
|
|
430
432
|
})
|
|
431
433
|
]
|
|
@@ -436,7 +438,7 @@ function y() {
|
|
|
436
438
|
children: [/* @__PURE__ */ g("label", {
|
|
437
439
|
htmlFor: "email",
|
|
438
440
|
className: "block text-sm font-medium text-[var(--color-text-primary)]",
|
|
439
|
-
children:
|
|
441
|
+
children: x("auth.login.emailLabel", "Email")
|
|
440
442
|
}), /* @__PURE__ */ _("div", {
|
|
441
443
|
className: "relative",
|
|
442
444
|
children: [/* @__PURE__ */ g("div", {
|
|
@@ -448,14 +450,14 @@ function y() {
|
|
|
448
450
|
autoComplete: "email",
|
|
449
451
|
required: !0,
|
|
450
452
|
"aria-required": "true",
|
|
451
|
-
"aria-label":
|
|
453
|
+
"aria-label": x("auth.login.emailLabel", "Email"),
|
|
452
454
|
value: G.email,
|
|
453
455
|
onChange: (e) => K({
|
|
454
456
|
...G,
|
|
455
457
|
email: e.target.value
|
|
456
458
|
}),
|
|
457
459
|
className: "block w-full pl-[3.5rem] pr-4 py-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
|
|
458
|
-
placeholder:
|
|
460
|
+
placeholder: x("auth.login.emailPlaceholder", "you@example.com")
|
|
459
461
|
})]
|
|
460
462
|
})]
|
|
461
463
|
}),
|
|
@@ -464,7 +466,7 @@ function y() {
|
|
|
464
466
|
children: [/* @__PURE__ */ g("label", {
|
|
465
467
|
htmlFor: "password",
|
|
466
468
|
className: "block text-sm font-medium text-[var(--color-text-primary)]",
|
|
467
|
-
children:
|
|
469
|
+
children: x("auth.login.passwordLabel", "Password")
|
|
468
470
|
}), /* @__PURE__ */ _("div", {
|
|
469
471
|
className: "relative",
|
|
470
472
|
children: [
|
|
@@ -474,25 +476,25 @@ function y() {
|
|
|
474
476
|
}),
|
|
475
477
|
/* @__PURE__ */ g("input", {
|
|
476
478
|
id: "password",
|
|
477
|
-
type:
|
|
479
|
+
type: N ? "text" : "password",
|
|
478
480
|
autoComplete: "current-password",
|
|
479
481
|
required: !0,
|
|
480
482
|
"aria-required": "true",
|
|
481
|
-
"aria-label":
|
|
483
|
+
"aria-label": x("auth.login.passwordLabel", "Password"),
|
|
482
484
|
value: G.password,
|
|
483
485
|
onChange: (e) => K({
|
|
484
486
|
...G,
|
|
485
487
|
password: e.target.value
|
|
486
488
|
}),
|
|
487
489
|
className: "block w-full pl-[3.5rem] pr-12 py-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
|
|
488
|
-
placeholder:
|
|
490
|
+
placeholder: x("auth.login.passwordPlaceholder", "Enter your password")
|
|
489
491
|
}),
|
|
490
492
|
/* @__PURE__ */ g("button", {
|
|
491
493
|
type: "button",
|
|
492
|
-
onClick: () =>
|
|
493
|
-
"aria-label":
|
|
494
|
+
onClick: () => Fe(!N),
|
|
495
|
+
"aria-label": N ? "Hide password" : "Show password",
|
|
494
496
|
className: "absolute inset-y-0 right-0 pr-3.5 flex items-center text-[var(--color-text-tertiary)] hover:text-[var(--color-text-secondary)] transition-colors",
|
|
495
|
-
children: g(
|
|
497
|
+
children: g(N ? c : ee, { className: "size-5" })
|
|
496
498
|
})
|
|
497
499
|
]
|
|
498
500
|
})]
|
|
@@ -505,7 +507,7 @@ function y() {
|
|
|
505
507
|
className: "relative",
|
|
506
508
|
children: [/* @__PURE__ */ g("input", {
|
|
507
509
|
type: "checkbox",
|
|
508
|
-
"aria-label":
|
|
510
|
+
"aria-label": x("auth.login.rememberMe", "Remember me"),
|
|
509
511
|
checked: G.rememberMe,
|
|
510
512
|
onChange: (e) => {
|
|
511
513
|
let t = e.target.checked;
|
|
@@ -536,22 +538,22 @@ function y() {
|
|
|
536
538
|
})]
|
|
537
539
|
}), /* @__PURE__ */ g("span", {
|
|
538
540
|
className: "text-sm text-[var(--color-text-secondary)] group-hover:text-[var(--color-text-primary)] transition-colors",
|
|
539
|
-
children:
|
|
541
|
+
children: x("auth.login.rememberMe", "Remember me")
|
|
540
542
|
})]
|
|
541
543
|
}), /* @__PURE__ */ g("button", {
|
|
542
544
|
type: "button",
|
|
543
545
|
onClick: () => v("/auth/reset-password"),
|
|
544
546
|
className: "text-sm font-medium text-text-link hover:text-text-linkHover transition-colors",
|
|
545
|
-
children:
|
|
547
|
+
children: x("auth.login.forgotPassword", "Forgot password?")
|
|
546
548
|
})]
|
|
547
549
|
}),
|
|
548
550
|
/* @__PURE__ */ g(pe, {
|
|
549
551
|
type: "submit",
|
|
550
|
-
disabled:
|
|
552
|
+
disabled: S || A,
|
|
551
553
|
variant: "default",
|
|
552
554
|
size: "lg",
|
|
553
555
|
className: "w-full font-semibold",
|
|
554
|
-
children:
|
|
556
|
+
children: S || A ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(d, { className: "size-5 animate-spin" }), /* @__PURE__ */ g("span", { children: A ? x("auth.login.settingUpWorkspace", "Setting up workspace...") : x("auth.login.signingIn", "Signing in...") })] }) : x("auth.login.signIn", "Sign in")
|
|
555
557
|
})
|
|
556
558
|
]
|
|
557
559
|
}),
|
|
@@ -564,20 +566,20 @@ function y() {
|
|
|
564
566
|
className: "relative flex justify-center",
|
|
565
567
|
children: /* @__PURE__ */ g("span", {
|
|
566
568
|
className: "px-4 bg-[var(--color-bg-canvas)] text-sm text-[var(--color-text-tertiary)]",
|
|
567
|
-
children:
|
|
569
|
+
children: x("auth.login.orContinueWith", "or continue with")
|
|
568
570
|
})
|
|
569
571
|
})]
|
|
570
572
|
}),
|
|
571
|
-
|
|
573
|
+
Ve && /* @__PURE__ */ _("div", {
|
|
572
574
|
className: "flex items-start gap-3 p-4 rounded-xl border bg-status-error-bg-subtle border-status-error-border",
|
|
573
575
|
children: [/* @__PURE__ */ g(o, { className: "size-5 flex-shrink-0 mt-0.5 text-status-error-text" }), /* @__PURE__ */ g("p", {
|
|
574
576
|
className: "text-sm text-status-error-text",
|
|
575
|
-
children:
|
|
577
|
+
children: Ve
|
|
576
578
|
})]
|
|
577
579
|
}),
|
|
578
580
|
/* @__PURE__ */ g("div", {
|
|
579
581
|
className: "grid grid-cols-3 gap-3",
|
|
580
|
-
children:
|
|
582
|
+
children: Ze.map((e) => /* @__PURE__ */ _("button", {
|
|
581
583
|
type: "button",
|
|
582
584
|
onClick: e.onClick,
|
|
583
585
|
disabled: e.disabled,
|
|
@@ -597,11 +599,11 @@ function y() {
|
|
|
597
599
|
onClick: () => v("/auth/magic-link"),
|
|
598
600
|
className: "text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] transition-colors",
|
|
599
601
|
children: [
|
|
600
|
-
|
|
602
|
+
x("auth.login.preferPasswordless", "Prefer passwordless login?"),
|
|
601
603
|
" ",
|
|
602
604
|
/* @__PURE__ */ g("span", {
|
|
603
605
|
className: "font-semibold text-text-link hover:text-text-linkHover",
|
|
604
|
-
children:
|
|
606
|
+
children: x("auth.login.signInMagicLink", "Sign in with Magic Link")
|
|
605
607
|
})
|
|
606
608
|
]
|
|
607
609
|
})
|
|
@@ -609,13 +611,13 @@ function y() {
|
|
|
609
611
|
/* @__PURE__ */ _("p", {
|
|
610
612
|
className: "mt-6 text-center text-sm text-[var(--color-text-secondary)]",
|
|
611
613
|
children: [
|
|
612
|
-
|
|
614
|
+
x("auth.login.dontHaveAccount", "Don't have an account?"),
|
|
613
615
|
" ",
|
|
614
616
|
/* @__PURE__ */ g("button", {
|
|
615
617
|
type: "button",
|
|
616
618
|
onClick: () => v("/auth/register"),
|
|
617
619
|
className: "font-semibold text-text-link hover:text-text-linkHover transition-colors",
|
|
618
|
-
children:
|
|
620
|
+
children: x("auth.login.signUp", "Sign up")
|
|
619
621
|
})
|
|
620
622
|
]
|
|
621
623
|
})
|