@burdenoff/microfe-auth 2026.718.2 → 2026.718.3
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.
|
@@ -4,20 +4,22 @@ import { useAuthOperations as n } from "../hooks/useAuthOperations.js";
|
|
|
4
4
|
import { useMyWorkspaces as r } from "../hooks/useMyWorkspaces.js";
|
|
5
5
|
import { useOAuthOperations as i } from "../hooks/useOAuthOperations.js";
|
|
6
6
|
import { AuthLayout as a } from "../components/AuthLayout.js";
|
|
7
|
-
import { AlertIcon as o, EmailIcon as s, EyeIcon as
|
|
8
|
-
import { useCaptchaV3 as
|
|
9
|
-
import { MFA_REDIRECT as
|
|
10
|
-
import { useCallback as
|
|
11
|
-
import { SSORedirectSpinner as
|
|
12
|
-
import { useLocation as
|
|
13
|
-
import { useActiveContext as
|
|
14
|
-
import { Fragment as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
7
|
+
import { AlertIcon as o, EmailIcon as s, EyeIcon as c, EyeOffIcon as l, GoogleIcon as ee, LockIcon as te, MicrosoftIcon as ne, SpinnerIcon as re } from "../components/AuthIcons.js";
|
|
8
|
+
import { useCaptchaV3 as ie } from "../hooks/useCaptchaV3.js";
|
|
9
|
+
import { MFA_REDIRECT as ae } from "../constants/sessionKeys.js";
|
|
10
|
+
import { useCallback as u, useEffect as d, useRef as oe, useState as f } from "react";
|
|
11
|
+
import { SSORedirectSpinner as se, getSSORedirectUrl as ce } from "@burdenoff/fe-libs/shared/components";
|
|
12
|
+
import { useLocation as le, useNavigate as ue, useSearchParams as de } from "react-router-dom";
|
|
13
|
+
import { useActiveContext as fe, useI18n as pe } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
14
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
15
|
+
import { beginSsoNavigation as me, buildSsoDepositUrl as he, isSsoNavigationPending as ge, markSsoDepositPending as _e, mintSsoSessionTokens as ve } from "@burdenoff/fe-libs/shared/utils";
|
|
16
|
+
import { resolveAuthBridgeConfig as ye } from "@burdenoff/fe-libs/shared/config";
|
|
17
|
+
import { resolveGatewayUrls as be } from "@burdenoff/fe-libs/shared/config/gatewayUrls";
|
|
18
|
+
import { Button as xe } from "@burdenoff/fe-libs/button";
|
|
19
|
+
import { PagePurpose as Se } from "@burdenoff/fe-libs/ui";
|
|
20
|
+
import { getProfileTokens as g, getProfileUser as _, getProfileWorkspaceToken as Ce, getProfiles as v, resolveActiveProfileId as we } from "@burdenoff/fe-libs/shared/providers/shell/ProfileStorageManager";
|
|
19
21
|
//#region src/auth/pages/LoginPage.tsx
|
|
20
|
-
function
|
|
22
|
+
function Te() {
|
|
21
23
|
if (typeof window > "u") return !1;
|
|
22
24
|
let e = window;
|
|
23
25
|
if (typeof e.Capacitor?.isNativePlatform == "function") try {
|
|
@@ -25,7 +27,7 @@ function be() {
|
|
|
25
27
|
} catch {}
|
|
26
28
|
return !!(typeof navigator < "u" && /Electron/i.test(navigator.userAgent || ""));
|
|
27
29
|
}
|
|
28
|
-
function
|
|
30
|
+
function Ee(e) {
|
|
29
31
|
if (typeof window > "u") return e;
|
|
30
32
|
try {
|
|
31
33
|
let t = new URL(e, window.location.origin);
|
|
@@ -34,7 +36,7 @@ function xe(e) {
|
|
|
34
36
|
return e;
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
|
-
function
|
|
39
|
+
function De(e) {
|
|
38
40
|
try {
|
|
39
41
|
let t = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "="), r = JSON.parse(atob(n));
|
|
40
42
|
return typeof r.exp == "number" && r.exp > Date.now() / 1e3;
|
|
@@ -42,16 +44,16 @@ function Se(e) {
|
|
|
42
44
|
return !1;
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
|
-
function
|
|
47
|
+
function Oe(e) {
|
|
46
48
|
if (!e) return null;
|
|
47
49
|
try {
|
|
48
50
|
let t = new URL(decodeURIComponent(e), window.location.origin);
|
|
49
|
-
return t.origin === window.location.origin ?
|
|
51
|
+
return t.origin === window.location.origin ? y(t, { includeOrigin: !1 }) : null;
|
|
50
52
|
} catch {
|
|
51
53
|
return null;
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
|
-
function
|
|
56
|
+
function y(e, t) {
|
|
55
57
|
for (let t of [
|
|
56
58
|
"sso_failed",
|
|
57
59
|
"sso-failed",
|
|
@@ -61,84 +63,96 @@ function v(e, t) {
|
|
|
61
63
|
let n = e.searchParams.toString();
|
|
62
64
|
return `${e.pathname}${n ? `?${n}` : ""}${e.hash}`;
|
|
63
65
|
}
|
|
64
|
-
function
|
|
66
|
+
function b(e) {
|
|
65
67
|
try {
|
|
66
68
|
let t = new URL(decodeURIComponent(e), window.location.origin);
|
|
67
|
-
return
|
|
69
|
+
return y(t, { includeOrigin: t.origin !== window.location.origin });
|
|
68
70
|
} catch {
|
|
69
71
|
return e;
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
|
-
function
|
|
73
|
-
let
|
|
74
|
-
let n =
|
|
74
|
+
function x() {
|
|
75
|
+
let y = ue(), x = le(), [S] = de(), { t: ke } = pe(), C = u((e, t) => {
|
|
76
|
+
let n = ke(e);
|
|
75
77
|
return n === e ? t : n;
|
|
76
|
-
}, [
|
|
77
|
-
if (typeof window > "u" ||
|
|
78
|
+
}, [ke]), { signIn: Ae, isLoading: je, error: w, errorCode: Me, resendVerification: Ne } = n(), { completeAuthFlow: Pe } = r(), { setWorkspace: Fe, setOrganization: Ie } = fe(), { defaultPostLoginPath: Le } = e(), { initiateGoogleOAuth: Re, initiateMicrosoftOAuth: ze, isProviderConfigured: T } = i(), E = t((e) => e.mfaRequired), { executeRecaptcha: Be } = ie(), [D, O] = f(!1), [Ve, He] = f(!1), k = u(async (e) => {
|
|
79
|
+
if (typeof window > "u" || Te()) return e;
|
|
78
80
|
try {
|
|
79
|
-
let t =
|
|
81
|
+
let t = ye(), n = new URL(t.url), r = window.location.origin;
|
|
80
82
|
if (n.origin === r) return e;
|
|
81
|
-
let i = new URL(e, r).href, a =
|
|
83
|
+
let i = new URL(e, r).href, a = we();
|
|
82
84
|
if (!a) return e;
|
|
83
|
-
let o =
|
|
85
|
+
let o = g(a), s = _(a);
|
|
84
86
|
if (!o || !s) return e;
|
|
85
|
-
let
|
|
87
|
+
let c = Ce(a), l = {
|
|
88
|
+
...o,
|
|
89
|
+
workspaceToken: c
|
|
90
|
+
};
|
|
91
|
+
if (o.refreshToken) {
|
|
92
|
+
let { globalBaseUrl: e } = be(), { tokens: t } = await ve(`${e}/global/graphql`, o.refreshToken);
|
|
93
|
+
t && (l = {
|
|
94
|
+
...t,
|
|
95
|
+
workspaceToken: c
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return _e(a), he(n.origin, i, {
|
|
86
99
|
profileId: a,
|
|
87
|
-
tokens: JSON.stringify(
|
|
88
|
-
...o,
|
|
89
|
-
workspaceToken: ee
|
|
90
|
-
}),
|
|
100
|
+
tokens: JSON.stringify(l),
|
|
91
101
|
user: JSON.stringify(s),
|
|
92
|
-
profiles: JSON.stringify(
|
|
93
|
-
}
|
|
94
|
-
return u.searchParams.set("returnTo", i), `${u.href}#sso=${l}`;
|
|
102
|
+
profiles: JSON.stringify(v())
|
|
103
|
+
});
|
|
95
104
|
} catch {
|
|
96
105
|
return e;
|
|
97
106
|
}
|
|
98
|
-
}, []),
|
|
99
|
-
if (typeof window
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
}, []), A = oe(!1), j = u((e) => {
|
|
108
|
+
if (typeof window > "u") {
|
|
109
|
+
y(e);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
try {
|
|
113
|
+
sessionStorage.setItem("bf-post-login-return-to", e);
|
|
114
|
+
} catch {}
|
|
115
|
+
if (Te()) {
|
|
116
|
+
y(Ee(e));
|
|
108
117
|
return;
|
|
109
118
|
}
|
|
110
|
-
|
|
111
|
-
|
|
119
|
+
A.current = !0, (async () => {
|
|
120
|
+
let t = await k(e);
|
|
121
|
+
t.includes("/auth/sso-deposit") ? (me(), window.location.assign(t), window.setTimeout(() => {
|
|
122
|
+
me(), window.location.replace(t);
|
|
123
|
+
}, 2500)) : window.location.assign(t);
|
|
124
|
+
})();
|
|
125
|
+
}, [y, k]), [M, Ue] = f(!1), [N, P] = f(!1), [We, F] = f(!1), [Ge, I] = f(!1), [L, R] = f(!1), [z, B] = f(!1), [Ke, qe] = f(!1), [Je, V] = f(!1), [Ye, H] = f(null), [Xe, U] = f(null), [W, G] = f({
|
|
112
126
|
email: "",
|
|
113
127
|
password: "",
|
|
114
128
|
rememberMe: !1
|
|
115
|
-
}), [
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}, [
|
|
119
|
-
!
|
|
120
|
-
}, [
|
|
121
|
-
if (
|
|
122
|
-
let e =
|
|
129
|
+
}), [K, q] = f(null), [Ze, J] = f(!1), Y = S.get("mode") === "add-account", X = S.get("returnTo"), Z = oe(X), Q = S.get("reason");
|
|
130
|
+
d(() => {
|
|
131
|
+
Q === "session-expired" ? U(C("auth.login.sessionExpired", "Your session has expired. Please sign in again.")) : Q === "logout" && U(C("auth.login.signedOut", "You have been signed out."));
|
|
132
|
+
}, [Q, C]), d(() => {
|
|
133
|
+
!Z.current && X && (Z.current = X);
|
|
134
|
+
}, [X]), d(() => {
|
|
135
|
+
if (Y || D || A.current || ge()) return;
|
|
136
|
+
let e = we();
|
|
123
137
|
if (e) {
|
|
124
|
-
let n =
|
|
125
|
-
if (n?.accessToken && r &&
|
|
126
|
-
t.getState().loadFromProfile(e),
|
|
138
|
+
let n = g(e), r = _(e);
|
|
139
|
+
if (n?.accessToken && r && De(n.accessToken)) {
|
|
140
|
+
t.getState().loadFromProfile(e), j(Oe(X) ?? "/");
|
|
127
141
|
return;
|
|
128
142
|
}
|
|
129
143
|
}
|
|
130
|
-
let n =
|
|
131
|
-
n && (
|
|
144
|
+
let n = ce();
|
|
145
|
+
n && (He(!0), window.location.replace(n));
|
|
132
146
|
}, [
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
]),
|
|
147
|
+
Y,
|
|
148
|
+
D,
|
|
149
|
+
j,
|
|
150
|
+
X
|
|
151
|
+
]), d(() => {
|
|
138
152
|
try {
|
|
139
153
|
localStorage.removeItem("remembered_password");
|
|
140
154
|
let e = localStorage.getItem("remembered_email");
|
|
141
|
-
e &&
|
|
155
|
+
e && G((t) => ({
|
|
142
156
|
...t,
|
|
143
157
|
email: e,
|
|
144
158
|
rememberMe: !0
|
|
@@ -146,14 +160,14 @@ function y() {
|
|
|
146
160
|
} catch (e) {
|
|
147
161
|
console.warn("[LoginPage] Failed to load remembered email:", e);
|
|
148
162
|
}
|
|
149
|
-
}, []),
|
|
150
|
-
let e =
|
|
151
|
-
e?.message &&
|
|
163
|
+
}, []), d(() => {
|
|
164
|
+
let e = x.state;
|
|
165
|
+
e?.message && U(e.message), e?.email && G((t) => ({
|
|
152
166
|
...t,
|
|
153
167
|
email: e.email
|
|
154
168
|
})), e && window.history.replaceState({}, document.title);
|
|
155
|
-
}, [
|
|
156
|
-
let
|
|
169
|
+
}, [x.state]);
|
|
170
|
+
let Qe = (e, t) => {
|
|
157
171
|
if (t) switch (t) {
|
|
158
172
|
case "ACCOUNT_DELETED": return "DELETED";
|
|
159
173
|
case "ACCOUNT_SUSPENDED": return "SUSPENDED";
|
|
@@ -166,50 +180,50 @@ function y() {
|
|
|
166
180
|
let n = e.toLowerCase();
|
|
167
181
|
return n.includes("deleted") || n.includes("permanently deleted") ? "DELETED" : n.includes("suspended") ? "SUSPENDED" : n.includes("oauth provider") || n.includes("oauth-only") || n.includes("oauth only") ? "OAUTH_ONLY" : n.includes("inactive") || n.includes("deactivated") || n.includes("not active") ? "INACTIVE" : n.includes("verify your email") || n.includes("email not verified") || n.includes("email_not_verified") ? "EMAIL_NOT_VERIFIED" : null;
|
|
168
182
|
};
|
|
169
|
-
|
|
170
|
-
let e =
|
|
171
|
-
if (e &&
|
|
183
|
+
d(() => {
|
|
184
|
+
let e = S.get("email");
|
|
185
|
+
if (e && G((t) => ({
|
|
172
186
|
...t,
|
|
173
187
|
email: e
|
|
174
|
-
})),
|
|
175
|
-
|
|
188
|
+
})), S.get("expired") === "true") {
|
|
189
|
+
U(C("auth.login.sessionExpired", "Your session has expired. Please sign in again."));
|
|
176
190
|
let e = window.location.pathname;
|
|
177
191
|
window.history.replaceState({}, document.title, e);
|
|
178
192
|
}
|
|
179
|
-
}, [
|
|
180
|
-
|
|
181
|
-
}, [
|
|
182
|
-
let
|
|
183
|
-
e.preventDefault(),
|
|
184
|
-
let n = (
|
|
193
|
+
}, [S, C]), d(() => {
|
|
194
|
+
E && y("/auth/mfa-verify");
|
|
195
|
+
}, [E, y]);
|
|
196
|
+
let $e = async (e) => {
|
|
197
|
+
e.preventDefault(), P(!1), F(!1), I(!1), R(!1), B(!1), J(!1), V(!1), q(null);
|
|
198
|
+
let n = (W.email ?? "").trim();
|
|
185
199
|
if (!n) {
|
|
186
|
-
|
|
200
|
+
q(C("auth.login.enterEmailOrUsername", "Please enter your email or username"));
|
|
187
201
|
return;
|
|
188
202
|
}
|
|
189
203
|
if (n.includes("@") && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)) {
|
|
190
|
-
|
|
204
|
+
q(C("auth.login.invalidEmail", "Please enter a valid email address"));
|
|
191
205
|
return;
|
|
192
206
|
}
|
|
193
|
-
if (!
|
|
194
|
-
|
|
207
|
+
if (!W.password || W.password.length < 1) {
|
|
208
|
+
q(C("auth.login.enterPassword", "Please enter your password"));
|
|
195
209
|
return;
|
|
196
210
|
}
|
|
197
|
-
if (
|
|
198
|
-
|
|
211
|
+
if (Y && v().some((e) => e.email.toLowerCase() === n.toLowerCase())) {
|
|
212
|
+
J(!0), q(null);
|
|
199
213
|
return;
|
|
200
214
|
}
|
|
201
|
-
|
|
215
|
+
J(!1);
|
|
202
216
|
try {
|
|
203
|
-
let e = await
|
|
217
|
+
let e = await Be("login"), t = await Ae({
|
|
204
218
|
email: n,
|
|
205
|
-
password:
|
|
206
|
-
rememberMe:
|
|
219
|
+
password: W.password,
|
|
220
|
+
rememberMe: W.rememberMe,
|
|
207
221
|
...e ? { recaptchaToken: e } : {}
|
|
208
222
|
});
|
|
209
223
|
if (t.requiresMFA) {
|
|
210
|
-
let e =
|
|
224
|
+
let e = b(Z.current || X || (Le ?? "/dashboard"));
|
|
211
225
|
try {
|
|
212
|
-
sessionStorage.setItem(
|
|
226
|
+
sessionStorage.setItem(ae, e);
|
|
213
227
|
} catch {}
|
|
214
228
|
return;
|
|
215
229
|
}
|
|
@@ -225,14 +239,14 @@ function y() {
|
|
|
225
239
|
}
|
|
226
240
|
} catch {}
|
|
227
241
|
try {
|
|
228
|
-
|
|
242
|
+
W.rememberMe ? localStorage.setItem("remembered_email", n) : localStorage.removeItem("remembered_email");
|
|
229
243
|
} catch (e) {
|
|
230
244
|
console.warn("[LoginPage] Failed to save/clear remembered email:", e);
|
|
231
245
|
}
|
|
232
|
-
|
|
233
|
-
let e =
|
|
246
|
+
O(!0);
|
|
247
|
+
let e = b(Z.current || X || (Le ?? "/dashboard"));
|
|
234
248
|
try {
|
|
235
|
-
let n = await Promise.race([
|
|
249
|
+
let n = await Promise.race([Pe(t.token), new Promise((e) => {
|
|
236
250
|
window.setTimeout(() => {
|
|
237
251
|
e({
|
|
238
252
|
success: !1,
|
|
@@ -240,279 +254,279 @@ function y() {
|
|
|
240
254
|
});
|
|
241
255
|
}, 5e3);
|
|
242
256
|
})]);
|
|
243
|
-
n.success ? (n.workspace && (
|
|
257
|
+
n.success ? (n.workspace && (Fe(n.workspace.id), n.workspace.organizationId && Ie(n.workspace.organizationId)), j(e)) : n.error?.includes("No workspaces found") ? y("/onboarding/create-workspace") : (n.workspace && (Fe(n.workspace.id), n.workspace.organizationId && Ie(n.workspace.organizationId)), console.warn("Auth flow warning:", n.error), j(e));
|
|
244
258
|
} catch (t) {
|
|
245
|
-
console.error("Auth flow error (login succeeded):", t),
|
|
259
|
+
console.error("Auth flow error (login succeeded):", t), j(e);
|
|
246
260
|
} finally {
|
|
247
|
-
|
|
261
|
+
A.current || O(!1);
|
|
248
262
|
}
|
|
249
263
|
}
|
|
250
264
|
} catch (e) {
|
|
251
265
|
let n = e instanceof Error ? e.message : String(e);
|
|
252
|
-
n.includes("reCAPTCHA") &&
|
|
253
|
-
let r = t.getState().errorCode, i =
|
|
254
|
-
i === "DELETED" ?
|
|
266
|
+
n.includes("reCAPTCHA") && q(n);
|
|
267
|
+
let r = t.getState().errorCode, i = Qe(n, r);
|
|
268
|
+
i === "DELETED" ? F(!0) : i === "SUSPENDED" ? I(!0) : i === "OAUTH_ONLY" ? R(!0) : i === "INACTIVE" ? P(!0) : i === "EMAIL_NOT_VERIFIED" && B(!0);
|
|
255
269
|
}
|
|
256
270
|
};
|
|
257
|
-
|
|
258
|
-
if (
|
|
259
|
-
let e =
|
|
260
|
-
e === "DELETED" ?
|
|
271
|
+
d(() => {
|
|
272
|
+
if (w) {
|
|
273
|
+
let e = Qe(w, Me);
|
|
274
|
+
e === "DELETED" ? F(!0) : e === "SUSPENDED" ? I(!0) : e === "OAUTH_ONLY" ? R(!0) : e === "INACTIVE" ? P(!0) : e === "EMAIL_NOT_VERIFIED" && B(!0);
|
|
261
275
|
}
|
|
262
|
-
}, [
|
|
263
|
-
let
|
|
264
|
-
|
|
276
|
+
}, [w, Me]);
|
|
277
|
+
let et = () => {
|
|
278
|
+
H(null);
|
|
265
279
|
try {
|
|
266
|
-
|
|
280
|
+
Re();
|
|
267
281
|
} catch (e) {
|
|
268
|
-
|
|
282
|
+
H(e instanceof Error ? e.message : C("auth.login.googleSignInFailed", "Failed to initiate Google sign in"));
|
|
269
283
|
}
|
|
270
|
-
},
|
|
271
|
-
|
|
284
|
+
}, tt = () => {
|
|
285
|
+
H(null);
|
|
272
286
|
try {
|
|
273
|
-
|
|
287
|
+
ze();
|
|
274
288
|
} catch (e) {
|
|
275
|
-
|
|
289
|
+
H(e instanceof Error ? e.message : C("auth.login.microsoftSignInFailed", "Failed to initiate Microsoft sign in"));
|
|
276
290
|
}
|
|
277
|
-
},
|
|
278
|
-
|
|
291
|
+
}, nt = async () => {
|
|
292
|
+
qe(!0), V(!1);
|
|
279
293
|
try {
|
|
280
|
-
(await
|
|
294
|
+
(await Ne((W.email ?? "").trim())).success ? V(!0) : q(C("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
|
|
281
295
|
} catch (e) {
|
|
282
|
-
console.error("Failed to resend verification email:", e),
|
|
296
|
+
console.error("Failed to resend verification email:", e), q(e instanceof Error ? e.message : C("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
|
|
283
297
|
} finally {
|
|
284
|
-
|
|
298
|
+
qe(!1);
|
|
285
299
|
}
|
|
286
|
-
},
|
|
300
|
+
}, rt = T("google"), $ = T("microsoft"), it = [{
|
|
287
301
|
name: "Google",
|
|
288
|
-
icon:
|
|
289
|
-
onClick:
|
|
290
|
-
disabled: !
|
|
291
|
-
tooltip:
|
|
302
|
+
icon: ee,
|
|
303
|
+
onClick: et,
|
|
304
|
+
disabled: !rt,
|
|
305
|
+
tooltip: rt ? void 0 : C("auth.login.googleNotConfigured", "Google sign in is not configured")
|
|
292
306
|
}, {
|
|
293
307
|
name: "Microsoft",
|
|
294
|
-
icon:
|
|
295
|
-
onClick:
|
|
296
|
-
disabled:
|
|
297
|
-
tooltip:
|
|
308
|
+
icon: ne,
|
|
309
|
+
onClick: tt,
|
|
310
|
+
disabled: !$,
|
|
311
|
+
tooltip: $ ? void 0 : C("auth.login.microsoftNotConfigured", "Microsoft sign in is not configured")
|
|
298
312
|
}];
|
|
299
|
-
return
|
|
300
|
-
title:
|
|
301
|
-
subtitle:
|
|
313
|
+
return Ve ? /* @__PURE__ */ m(se, {}) : /* @__PURE__ */ h(a, {
|
|
314
|
+
title: C("auth.login.welcomeBack", "Welcome back"),
|
|
315
|
+
subtitle: C("auth.login.enterCredentials", "Enter your credentials to continue"),
|
|
302
316
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ m(Se, {
|
|
304
318
|
className: "mb-5",
|
|
305
|
-
children:
|
|
319
|
+
children: C("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.")
|
|
306
320
|
}),
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
-
onSubmit:
|
|
321
|
+
/* @__PURE__ */ h("form", {
|
|
322
|
+
onSubmit: $e,
|
|
309
323
|
className: "space-y-5",
|
|
310
324
|
children: [
|
|
311
|
-
|
|
325
|
+
Xe && /* @__PURE__ */ h("div", {
|
|
312
326
|
className: "flex items-start gap-3 p-4 rounded-xl border bg-status-info-bg-subtle border-status-info-border",
|
|
313
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ m("svg", {
|
|
314
328
|
className: "size-5 flex-shrink-0 mt-0.5 text-text-link",
|
|
315
329
|
fill: "none",
|
|
316
330
|
viewBox: "0 0 24 24",
|
|
317
331
|
stroke: "currentColor",
|
|
318
|
-
children: /* @__PURE__ */
|
|
332
|
+
children: /* @__PURE__ */ m("path", {
|
|
319
333
|
strokeLinecap: "round",
|
|
320
334
|
strokeLinejoin: "round",
|
|
321
335
|
strokeWidth: 2,
|
|
322
336
|
d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
323
337
|
})
|
|
324
|
-
}), /* @__PURE__ */
|
|
338
|
+
}), /* @__PURE__ */ m("p", {
|
|
325
339
|
className: "text-sm text-status-info-text",
|
|
326
|
-
children:
|
|
340
|
+
children: Xe
|
|
327
341
|
})]
|
|
328
342
|
}),
|
|
329
|
-
|
|
343
|
+
K && /* @__PURE__ */ h("div", {
|
|
330
344
|
className: "flex items-start gap-3 p-4 rounded-xl border bg-status-warning-bg-subtle border-status-warning-border",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
345
|
+
children: [/* @__PURE__ */ m(o, { className: "size-5 flex-shrink-0 mt-0.5 text-status-warning-text" }), /* @__PURE__ */ m("p", {
|
|
332
346
|
className: "text-sm text-status-warning-text",
|
|
333
|
-
children:
|
|
347
|
+
children: K
|
|
334
348
|
})]
|
|
335
349
|
}),
|
|
336
|
-
|
|
350
|
+
Ze && /* @__PURE__ */ h("div", {
|
|
337
351
|
className: "flex items-start gap-3 p-4 rounded-xl border bg-status-warning-bg-subtle border-status-warning-border",
|
|
338
|
-
children: [/* @__PURE__ */
|
|
352
|
+
children: [/* @__PURE__ */ m(o, { className: "size-5 flex-shrink-0 mt-0.5 text-status-warning-text" }), /* @__PURE__ */ h("div", {
|
|
339
353
|
className: "flex-1",
|
|
340
354
|
children: [
|
|
341
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ m("p", {
|
|
342
356
|
className: "text-sm font-medium text-status-warning-text",
|
|
343
|
-
children:
|
|
357
|
+
children: C("auth.login.duplicateAccount", "This account is already signed in.")
|
|
344
358
|
}),
|
|
345
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ m("p", {
|
|
346
360
|
className: "mt-1 text-sm text-status-warning-text/80",
|
|
347
|
-
children:
|
|
361
|
+
children: C("auth.login.duplicateAccountHint", "Please use a different account, or go back and switch to this account from the profile menu.")
|
|
348
362
|
}),
|
|
349
|
-
(
|
|
363
|
+
(Z.current || X) && /* @__PURE__ */ h("button", {
|
|
350
364
|
type: "button",
|
|
351
|
-
onClick: () =>
|
|
365
|
+
onClick: () => y(decodeURIComponent(Z.current || X || "/dashboard")),
|
|
352
366
|
className: "mt-3 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",
|
|
353
|
-
children: [/* @__PURE__ */
|
|
367
|
+
children: [/* @__PURE__ */ m("svg", {
|
|
354
368
|
className: "size-4",
|
|
355
369
|
fill: "none",
|
|
356
370
|
viewBox: "0 0 24 24",
|
|
357
371
|
stroke: "currentColor",
|
|
358
|
-
children: /* @__PURE__ */
|
|
372
|
+
children: /* @__PURE__ */ m("path", {
|
|
359
373
|
strokeLinecap: "round",
|
|
360
374
|
strokeLinejoin: "round",
|
|
361
375
|
strokeWidth: 2,
|
|
362
376
|
d: "M10 19l-7-7m0 0l7-7m-7 7h18"
|
|
363
377
|
})
|
|
364
|
-
}),
|
|
378
|
+
}), C("auth.login.goBackSwitchAccount", "Go back and switch account")]
|
|
365
379
|
})
|
|
366
380
|
]
|
|
367
381
|
})]
|
|
368
382
|
}),
|
|
369
|
-
|
|
370
|
-
className: `flex items-start gap-3 p-4 rounded-xl border ${
|
|
371
|
-
children: [/* @__PURE__ */
|
|
383
|
+
w && !K && !Ze && /* @__PURE__ */ h("div", {
|
|
384
|
+
className: `flex items-start gap-3 p-4 rounded-xl border ${N || L || z ? "bg-status-warning-bg-subtle border-status-warning-border" : "bg-status-error-bg-subtle border-status-error-border"}`,
|
|
385
|
+
children: [/* @__PURE__ */ m(o, { className: `size-5 flex-shrink-0 mt-0.5 ${N || L || z ? "text-status-warning-text" : "text-status-error-text"}` }), /* @__PURE__ */ h("div", {
|
|
372
386
|
className: "flex-1",
|
|
373
387
|
children: [
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
-
className: `text-sm ${
|
|
376
|
-
children:
|
|
388
|
+
/* @__PURE__ */ m("p", {
|
|
389
|
+
className: `text-sm ${N || L || z ? "text-status-warning-text" : "text-status-error-text"}`,
|
|
390
|
+
children: We ? C("auth.login.accountDeleted", "This account has been permanently deleted and cannot be recovered.") : Ge ? C("auth.login.accountSuspended", "Your account has been suspended. Please contact support for assistance.") : N ? C("auth.login.accountDeactivated", "Your account has been deactivated.") : L ? C("auth.login.oauthOnly", "This account uses OAuth sign-in. Please use Google or Microsoft to sign in.") : z ? C("auth.login.emailNotVerified", "Please verify your email before signing in. Check your inbox for the verification link.") : w
|
|
377
391
|
}),
|
|
378
|
-
|
|
392
|
+
N && /* @__PURE__ */ m("button", {
|
|
379
393
|
type: "button",
|
|
380
|
-
onClick: () =>
|
|
394
|
+
onClick: () => y("/auth/reactivate", { state: { email: W.email } }),
|
|
381
395
|
className: "mt-2 text-sm font-semibold text-status-warning-text hover:text-status-warning-text underline underline-offset-2",
|
|
382
|
-
children:
|
|
396
|
+
children: C("auth.login.clickReactivate", "Click here to reactivate your account")
|
|
383
397
|
}),
|
|
384
|
-
|
|
398
|
+
z && /* @__PURE__ */ m("div", {
|
|
385
399
|
className: "mt-3",
|
|
386
|
-
children:
|
|
400
|
+
children: Je ? /* @__PURE__ */ h("div", {
|
|
387
401
|
className: "flex items-center gap-2 text-sm text-status-success-text",
|
|
388
|
-
children: [/* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ m("svg", {
|
|
389
403
|
className: "size-4",
|
|
390
404
|
fill: "none",
|
|
391
405
|
viewBox: "0 0 24 24",
|
|
392
406
|
stroke: "currentColor",
|
|
393
|
-
children: /* @__PURE__ */
|
|
407
|
+
children: /* @__PURE__ */ m("path", {
|
|
394
408
|
strokeLinecap: "round",
|
|
395
409
|
strokeLinejoin: "round",
|
|
396
410
|
strokeWidth: 2,
|
|
397
411
|
d: "M5 13l4 4L19 7"
|
|
398
412
|
})
|
|
399
|
-
}),
|
|
400
|
-
}) : /* @__PURE__ */
|
|
413
|
+
}), C("auth.login.verificationSent", "Verification email sent! Please check your inbox.")]
|
|
414
|
+
}) : /* @__PURE__ */ m("button", {
|
|
401
415
|
type: "button",
|
|
402
|
-
onClick:
|
|
403
|
-
disabled:
|
|
416
|
+
onClick: nt,
|
|
417
|
+
disabled: Ke,
|
|
404
418
|
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",
|
|
405
|
-
children:
|
|
419
|
+
children: Ke ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(re, { className: "size-4 animate-spin" }), C("auth.login.sending", "Sending...")] }) : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("svg", {
|
|
406
420
|
className: "size-4",
|
|
407
421
|
fill: "none",
|
|
408
422
|
viewBox: "0 0 24 24",
|
|
409
423
|
stroke: "currentColor",
|
|
410
|
-
children: /* @__PURE__ */
|
|
424
|
+
children: /* @__PURE__ */ m("path", {
|
|
411
425
|
strokeLinecap: "round",
|
|
412
426
|
strokeLinejoin: "round",
|
|
413
427
|
strokeWidth: 2,
|
|
414
428
|
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"
|
|
415
429
|
})
|
|
416
|
-
}),
|
|
430
|
+
}), C("auth.login.resendVerification", "Resend verification email")] })
|
|
417
431
|
})
|
|
418
432
|
}),
|
|
419
|
-
|
|
433
|
+
L && /* @__PURE__ */ h("div", {
|
|
420
434
|
className: "mt-3 flex flex-col gap-2",
|
|
421
|
-
children: [
|
|
435
|
+
children: [T("google") && /* @__PURE__ */ h("button", {
|
|
422
436
|
type: "button",
|
|
423
|
-
onClick:
|
|
437
|
+
onClick: et,
|
|
424
438
|
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",
|
|
425
|
-
children: [/* @__PURE__ */
|
|
426
|
-
}),
|
|
439
|
+
children: [/* @__PURE__ */ m(ee, { className: "size-5" }), C("auth.login.signInWithGoogle", "Sign in with Google")]
|
|
440
|
+
}), T("microsoft") && /* @__PURE__ */ h("button", {
|
|
427
441
|
type: "button",
|
|
428
|
-
onClick:
|
|
442
|
+
onClick: tt,
|
|
429
443
|
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",
|
|
430
|
-
children: [/* @__PURE__ */
|
|
444
|
+
children: [/* @__PURE__ */ m(ne, { className: "size-5" }), C("auth.login.signInWithMicrosoft", "Sign in with Microsoft")]
|
|
431
445
|
})]
|
|
432
446
|
})
|
|
433
447
|
]
|
|
434
448
|
})]
|
|
435
449
|
}),
|
|
436
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ h("div", {
|
|
437
451
|
className: "space-y-2",
|
|
438
|
-
children: [/* @__PURE__ */
|
|
452
|
+
children: [/* @__PURE__ */ m("label", {
|
|
439
453
|
htmlFor: "email",
|
|
440
454
|
className: "block text-sm font-medium text-[var(--color-text-primary)]",
|
|
441
|
-
children:
|
|
442
|
-
}), /* @__PURE__ */
|
|
455
|
+
children: C("auth.login.emailLabel", "Email")
|
|
456
|
+
}), /* @__PURE__ */ h("div", {
|
|
443
457
|
className: "relative",
|
|
444
|
-
children: [/* @__PURE__ */
|
|
458
|
+
children: [/* @__PURE__ */ m("div", {
|
|
445
459
|
className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
|
|
446
|
-
children: /* @__PURE__ */
|
|
447
|
-
}), /* @__PURE__ */
|
|
460
|
+
children: /* @__PURE__ */ m(s, { className: "size-5 text-[var(--color-text-tertiary)]" })
|
|
461
|
+
}), /* @__PURE__ */ m("input", {
|
|
448
462
|
id: "email",
|
|
449
463
|
type: "email",
|
|
450
464
|
autoComplete: "email",
|
|
451
465
|
required: !0,
|
|
452
466
|
"aria-required": "true",
|
|
453
|
-
"aria-label":
|
|
454
|
-
value:
|
|
455
|
-
onChange: (e) =>
|
|
456
|
-
...
|
|
467
|
+
"aria-label": C("auth.login.emailLabel", "Email"),
|
|
468
|
+
value: W.email,
|
|
469
|
+
onChange: (e) => G({
|
|
470
|
+
...W,
|
|
457
471
|
email: e.target.value
|
|
458
472
|
}),
|
|
459
473
|
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",
|
|
460
|
-
placeholder:
|
|
474
|
+
placeholder: C("auth.login.emailPlaceholder", "you@example.com")
|
|
461
475
|
})]
|
|
462
476
|
})]
|
|
463
477
|
}),
|
|
464
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ h("div", {
|
|
465
479
|
className: "space-y-2",
|
|
466
|
-
children: [/* @__PURE__ */
|
|
480
|
+
children: [/* @__PURE__ */ m("label", {
|
|
467
481
|
htmlFor: "password",
|
|
468
482
|
className: "block text-sm font-medium text-[var(--color-text-primary)]",
|
|
469
|
-
children:
|
|
470
|
-
}), /* @__PURE__ */
|
|
483
|
+
children: C("auth.login.passwordLabel", "Password")
|
|
484
|
+
}), /* @__PURE__ */ h("div", {
|
|
471
485
|
className: "relative",
|
|
472
486
|
children: [
|
|
473
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ m("div", {
|
|
474
488
|
className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
|
|
475
|
-
children: /* @__PURE__ */
|
|
489
|
+
children: /* @__PURE__ */ m(te, { className: "size-5 text-[var(--color-text-tertiary)]" })
|
|
476
490
|
}),
|
|
477
|
-
/* @__PURE__ */
|
|
491
|
+
/* @__PURE__ */ m("input", {
|
|
478
492
|
id: "password",
|
|
479
|
-
type:
|
|
493
|
+
type: M ? "text" : "password",
|
|
480
494
|
autoComplete: "current-password",
|
|
481
495
|
required: !0,
|
|
482
496
|
"aria-required": "true",
|
|
483
|
-
"aria-label":
|
|
484
|
-
value:
|
|
485
|
-
onChange: (e) =>
|
|
486
|
-
...
|
|
497
|
+
"aria-label": C("auth.login.passwordLabel", "Password"),
|
|
498
|
+
value: W.password,
|
|
499
|
+
onChange: (e) => G({
|
|
500
|
+
...W,
|
|
487
501
|
password: e.target.value
|
|
488
502
|
}),
|
|
489
503
|
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",
|
|
490
|
-
placeholder:
|
|
504
|
+
placeholder: C("auth.login.passwordPlaceholder", "Enter your password")
|
|
491
505
|
}),
|
|
492
|
-
/* @__PURE__ */
|
|
506
|
+
/* @__PURE__ */ m("button", {
|
|
493
507
|
type: "button",
|
|
494
|
-
onClick: () =>
|
|
495
|
-
"aria-label":
|
|
508
|
+
onClick: () => Ue(!M),
|
|
509
|
+
"aria-label": M ? "Hide password" : "Show password",
|
|
496
510
|
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",
|
|
497
|
-
children:
|
|
511
|
+
children: m(M ? l : c, { className: "size-5" })
|
|
498
512
|
})
|
|
499
513
|
]
|
|
500
514
|
})]
|
|
501
515
|
}),
|
|
502
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ h("div", {
|
|
503
517
|
className: "flex items-center justify-between",
|
|
504
|
-
children: [/* @__PURE__ */
|
|
518
|
+
children: [/* @__PURE__ */ h("label", {
|
|
505
519
|
className: "flex items-center gap-2 cursor-pointer group",
|
|
506
|
-
children: [/* @__PURE__ */
|
|
520
|
+
children: [/* @__PURE__ */ h("div", {
|
|
507
521
|
className: "relative",
|
|
508
|
-
children: [/* @__PURE__ */
|
|
522
|
+
children: [/* @__PURE__ */ m("input", {
|
|
509
523
|
type: "checkbox",
|
|
510
|
-
"aria-label":
|
|
511
|
-
checked:
|
|
524
|
+
"aria-label": C("auth.login.rememberMe", "Remember me"),
|
|
525
|
+
checked: W.rememberMe,
|
|
512
526
|
onChange: (e) => {
|
|
513
527
|
let t = e.target.checked;
|
|
514
|
-
if (
|
|
515
|
-
...
|
|
528
|
+
if (G({
|
|
529
|
+
...W,
|
|
516
530
|
rememberMe: t
|
|
517
531
|
}), !t) try {
|
|
518
532
|
localStorage.removeItem("remembered_email");
|
|
@@ -521,103 +535,103 @@ function y() {
|
|
|
521
535
|
}
|
|
522
536
|
},
|
|
523
537
|
className: "sr-only peer"
|
|
524
|
-
}), /* @__PURE__ */
|
|
538
|
+
}), /* @__PURE__ */ m("div", {
|
|
525
539
|
className: "size-5 rounded-md border-2 border-[var(--color-border-default)] bg-[var(--color-bg-surface)] peer-checked:bg-status-info-bg-subtle0 peer-checked:border-action-primary-bg transition-all peer-focus:ring-2 peer-focus:ring-action-primary-bg/20",
|
|
526
|
-
children: /* @__PURE__ */
|
|
540
|
+
children: /* @__PURE__ */ m("svg", {
|
|
527
541
|
className: "size-full text-white opacity-0 peer-checked:opacity-100 transition-opacity p-0.5",
|
|
528
542
|
fill: "none",
|
|
529
543
|
viewBox: "0 0 24 24",
|
|
530
544
|
stroke: "currentColor",
|
|
531
545
|
strokeWidth: 3,
|
|
532
|
-
children: /* @__PURE__ */
|
|
546
|
+
children: /* @__PURE__ */ m("path", {
|
|
533
547
|
strokeLinecap: "round",
|
|
534
548
|
strokeLinejoin: "round",
|
|
535
549
|
d: "M5 13l4 4L19 7"
|
|
536
550
|
})
|
|
537
551
|
})
|
|
538
552
|
})]
|
|
539
|
-
}), /* @__PURE__ */
|
|
553
|
+
}), /* @__PURE__ */ m("span", {
|
|
540
554
|
className: "text-sm text-[var(--color-text-secondary)] group-hover:text-[var(--color-text-primary)] transition-colors",
|
|
541
|
-
children:
|
|
555
|
+
children: C("auth.login.rememberMe", "Remember me")
|
|
542
556
|
})]
|
|
543
|
-
}), /* @__PURE__ */
|
|
557
|
+
}), /* @__PURE__ */ m("button", {
|
|
544
558
|
type: "button",
|
|
545
|
-
onClick: () =>
|
|
559
|
+
onClick: () => y("/auth/reset-password"),
|
|
546
560
|
className: "text-sm font-medium text-text-link hover:text-text-linkHover transition-colors",
|
|
547
|
-
children:
|
|
561
|
+
children: C("auth.login.forgotPassword", "Forgot password?")
|
|
548
562
|
})]
|
|
549
563
|
}),
|
|
550
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ m(xe, {
|
|
551
565
|
type: "submit",
|
|
552
|
-
disabled:
|
|
566
|
+
disabled: je || D,
|
|
553
567
|
variant: "default",
|
|
554
568
|
size: "lg",
|
|
555
569
|
className: "w-full font-semibold",
|
|
556
|
-
children:
|
|
570
|
+
children: je || D ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(re, { className: "size-5 animate-spin" }), /* @__PURE__ */ m("span", { children: D ? C("auth.login.settingUpWorkspace", "Setting up workspace...") : C("auth.login.signingIn", "Signing in...") })] }) : C("auth.login.signIn", "Sign in")
|
|
557
571
|
})
|
|
558
572
|
]
|
|
559
573
|
}),
|
|
560
|
-
/* @__PURE__ */
|
|
574
|
+
/* @__PURE__ */ h("div", {
|
|
561
575
|
className: "relative my-8",
|
|
562
|
-
children: [/* @__PURE__ */
|
|
576
|
+
children: [/* @__PURE__ */ m("div", {
|
|
563
577
|
className: "absolute inset-0 flex items-center",
|
|
564
|
-
children: /* @__PURE__ */
|
|
565
|
-
}), /* @__PURE__ */
|
|
578
|
+
children: /* @__PURE__ */ m("div", { className: "w-full border-t border-[var(--color-border-default)]" })
|
|
579
|
+
}), /* @__PURE__ */ m("div", {
|
|
566
580
|
className: "relative flex justify-center",
|
|
567
|
-
children: /* @__PURE__ */
|
|
581
|
+
children: /* @__PURE__ */ m("span", {
|
|
568
582
|
className: "px-4 bg-[var(--color-bg-canvas)] text-sm text-[var(--color-text-tertiary)]",
|
|
569
|
-
children:
|
|
583
|
+
children: C("auth.login.orContinueWith", "or continue with")
|
|
570
584
|
})
|
|
571
585
|
})]
|
|
572
586
|
}),
|
|
573
|
-
|
|
587
|
+
Ye && /* @__PURE__ */ h("div", {
|
|
574
588
|
className: "flex items-start gap-3 p-4 rounded-xl border bg-status-error-bg-subtle border-status-error-border",
|
|
575
|
-
children: [/* @__PURE__ */
|
|
589
|
+
children: [/* @__PURE__ */ m(o, { className: "size-5 flex-shrink-0 mt-0.5 text-status-error-text" }), /* @__PURE__ */ m("p", {
|
|
576
590
|
className: "text-sm text-status-error-text",
|
|
577
|
-
children:
|
|
591
|
+
children: Ye
|
|
578
592
|
})]
|
|
579
593
|
}),
|
|
580
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ m("div", {
|
|
581
595
|
className: "grid grid-cols-3 gap-3",
|
|
582
|
-
children:
|
|
596
|
+
children: it.map((e) => /* @__PURE__ */ h("button", {
|
|
583
597
|
type: "button",
|
|
584
598
|
onClick: e.onClick,
|
|
585
599
|
disabled: e.disabled,
|
|
586
600
|
title: e.tooltip,
|
|
587
601
|
"aria-label": e.name,
|
|
588
602
|
className: `flex items-center justify-center gap-2 px-4 py-3 rounded-xl border transition-all duration-200 group ${e.disabled ? "border-[var(--color-border-subtle)] bg-[var(--color-bg-disabled)] cursor-not-allowed opacity-50" : "border-[var(--color-border-default)] bg-[var(--color-bg-surface)] hover:bg-[var(--color-bg-sunken)] hover:border-[var(--color-border-strong)]"}`,
|
|
589
|
-
children: [/* @__PURE__ */
|
|
603
|
+
children: [/* @__PURE__ */ m(e.icon, { className: `size-5 ${e.disabled ? "opacity-50" : ""}` }), /* @__PURE__ */ m("span", {
|
|
590
604
|
className: `sr-only sm:not-sr-only text-sm font-medium transition-colors hidden sm:inline ${e.disabled ? "text-[var(--color-text-disabled)]" : "text-[var(--color-text-secondary)] group-hover:text-[var(--color-text-primary)]"}`,
|
|
591
605
|
children: e.name
|
|
592
606
|
})]
|
|
593
607
|
}, e.name))
|
|
594
608
|
}),
|
|
595
|
-
/* @__PURE__ */
|
|
609
|
+
/* @__PURE__ */ m("div", {
|
|
596
610
|
className: "mt-4 text-center",
|
|
597
|
-
children: /* @__PURE__ */
|
|
611
|
+
children: /* @__PURE__ */ h("button", {
|
|
598
612
|
type: "button",
|
|
599
|
-
onClick: () =>
|
|
613
|
+
onClick: () => y("/auth/magic-link"),
|
|
600
614
|
className: "text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] transition-colors",
|
|
601
615
|
children: [
|
|
602
|
-
|
|
616
|
+
C("auth.login.preferPasswordless", "Prefer passwordless login?"),
|
|
603
617
|
" ",
|
|
604
|
-
/* @__PURE__ */
|
|
618
|
+
/* @__PURE__ */ m("span", {
|
|
605
619
|
className: "font-semibold text-text-link hover:text-text-linkHover",
|
|
606
|
-
children:
|
|
620
|
+
children: C("auth.login.signInMagicLink", "Sign in with Magic Link")
|
|
607
621
|
})
|
|
608
622
|
]
|
|
609
623
|
})
|
|
610
624
|
}),
|
|
611
|
-
/* @__PURE__ */
|
|
625
|
+
/* @__PURE__ */ h("p", {
|
|
612
626
|
className: "mt-6 text-center text-sm text-[var(--color-text-secondary)]",
|
|
613
627
|
children: [
|
|
614
|
-
|
|
628
|
+
C("auth.login.dontHaveAccount", "Don't have an account?"),
|
|
615
629
|
" ",
|
|
616
|
-
/* @__PURE__ */
|
|
630
|
+
/* @__PURE__ */ m("button", {
|
|
617
631
|
type: "button",
|
|
618
|
-
onClick: () =>
|
|
632
|
+
onClick: () => y("/auth/register"),
|
|
619
633
|
className: "font-semibold text-text-link hover:text-text-linkHover transition-colors",
|
|
620
|
-
children:
|
|
634
|
+
children: C("auth.login.signUp", "Sign up")
|
|
621
635
|
})
|
|
622
636
|
]
|
|
623
637
|
})
|
|
@@ -625,6 +639,6 @@ function y() {
|
|
|
625
639
|
});
|
|
626
640
|
}
|
|
627
641
|
//#endregion
|
|
628
|
-
export {
|
|
642
|
+
export { x as LoginPage };
|
|
629
643
|
|
|
630
644
|
//# sourceMappingURL=LoginPage.js.map
|