Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | 1x 1x 1x 1x 3x | import { usePageMeta } from "@/contexts/PageContext";
import { APP_EMAILS, APP_NAME, APP_ROUTES } from "@/routes/const";
import { ArrowLeft, KeyRound, Mail, ShieldCheck } from "lucide-react";
import React from "react";
const STEPS = [
{
num: "01",
icon: <Mail className="size-5" />,
label: "Request a reset link",
description: "Click the button below and enter your email address to receive a secure reset link.",
accent: "#2563eb",
},
{
num: "02",
icon: <KeyRound className="size-5" />,
label: "Set a new password",
description: "Follow the link in your email to securely set a new password for your account.",
accent: "#7c3aed",
},
{
num: "03",
icon: <ShieldCheck className="size-5" />,
label: "You're back in",
description: "Sign in with your new credentials. Your data and settings remain untouched.",
accent: "#059669",
},
];
const ForgotPassword: React.FC = () => {
usePageMeta("Forgot Password", false);
return (
<div className="min-h-[80vh] flex items-center justify-center px-6 py-20">
<div className="w-full max-w-4xl">
{/* Header */}
<div className="text-center mb-12">
<div
className="inline-flex items-center gap-2 mb-6 px-4 py-1.5 rounded-full text-xs font-semibold tracking-widest uppercase"
style={{
background: "rgba(59,130,246,0.08)",
border: "1px solid rgba(59,130,246,0.25)",
}}
>
<KeyRound className="size-3" />
Password Reset
</div>
<h1
className="text-3xl md:text-5xl font-black mb-4 leading-tight"
style={{
background: "linear-gradient(135deg, #1e40af 0%, #3b82f6 55%, #06b6d4 100%)",
WebkitBackgroundClip: "text",
WebkitTextFillColor: "transparent",
backgroundClip: "text",
}}
>
Reset Your Password
</h1>
<p className="text-gray-500">
We'll send you a secure link to reset your {APP_NAME} account password.
</p>
</div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 max-w-3xl mx-auto">
{/* Steps */}
<div className="flex flex-col gap-4">
{STEPS.map((step, i) => (
<div
key={i}
className="flex items-start gap-4 rounded-2xl p-5"
style={{ border: "1px solid rgba(59,130,246,0.14)" }}
>
<div className="flex flex-col items-center gap-2 shrink-0">
<div
className="p-2 rounded-xl"
style={{ background: `${step.accent}15`, color: step.accent }}
>
{step.icon}
</div>
<span
className="text-xs font-black tabular-nums"
style={{ color: `${step.accent}80` }}
>
{step.num}
</span>
</div>
<div className="pt-1">
<p className="font-bold text-sm mb-1">{step.label}</p>
<p className="text-xs text-gray-500 leading-relaxed">{step.description}</p>
</div>
</div>
))}
</div>
{/* Action card */}
<div
className="rounded-2xl p-8 flex flex-col gap-6"
style={{
background: "linear-gradient(160deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%)",
boxShadow: "0 20px 60px rgba(37,99,235,0.35)",
}}
>
<div>
<h2 className="text-xl font-black text-white mb-1">Send Reset Link</h2>
<p className="text-sm" style={{ color: "rgba(255,255,255,0.65)" }}>
You'll be redirected to our secure authentication provider.
</p>
</div>
<a
href={`${import.meta.env.VITE_AUTH_DOMAIN ?? ""}/forgot-password`}
className="flex items-center justify-center gap-2 w-full rounded-xl font-bold py-3.5 px-5 text-sm"
style={{
background: "white",
color: "#1d4ed8",
textDecoration: "none",
transition: "transform 0.15s",
}}
onMouseEnter={(e) => (e.currentTarget.style.transform = "scale(1.02)")}
onMouseLeave={(e) => (e.currentTarget.style.transform = "scale(1)")}
>
<KeyRound className="size-4" />
Send Reset Link
</a>
<p className="text-xs leading-relaxed" style={{ color: "rgba(255,255,255,0.4)" }}>
Can't access your email? Contact us at{" "}
<a
href={`mailto:${APP_EMAILS.help}`}
className="underline"
style={{ color: "rgba(255,255,255,0.65)" }}
>
{APP_EMAILS.help}
</a>
</p>
<a
href={APP_ROUTES.HOME.login}
className="flex items-center gap-1.5 text-xs font-medium transition-opacity"
style={{ color: "rgba(255,255,255,0.45)", textDecoration: "none" }}
onMouseEnter={(e) => (e.currentTarget.style.opacity = "1")}
onMouseLeave={(e) => (e.currentTarget.style.opacity = "0.6")}
>
<ArrowLeft className="size-3" />
Back to login
</a>
</div>
</div>
</div>
</div>
);
};
export default ForgotPassword;
|