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