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