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