@burdenoff/microfe-auth 2026.830.1 → 2026.904.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/AuthRoot.js +43 -41
- package/dist/auth/AuthRoot.js.map +1 -1
- package/dist/auth/AuthRoutes.js +7 -0
- package/dist/auth/AuthRoutes.js.map +1 -1
- package/dist/auth/components/AuthLayout.js +65 -67
- package/dist/auth/components/AuthLayout.js.map +1 -1
- package/dist/auth/components/CaptchaV2.js +21 -24
- package/dist/auth/components/CaptchaV2.js.map +1 -1
- package/dist/auth/components/ConfirmActionDialog.js +33 -32
- package/dist/auth/components/ConfirmActionDialog.js.map +1 -1
- package/dist/auth/components/profile/UserProfileMenu.js +44 -46
- package/dist/auth/components/profile/UserProfileMenu.js.map +1 -1
- package/dist/auth/components/workspace/WorkspaceSelector.js +62 -68
- package/dist/auth/components/workspace/WorkspaceSelector.js.map +1 -1
- package/dist/auth/pages/AuditLogPage.js +65 -68
- package/dist/auth/pages/AuditLogPage.js.map +1 -1
- package/dist/auth/pages/EmailVerifyPage.js +51 -54
- package/dist/auth/pages/EmailVerifyPage.js.map +1 -1
- package/dist/auth/pages/LoginPage.js +223 -225
- package/dist/auth/pages/LoginPage.js.map +1 -1
- package/dist/auth/pages/MagicLinkPage.js +67 -69
- package/dist/auth/pages/MagicLinkPage.js.map +1 -1
- package/dist/auth/pages/MfaSetupPage.js +85 -88
- package/dist/auth/pages/MfaSetupPage.js.map +1 -1
- package/dist/auth/pages/MfaVerifyPage.js +60 -63
- package/dist/auth/pages/MfaVerifyPage.js.map +1 -1
- package/dist/auth/pages/OAuthCallbackPage.js +37 -40
- package/dist/auth/pages/OAuthCallbackPage.js.map +1 -1
- package/dist/auth/pages/PasswordResetPage.js +102 -105
- package/dist/auth/pages/PasswordResetPage.js.map +1 -1
- package/dist/auth/pages/ReactivatePage.js +54 -57
- package/dist/auth/pages/ReactivatePage.js.map +1 -1
- package/dist/auth/pages/RegisterPage.js +171 -174
- package/dist/auth/pages/RegisterPage.js.map +1 -1
- package/dist/auth/pages/SSOClearPage.js +21 -20
- package/dist/auth/pages/SSOClearPage.js.map +1 -1
- package/dist/auth/pages/SSODepositPage.js +27 -26
- package/dist/auth/pages/SSODepositPage.js.map +1 -1
- package/dist/auth/pages/SSORelayCallbackPage.js +19 -18
- package/dist/auth/pages/SSORelayCallbackPage.js.map +1 -1
- package/dist/auth/pages/SecurityPage.js +247 -250
- package/dist/auth/pages/SecurityPage.js.map +1 -1
- package/dist/auth/pages/SessionsPage.js +95 -98
- package/dist/auth/pages/SessionsPage.js.map +1 -1
- package/dist/auth/pages/SsoCallbackPage.js +53 -56
- package/dist/auth/pages/SsoCallbackPage.js.map +1 -1
- package/dist/auth/pages/SsoConfigPage.js +296 -299
- package/dist/auth/pages/SsoConfigPage.js.map +1 -1
- package/dist/auth/pages/SsoLoginPage.js +65 -68
- package/dist/auth/pages/SsoLoginPage.js.map +1 -1
- package/dist/auth/pages/UserDetailsPage.js +124 -127
- package/dist/auth/pages/UserDetailsPage.js.map +1 -1
- package/dist/auth/pages/UserProfilePage.js +171 -174
- package/dist/auth/pages/UserProfilePage.js.map +1 -1
- package/dist/auth/pages/UsersPage.js +322 -325
- package/dist/auth/pages/UsersPage.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/shared/hooks/index.d.ts +1 -6
- package/dist/shared/hooks/useTr.d.ts +16 -0
- package/dist/shared/hooks/useTr.js +14 -0
- package/dist/shared/hooks/useTr.js.map +1 -0
- package/dist/translations/en.d.ts +806 -248
- package/dist/translations/en.js +870 -0
- package/dist/translations/en.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { useTr as e } from "../../shared/hooks/useTr.js";
|
|
2
|
+
import { AuthLayout as t } from "../components/AuthLayout.js";
|
|
3
|
+
import { AlertIcon as n, EmailIcon as r, LockIcon as i, SpinnerIcon as a } from "../components/AuthIcons.js";
|
|
4
|
+
import { useAccountOperations as o } from "../hooks/useAccountOperations.js";
|
|
5
|
+
import { useEffect as s, useState as c } from "react";
|
|
6
|
+
import { useLocation as l, useNavigate as u } from "react-router";
|
|
7
7
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
8
8
|
import { Button as m } from "@burdenoff/fe-libs/button";
|
|
9
9
|
import { PagePurpose as h } from "@burdenoff/fe-libs/ui";
|
|
10
10
|
//#region src/auth/pages/ReactivatePage.tsx
|
|
11
11
|
function g() {
|
|
12
|
-
let {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}, [S]), k ? /* @__PURE__ */ f(e, {
|
|
19
|
-
title: _("auth.reactivate.successTitle", "Account Reactivated!"),
|
|
20
|
-
subtitle: _("auth.reactivate.successSubtitle", "Welcome back"),
|
|
12
|
+
let g = e(), _ = u(), v = l(), { reactivateAccount: y, isReactivating: b } = o(), x = v.state?.email || "", [S, C] = c(x), [w, T] = c(""), [E, D] = c(null), [O, k] = c(!1);
|
|
13
|
+
return s(() => {
|
|
14
|
+
x && C(x);
|
|
15
|
+
}, [x]), O ? /* @__PURE__ */ f(t, {
|
|
16
|
+
title: g("auth.reactivate.successTitle", "Account Reactivated!"),
|
|
17
|
+
subtitle: g("auth.reactivate.successSubtitle", "Welcome back"),
|
|
21
18
|
children: /* @__PURE__ */ p("div", {
|
|
22
19
|
className: "text-center py-8",
|
|
23
20
|
children: [
|
|
@@ -38,50 +35,50 @@ function g() {
|
|
|
38
35
|
}),
|
|
39
36
|
/* @__PURE__ */ f("h2", {
|
|
40
37
|
className: "text-xl font-semibold text-[var(--color-text-primary)] mb-2",
|
|
41
|
-
children:
|
|
38
|
+
children: g("auth.reactivate.accountActive", "Your account is now active")
|
|
42
39
|
}),
|
|
43
40
|
/* @__PURE__ */ f("p", {
|
|
44
41
|
className: "text-[var(--color-text-secondary)] mb-6",
|
|
45
|
-
children:
|
|
42
|
+
children: g("auth.reactivate.redirecting", "You can now access all features. Redirecting to dashboard...")
|
|
46
43
|
}),
|
|
47
44
|
/* @__PURE__ */ f("div", {
|
|
48
45
|
className: "flex justify-center",
|
|
49
|
-
children: /* @__PURE__ */ f(
|
|
46
|
+
children: /* @__PURE__ */ f(a, { className: "size-6 text-status-success-text animate-spin" })
|
|
50
47
|
})
|
|
51
48
|
]
|
|
52
49
|
})
|
|
53
|
-
}) : /* @__PURE__ */ p(
|
|
54
|
-
title:
|
|
55
|
-
subtitle:
|
|
50
|
+
}) : /* @__PURE__ */ p(t, {
|
|
51
|
+
title: g("auth.reactivate.title", "Reactivate Account"),
|
|
52
|
+
subtitle: g("auth.reactivate.subtitle", "Restore access to your deactivated account"),
|
|
56
53
|
children: [
|
|
57
54
|
/* @__PURE__ */ f(h, {
|
|
58
55
|
className: "mb-5",
|
|
59
|
-
children:
|
|
56
|
+
children: g("auth.reactivate.purpose", "Reactivate an account you previously deactivated. Confirm your email and password to restore full access — deleted accounts can't be recovered here.")
|
|
60
57
|
}),
|
|
61
58
|
/* @__PURE__ */ p("form", {
|
|
62
59
|
onSubmit: async (e) => {
|
|
63
|
-
if (e.preventDefault(),
|
|
64
|
-
|
|
60
|
+
if (e.preventDefault(), D(null), !S || !w) {
|
|
61
|
+
D(g("auth.reactivate.enterBoth", "Please enter both email and password"));
|
|
65
62
|
return;
|
|
66
63
|
}
|
|
67
64
|
try {
|
|
68
|
-
let e = await
|
|
69
|
-
e.success ? (
|
|
70
|
-
|
|
71
|
-
}, 2e3)) :
|
|
65
|
+
let e = await y(S, w);
|
|
66
|
+
e.success ? (k(!0), setTimeout(() => {
|
|
67
|
+
_("/dashboard", { replace: !0 });
|
|
68
|
+
}, 2e3)) : D(e.error || g("auth.reactivate.failed", "Failed to reactivate account"));
|
|
72
69
|
} catch (e) {
|
|
73
|
-
console.error("Reactivation error:", e),
|
|
70
|
+
console.error("Reactivation error:", e), D(e instanceof Error ? e.message : g("auth.reactivate.unexpectedError", "An unexpected error occurred"));
|
|
74
71
|
}
|
|
75
72
|
},
|
|
76
73
|
className: "space-y-5",
|
|
77
74
|
children: [
|
|
78
|
-
|
|
75
|
+
E && /* @__PURE__ */ p("div", {
|
|
79
76
|
className: "flex items-start gap-3 p-4 rounded-xl bg-[var(--color-status-error-bg-subtle)] border border-[var(--color-status-error-border)]",
|
|
80
|
-
children: [/* @__PURE__ */ f(
|
|
77
|
+
children: [/* @__PURE__ */ f(n, { className: "size-5 text-[var(--color-status-error-text)] flex-shrink-0 mt-0.5" }), /* @__PURE__ */ f("div", {
|
|
81
78
|
className: "flex-1",
|
|
82
79
|
children: /* @__PURE__ */ f("p", {
|
|
83
80
|
className: "text-sm text-[var(--color-status-error-text)]",
|
|
84
|
-
children:
|
|
81
|
+
children: E
|
|
85
82
|
})
|
|
86
83
|
})]
|
|
87
84
|
}),
|
|
@@ -102,10 +99,10 @@ function g() {
|
|
|
102
99
|
})
|
|
103
100
|
}), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
104
101
|
className: "text-sm text-[var(--color-status-warning-text)] font-medium",
|
|
105
|
-
children:
|
|
102
|
+
children: g("auth.reactivate.deactivated", "Account Deactivated?")
|
|
106
103
|
}), /* @__PURE__ */ f("p", {
|
|
107
104
|
className: "text-xs text-[var(--color-status-warning-text)] mt-1",
|
|
108
|
-
children:
|
|
105
|
+
children: g("auth.reactivate.instructions", "If you previously deactivated your account, you can restore it here. Enter your email and password to reactivate.")
|
|
109
106
|
})] })]
|
|
110
107
|
})
|
|
111
108
|
}),
|
|
@@ -114,21 +111,21 @@ function g() {
|
|
|
114
111
|
children: [/* @__PURE__ */ f("label", {
|
|
115
112
|
htmlFor: "email",
|
|
116
113
|
className: "block text-sm font-medium text-[var(--color-text-primary)]",
|
|
117
|
-
children:
|
|
114
|
+
children: g("auth.reactivate.emailLabel", "Email Address")
|
|
118
115
|
}), /* @__PURE__ */ p("div", {
|
|
119
116
|
className: "relative",
|
|
120
117
|
children: [/* @__PURE__ */ f("div", {
|
|
121
118
|
className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
|
|
122
|
-
children: /* @__PURE__ */ f(
|
|
119
|
+
children: /* @__PURE__ */ f(r, { className: "size-5 text-[var(--color-text-tertiary)]" })
|
|
123
120
|
}), /* @__PURE__ */ f("input", {
|
|
124
121
|
id: "email",
|
|
125
122
|
type: "email",
|
|
126
123
|
required: !0,
|
|
127
|
-
"aria-label":
|
|
128
|
-
value:
|
|
129
|
-
onChange: (e) =>
|
|
124
|
+
"aria-label": g("auth.reactivate.emailLabel", "Email Address"),
|
|
125
|
+
value: S,
|
|
126
|
+
onChange: (e) => C(e.target.value),
|
|
130
127
|
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-status-success-bg/20 focus:border-status-success-border transition-all",
|
|
131
|
-
placeholder: "you@example.com"
|
|
128
|
+
placeholder: g("auth.reactivate.emailPlaceholder", "you@example.com")
|
|
132
129
|
})]
|
|
133
130
|
})]
|
|
134
131
|
}),
|
|
@@ -137,31 +134,31 @@ function g() {
|
|
|
137
134
|
children: [/* @__PURE__ */ f("label", {
|
|
138
135
|
htmlFor: "password",
|
|
139
136
|
className: "block text-sm font-medium text-[var(--color-text-primary)]",
|
|
140
|
-
children:
|
|
137
|
+
children: g("auth.reactivate.passwordLabel", "Password")
|
|
141
138
|
}), /* @__PURE__ */ p("div", {
|
|
142
139
|
className: "relative",
|
|
143
140
|
children: [/* @__PURE__ */ f("div", {
|
|
144
141
|
className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
|
|
145
|
-
children: /* @__PURE__ */ f(
|
|
142
|
+
children: /* @__PURE__ */ f(i, { className: "size-5 text-[var(--color-text-tertiary)]" })
|
|
146
143
|
}), /* @__PURE__ */ f("input", {
|
|
147
144
|
id: "password",
|
|
148
145
|
type: "password",
|
|
149
146
|
required: !0,
|
|
150
|
-
"aria-label":
|
|
151
|
-
value:
|
|
152
|
-
onChange: (e) =>
|
|
147
|
+
"aria-label": g("auth.reactivate.passwordLabel", "Password"),
|
|
148
|
+
value: w,
|
|
149
|
+
onChange: (e) => T(e.target.value),
|
|
153
150
|
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-status-success-bg/20 focus:border-status-success-border transition-all",
|
|
154
|
-
placeholder:
|
|
151
|
+
placeholder: g("auth.reactivate.passwordPlaceholder", "Enter your password")
|
|
155
152
|
})]
|
|
156
153
|
})]
|
|
157
154
|
}),
|
|
158
155
|
/* @__PURE__ */ f(m, {
|
|
159
156
|
type: "submit",
|
|
160
|
-
disabled:
|
|
157
|
+
disabled: b || !S || !w,
|
|
161
158
|
variant: "default",
|
|
162
159
|
size: "lg",
|
|
163
160
|
className: "w-full font-semibold",
|
|
164
|
-
children:
|
|
161
|
+
children: b ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(a, { className: "size-5 animate-spin" }), /* @__PURE__ */ f("span", { children: g("auth.reactivate.reactivating", "Reactivating…") })] }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("svg", {
|
|
165
162
|
className: "size-5",
|
|
166
163
|
fill: "none",
|
|
167
164
|
viewBox: "0 0 24 24",
|
|
@@ -172,7 +169,7 @@ function g() {
|
|
|
172
169
|
strokeWidth: 2,
|
|
173
170
|
d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
|
|
174
171
|
})
|
|
175
|
-
}), /* @__PURE__ */ f("span", { children:
|
|
172
|
+
}), /* @__PURE__ */ f("span", { children: g("auth.reactivate.reactivateBtn", "Reactivate Account") })] })
|
|
176
173
|
})
|
|
177
174
|
]
|
|
178
175
|
}),
|
|
@@ -182,14 +179,14 @@ function g() {
|
|
|
182
179
|
className: "text-center",
|
|
183
180
|
children: /* @__PURE__ */ p("button", {
|
|
184
181
|
type: "button",
|
|
185
|
-
onClick: () =>
|
|
182
|
+
onClick: () => _("/auth/login"),
|
|
186
183
|
className: "text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] transition-colors",
|
|
187
184
|
children: [
|
|
188
|
-
|
|
185
|
+
g("auth.reactivate.accountIsActive", "Remember your account is active?"),
|
|
189
186
|
" ",
|
|
190
187
|
/* @__PURE__ */ f("span", {
|
|
191
188
|
className: "font-semibold text-text-link hover:text-text-linkHover",
|
|
192
|
-
children:
|
|
189
|
+
children: g("auth.reactivate.signInInstead", "Sign in instead")
|
|
193
190
|
})
|
|
194
191
|
]
|
|
195
192
|
})
|
|
@@ -197,14 +194,14 @@ function g() {
|
|
|
197
194
|
className: "text-center",
|
|
198
195
|
children: /* @__PURE__ */ p("button", {
|
|
199
196
|
type: "button",
|
|
200
|
-
onClick: () =>
|
|
197
|
+
onClick: () => _("/auth/reset-password"),
|
|
201
198
|
className: "text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] transition-colors",
|
|
202
199
|
children: [
|
|
203
|
-
|
|
200
|
+
g("auth.reactivate.forgotPassword", "Forgot your password?"),
|
|
204
201
|
" ",
|
|
205
202
|
/* @__PURE__ */ f("span", {
|
|
206
203
|
className: "font-semibold text-accent-purple hover:text-accent-purple",
|
|
207
|
-
children:
|
|
204
|
+
children: g("auth.reactivate.resetIt", "Reset it")
|
|
208
205
|
})
|
|
209
206
|
]
|
|
210
207
|
})
|
|
@@ -214,10 +211,10 @@ function g() {
|
|
|
214
211
|
className: "mt-6 p-4 rounded-xl bg-[var(--color-bg-muted)] border border-[var(--color-border-default)]",
|
|
215
212
|
children: [/* @__PURE__ */ f("h4", {
|
|
216
213
|
className: "text-sm font-medium text-[var(--color-text-primary)] mb-2",
|
|
217
|
-
children:
|
|
214
|
+
children: g("auth.reactivate.cantReactivate", "Can't reactivate your account?")
|
|
218
215
|
}), /* @__PURE__ */ f("p", {
|
|
219
216
|
className: "text-xs text-[var(--color-text-secondary)]",
|
|
220
|
-
children:
|
|
217
|
+
children: g("auth.reactivate.deletedHelp", "If your account was deleted (not just deactivated), it cannot be restored. Contact support if you believe this is an error.")
|
|
221
218
|
})]
|
|
222
219
|
})
|
|
223
220
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactivatePage.js","names":[],"sources":["../../../src/auth/pages/ReactivatePage.tsx"],"sourcesContent":["import { useState, useEffect } from \"react\";\nimport { useI18n } from \"@burdenoff/fe-libs/shared/providers/shell\";\nimport { useNavigate, useLocation } from \"react-router\";\nimport { useAccountOperations } from \"../hooks/useAccountOperations\";\nimport { AuthLayout } from \"../components/AuthLayout\";\nimport { Button } from \"@burdenoff/fe-libs/button\";\nimport { PagePurpose } from \"@burdenoff/fe-libs/ui\";\nimport {\n EmailIcon,\n LockIcon,\n SpinnerIcon,\n AlertIcon,\n} from \"../components/AuthIcons\";\n\n/**\n * Account Reactivation Page\n * Allows users to reactivate their deactivated accounts\n */\nexport function ReactivatePage() {\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const translated = t(key);\n return translated === key ? fallback : translated;\n };\n\n const navigate = useNavigate();\n const location = useLocation();\n const { reactivateAccount, isReactivating } = useAccountOperations();\n\n // Get email from navigation state (passed from login page)\n const emailFromState = (location.state as { email?: string })?.email || \"\";\n\n const [email, setEmail] = useState(emailFromState);\n const [password, setPassword] = useState(\"\");\n const [error, setError] = useState<string | null>(null);\n const [success, setSuccess] = useState(false);\n\n // Update email if passed from login page\n useEffect(() => {\n if (emailFromState) {\n setEmail(emailFromState);\n }\n }, [emailFromState]);\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n setError(null);\n\n if (!email || !password) {\n setError(\n tr(\"auth.reactivate.enterBoth\", \"Please enter both email and password\"),\n );\n return;\n }\n\n try {\n const result = await reactivateAccount(email, password);\n\n if (result.success) {\n setSuccess(true);\n // Redirect to dashboard after short delay\n setTimeout(() => {\n navigate(\"/dashboard\", { replace: true });\n }, 2000);\n } else {\n setError(result.error || \"Failed to reactivate account\");\n }\n } catch (err) {\n console.error(\"Reactivation error:\", err);\n setError(\n err instanceof Error ? err.message : \"An unexpected error occurred\",\n );\n }\n };\n\n if (success) {\n return (\n <AuthLayout\n title={tr(\"auth.reactivate.successTitle\", \"Account Reactivated!\")}\n subtitle={tr(\"auth.reactivate.successSubtitle\", \"Welcome back\")}\n >\n <div className=\"text-center py-8\">\n <div className=\"size-20 mx-auto mb-6 rounded-full bg-[var(--color-status-success-bg-subtle)] flex items-center justify-center\">\n <svg\n className=\"size-10 text-[var(--color-status-success-text)]\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M5 13l4 4L19 7\"\n />\n </svg>\n </div>\n\n <h2 className=\"text-xl font-semibold text-[var(--color-text-primary)] mb-2\">\n {tr(\"auth.reactivate.accountActive\", \"Your account is now active\")}\n </h2>\n <p className=\"text-[var(--color-text-secondary)] mb-6\">\n {tr(\n \"auth.reactivate.redirecting\",\n \"You can now access all features. Redirecting to dashboard...\",\n )}\n </p>\n\n <div className=\"flex justify-center\">\n <SpinnerIcon className=\"size-6 text-status-success-text animate-spin\" />\n </div>\n </div>\n </AuthLayout>\n );\n }\n\n return (\n <AuthLayout\n title={tr(\"auth.reactivate.title\", \"Reactivate Account\")}\n subtitle={tr(\n \"auth.reactivate.subtitle\",\n \"Restore access to your deactivated account\",\n )}\n >\n <PagePurpose className=\"mb-5\">\n {tr(\n \"auth.reactivate.purpose\",\n \"Reactivate an account you previously deactivated. Confirm your email and password to restore full access — deleted accounts can't be recovered here.\",\n )}\n </PagePurpose>\n <form onSubmit={handleSubmit} className=\"space-y-5\">\n {/* Error Alert */}\n {error && (\n <div className=\"flex items-start gap-3 p-4 rounded-xl bg-[var(--color-status-error-bg-subtle)] border border-[var(--color-status-error-border)]\">\n <AlertIcon className=\"size-5 text-[var(--color-status-error-text)] flex-shrink-0 mt-0.5\" />\n <div className=\"flex-1\">\n <p className=\"text-sm text-[var(--color-status-error-text)]\">\n {error}\n </p>\n </div>\n </div>\n )}\n\n {/* Info Banner */}\n <div className=\"p-4 rounded-xl bg-[var(--color-status-warning-bg-subtle)] border border-[var(--color-status-warning-border)]\">\n <div className=\"flex items-start gap-3\">\n <svg\n className=\"size-5 text-[var(--color-status-warning-text)] flex-shrink-0 mt-0.5\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n <div>\n <p className=\"text-sm text-[var(--color-status-warning-text)] font-medium\">\n {tr(\"auth.reactivate.deactivated\", \"Account Deactivated?\")}\n </p>\n <p className=\"text-xs text-[var(--color-status-warning-text)] mt-1\">\n {tr(\n \"auth.reactivate.instructions\",\n \"If you previously deactivated your account, you can restore it here. Enter your email and password to reactivate.\",\n )}\n </p>\n </div>\n </div>\n </div>\n\n {/* Email Input */}\n <div className=\"space-y-2\">\n <label\n htmlFor=\"email\"\n className=\"block text-sm font-medium text-[var(--color-text-primary)]\"\n >\n {tr(\"auth.reactivate.emailLabel\", \"Email Address\")}\n </label>\n <div className=\"relative\">\n <div className=\"absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none\">\n <EmailIcon className=\"size-5 text-[var(--color-text-tertiary)]\" />\n </div>\n <input\n id=\"email\"\n type=\"email\"\n required\n aria-label={tr(\"auth.reactivate.emailLabel\", \"Email Address\")}\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n 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-status-success-bg/20 focus:border-status-success-border transition-all\"\n placeholder=\"you@example.com\"\n />\n </div>\n </div>\n\n {/* Password Input */}\n <div className=\"space-y-2\">\n <label\n htmlFor=\"password\"\n className=\"block text-sm font-medium text-[var(--color-text-primary)]\"\n >\n {tr(\"auth.reactivate.passwordLabel\", \"Password\")}\n </label>\n <div className=\"relative\">\n <div className=\"absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none\">\n <LockIcon className=\"size-5 text-[var(--color-text-tertiary)]\" />\n </div>\n <input\n id=\"password\"\n type=\"password\"\n required\n aria-label={tr(\"auth.reactivate.passwordLabel\", \"Password\")}\n value={password}\n onChange={(e) => setPassword(e.target.value)}\n 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-status-success-bg/20 focus:border-status-success-border transition-all\"\n placeholder={tr(\n \"auth.reactivate.passwordPlaceholder\",\n \"Enter your password\",\n )}\n />\n </div>\n </div>\n\n {/* Submit Button */}\n <Button\n type=\"submit\"\n disabled={isReactivating || !email || !password}\n variant=\"default\"\n size=\"lg\"\n className=\"w-full font-semibold\"\n >\n {isReactivating ? (\n <>\n <SpinnerIcon className=\"size-5 animate-spin\" />\n <span>Reactivating…</span>\n </>\n ) : (\n <>\n <svg\n className=\"size-5\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15\"\n />\n </svg>\n <span>\n {tr(\"auth.reactivate.reactivateBtn\", \"Reactivate Account\")}\n </span>\n </>\n )}\n </Button>\n </form>\n\n {/* Links */}\n <div className=\"mt-8 pt-6 border-t border-[var(--color-border-default)] space-y-4\">\n <div className=\"text-center\">\n <button\n type=\"button\"\n onClick={() => navigate(\"/auth/login\")}\n className=\"text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] transition-colors\"\n >\n {tr(\n \"auth.reactivate.accountIsActive\",\n \"Remember your account is active?\",\n )}{\" \"}\n <span className=\"font-semibold text-text-link hover:text-text-linkHover\">\n {tr(\"auth.reactivate.signInInstead\", \"Sign in instead\")}\n </span>\n </button>\n </div>\n\n <div className=\"text-center\">\n <button\n type=\"button\"\n onClick={() => navigate(\"/auth/reset-password\")}\n className=\"text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] transition-colors\"\n >\n {tr(\"auth.reactivate.forgotPassword\", \"Forgot your password?\")}{\" \"}\n <span className=\"font-semibold text-accent-purple hover:text-accent-purple\">\n {tr(\"auth.reactivate.resetIt\", \"Reset it\")}\n </span>\n </button>\n </div>\n </div>\n\n {/* Help Text */}\n <div className=\"mt-6 p-4 rounded-xl bg-[var(--color-bg-muted)] border border-[var(--color-border-default)]\">\n <h4 className=\"text-sm font-medium text-[var(--color-text-primary)] mb-2\">\n {tr(\n \"auth.reactivate.cantReactivate\",\n \"Can't reactivate your account?\",\n )}\n </h4>\n <p className=\"text-xs text-[var(--color-text-secondary)]\">\n {tr(\n \"auth.reactivate.deletedHelp\",\n \"If your account was deleted (not just deactivated), it cannot be restored. Contact support if you believe this is an error.\",\n )}\n </p>\n </div>\n </AuthLayout>\n );\n}\n"],"mappings":";;;;;;;;;;AAkBA,SAAgB,IAAiB;CAC/B,IAAM,EAA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b,kBAAC,UAAD;MACE,MAAK;MACL,eAAe,EAAS,cAAc;MACtC,WAAU;gBAHZ;OAKG,EACC,mCACA,mCACD;OAAE;OACH,kBAAC,QAAD;QAAM,WAAU;kBACb,EAAG,iCAAiC,kBAAkB;QAClD,CAAA;OACA;;KACL,CAAA,EAEN,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,UAAD;MACE,MAAK;MACL,eAAe,EAAS,uBAAuB;MAC/C,WAAU;gBAHZ;OAKG,EAAG,kCAAkC,wBAAwB;OAAE;OAChE,kBAAC,QAAD;QAAM,WAAU;kBACb,EAAG,2BAA2B,WAAW;QACrC,CAAA;OACA;;KACL,CAAA,CACF;;GAGN,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,MAAD;KAAI,WAAU;eACX,EACC,kCACA,iCACD;KACE,CAAA,EACL,kBAAC,KAAD;KAAG,WAAU;eACV,EACC,+BACA,8HACD;KACC,CAAA,CACA;;GACK"}
|
|
1
|
+
{"version":3,"file":"ReactivatePage.js","names":[],"sources":["../../../src/auth/pages/ReactivatePage.tsx"],"sourcesContent":["import { useState, useEffect } from \"react\";\nimport { useTr } from \"../../shared/hooks/useTr\";\nimport { useNavigate, useLocation } from \"react-router\";\nimport { useAccountOperations } from \"../hooks/useAccountOperations\";\nimport { AuthLayout } from \"../components/AuthLayout\";\nimport { Button } from \"@burdenoff/fe-libs/button\";\nimport { PagePurpose } from \"@burdenoff/fe-libs/ui\";\nimport {\n EmailIcon,\n LockIcon,\n SpinnerIcon,\n AlertIcon,\n} from \"../components/AuthIcons\";\n\n/**\n * Account Reactivation Page\n * Allows users to reactivate their deactivated accounts\n */\nexport function ReactivatePage() {\n const tr = useTr();\n\n const navigate = useNavigate();\n const location = useLocation();\n const { reactivateAccount, isReactivating } = useAccountOperations();\n\n // Get email from navigation state (passed from login page)\n const emailFromState = (location.state as { email?: string })?.email || \"\";\n\n const [email, setEmail] = useState(emailFromState);\n const [password, setPassword] = useState(\"\");\n const [error, setError] = useState<string | null>(null);\n const [success, setSuccess] = useState(false);\n\n // Update email if passed from login page\n useEffect(() => {\n if (emailFromState) {\n setEmail(emailFromState);\n }\n }, [emailFromState]);\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n setError(null);\n\n if (!email || !password) {\n setError(\n tr(\"auth.reactivate.enterBoth\", \"Please enter both email and password\"),\n );\n return;\n }\n\n try {\n const result = await reactivateAccount(email, password);\n\n if (result.success) {\n setSuccess(true);\n // Redirect to dashboard after short delay\n setTimeout(() => {\n navigate(\"/dashboard\", { replace: true });\n }, 2000);\n } else {\n setError(\n result.error ||\n tr(\"auth.reactivate.failed\", \"Failed to reactivate account\"),\n );\n }\n } catch (err) {\n console.error(\"Reactivation error:\", err);\n setError(\n err instanceof Error\n ? err.message\n : tr(\n \"auth.reactivate.unexpectedError\",\n \"An unexpected error occurred\",\n ),\n );\n }\n };\n\n if (success) {\n return (\n <AuthLayout\n title={tr(\"auth.reactivate.successTitle\", \"Account Reactivated!\")}\n subtitle={tr(\"auth.reactivate.successSubtitle\", \"Welcome back\")}\n >\n <div className=\"text-center py-8\">\n <div className=\"size-20 mx-auto mb-6 rounded-full bg-[var(--color-status-success-bg-subtle)] flex items-center justify-center\">\n <svg\n className=\"size-10 text-[var(--color-status-success-text)]\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M5 13l4 4L19 7\"\n />\n </svg>\n </div>\n\n <h2 className=\"text-xl font-semibold text-[var(--color-text-primary)] mb-2\">\n {tr(\"auth.reactivate.accountActive\", \"Your account is now active\")}\n </h2>\n <p className=\"text-[var(--color-text-secondary)] mb-6\">\n {tr(\n \"auth.reactivate.redirecting\",\n \"You can now access all features. Redirecting to dashboard...\",\n )}\n </p>\n\n <div className=\"flex justify-center\">\n <SpinnerIcon className=\"size-6 text-status-success-text animate-spin\" />\n </div>\n </div>\n </AuthLayout>\n );\n }\n\n return (\n <AuthLayout\n title={tr(\"auth.reactivate.title\", \"Reactivate Account\")}\n subtitle={tr(\n \"auth.reactivate.subtitle\",\n \"Restore access to your deactivated account\",\n )}\n >\n <PagePurpose className=\"mb-5\">\n {tr(\n \"auth.reactivate.purpose\",\n \"Reactivate an account you previously deactivated. Confirm your email and password to restore full access — deleted accounts can't be recovered here.\",\n )}\n </PagePurpose>\n <form onSubmit={handleSubmit} className=\"space-y-5\">\n {/* Error Alert */}\n {error && (\n <div className=\"flex items-start gap-3 p-4 rounded-xl bg-[var(--color-status-error-bg-subtle)] border border-[var(--color-status-error-border)]\">\n <AlertIcon className=\"size-5 text-[var(--color-status-error-text)] flex-shrink-0 mt-0.5\" />\n <div className=\"flex-1\">\n <p className=\"text-sm text-[var(--color-status-error-text)]\">\n {error}\n </p>\n </div>\n </div>\n )}\n\n {/* Info Banner */}\n <div className=\"p-4 rounded-xl bg-[var(--color-status-warning-bg-subtle)] border border-[var(--color-status-warning-border)]\">\n <div className=\"flex items-start gap-3\">\n <svg\n className=\"size-5 text-[var(--color-status-warning-text)] flex-shrink-0 mt-0.5\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n <div>\n <p className=\"text-sm text-[var(--color-status-warning-text)] font-medium\">\n {tr(\"auth.reactivate.deactivated\", \"Account Deactivated?\")}\n </p>\n <p className=\"text-xs text-[var(--color-status-warning-text)] mt-1\">\n {tr(\n \"auth.reactivate.instructions\",\n \"If you previously deactivated your account, you can restore it here. Enter your email and password to reactivate.\",\n )}\n </p>\n </div>\n </div>\n </div>\n\n {/* Email Input */}\n <div className=\"space-y-2\">\n <label\n htmlFor=\"email\"\n className=\"block text-sm font-medium text-[var(--color-text-primary)]\"\n >\n {tr(\"auth.reactivate.emailLabel\", \"Email Address\")}\n </label>\n <div className=\"relative\">\n <div className=\"absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none\">\n <EmailIcon className=\"size-5 text-[var(--color-text-tertiary)]\" />\n </div>\n <input\n id=\"email\"\n type=\"email\"\n required\n aria-label={tr(\"auth.reactivate.emailLabel\", \"Email Address\")}\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n 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-status-success-bg/20 focus:border-status-success-border transition-all\"\n placeholder={tr(\n \"auth.reactivate.emailPlaceholder\",\n \"you@example.com\",\n )}\n />\n </div>\n </div>\n\n {/* Password Input */}\n <div className=\"space-y-2\">\n <label\n htmlFor=\"password\"\n className=\"block text-sm font-medium text-[var(--color-text-primary)]\"\n >\n {tr(\"auth.reactivate.passwordLabel\", \"Password\")}\n </label>\n <div className=\"relative\">\n <div className=\"absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none\">\n <LockIcon className=\"size-5 text-[var(--color-text-tertiary)]\" />\n </div>\n <input\n id=\"password\"\n type=\"password\"\n required\n aria-label={tr(\"auth.reactivate.passwordLabel\", \"Password\")}\n value={password}\n onChange={(e) => setPassword(e.target.value)}\n 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-status-success-bg/20 focus:border-status-success-border transition-all\"\n placeholder={tr(\n \"auth.reactivate.passwordPlaceholder\",\n \"Enter your password\",\n )}\n />\n </div>\n </div>\n\n {/* Submit Button */}\n <Button\n type=\"submit\"\n disabled={isReactivating || !email || !password}\n variant=\"default\"\n size=\"lg\"\n className=\"w-full font-semibold\"\n >\n {isReactivating ? (\n <>\n <SpinnerIcon className=\"size-5 animate-spin\" />\n <span>{tr(\"auth.reactivate.reactivating\", \"Reactivating…\")}</span>\n </>\n ) : (\n <>\n <svg\n className=\"size-5\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15\"\n />\n </svg>\n <span>\n {tr(\"auth.reactivate.reactivateBtn\", \"Reactivate Account\")}\n </span>\n </>\n )}\n </Button>\n </form>\n\n {/* Links */}\n <div className=\"mt-8 pt-6 border-t border-[var(--color-border-default)] space-y-4\">\n <div className=\"text-center\">\n <button\n type=\"button\"\n onClick={() => navigate(\"/auth/login\")}\n className=\"text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] transition-colors\"\n >\n {tr(\n \"auth.reactivate.accountIsActive\",\n \"Remember your account is active?\",\n )}{\" \"}\n <span className=\"font-semibold text-text-link hover:text-text-linkHover\">\n {tr(\"auth.reactivate.signInInstead\", \"Sign in instead\")}\n </span>\n </button>\n </div>\n\n <div className=\"text-center\">\n <button\n type=\"button\"\n onClick={() => navigate(\"/auth/reset-password\")}\n className=\"text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] transition-colors\"\n >\n {tr(\"auth.reactivate.forgotPassword\", \"Forgot your password?\")}{\" \"}\n <span className=\"font-semibold text-accent-purple hover:text-accent-purple\">\n {tr(\"auth.reactivate.resetIt\", \"Reset it\")}\n </span>\n </button>\n </div>\n </div>\n\n {/* Help Text */}\n <div className=\"mt-6 p-4 rounded-xl bg-[var(--color-bg-muted)] border border-[var(--color-border-default)]\">\n <h4 className=\"text-sm font-medium text-[var(--color-text-primary)] mb-2\">\n {tr(\n \"auth.reactivate.cantReactivate\",\n \"Can't reactivate your account?\",\n )}\n </h4>\n <p className=\"text-xs text-[var(--color-text-secondary)]\">\n {tr(\n \"auth.reactivate.deletedHelp\",\n \"If your account was deleted (not just deactivated), it cannot be restored. Contact support if you believe this is an error.\",\n )}\n </p>\n </div>\n </AuthLayout>\n );\n}\n"],"mappings":";;;;;;;;;;AAkBA,SAAgB,IAAiB;CAC/B,IAAM,IAAK,GAAO,EAEZ,IAAW,GAAa,EACxB,IAAW,GAAa,EACxB,EAAE,sBAAmB,sBAAmB,GAAsB,EAG9D,IAAkB,EAAS,OAA8B,SAAS,IAElE,CAAC,GAAO,KAAY,EAAS,EAAe,EAC5C,CAAC,GAAU,KAAe,EAAS,GAAG,EACtC,CAAC,GAAO,KAAY,EAAwB,KAAK,EACjD,CAAC,GAAS,KAAc,EAAS,GAAM;AAyF7C,QAtFA,QAAgB;AACd,EAAI,KACF,EAAS,EAAe;IAEzB,CAAC,EAAe,CAAC,EAyChB,IAEA,kBAAC,GAAD;EACE,OAAO,EAAG,gCAAgC,uBAAuB;EACjE,UAAU,EAAG,mCAAmC,eAAe;YAE/D,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,OAAD;MACE,WAAU;MACV,MAAK;MACL,SAAQ;MACR,QAAO;gBAEP,kBAAC,QAAD;OACE,eAAc;OACd,gBAAe;OACf,aAAa;OACb,GAAE;OACF,CAAA;MACE,CAAA;KACF,CAAA;IAEN,kBAAC,MAAD;KAAI,WAAU;eACX,EAAG,iCAAiC,6BAA6B;KAC/D,CAAA;IACL,kBAAC,KAAD;KAAG,WAAU;eACV,EACC,+BACA,+DACD;KACC,CAAA;IAEJ,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD,EAAa,WAAU,gDAAiD,CAAA;KACpE,CAAA;IACF;;EACK,CAAA,GAKf,kBAAC,GAAD;EACE,OAAO,EAAG,yBAAyB,qBAAqB;EACxD,UAAU,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