67 lines
2.4 KiB
HTML
67 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
<title>BookKeepPro | Forgot Password</title>
|
|
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet"/>
|
|
<link rel="stylesheet" href="/css/base.css"/>
|
|
<link rel="stylesheet" href="/css/components.css"/>
|
|
<link rel="stylesheet" href="/css/animations.css"/>
|
|
|
|
<style>html,body{height:100%;}body{margin:0;}</style> <script src="/js/theme.js?v=2"></script>
|
|
</head>
|
|
<body style="margin:0;padding:0;">
|
|
|
|
<div class="auth-shell page-enter">
|
|
|
|
<div class="auth-brand">
|
|
<img class="brand-logo" src="/images/bookkeeppro-logo.webp" alt="BookKeepPro"/>
|
|
<div class="brand-divider"></div>
|
|
<h2>Reset Your Password</h2>
|
|
<p>We'll send a secure link to your registered email address.</p>
|
|
</div>
|
|
|
|
<div class="auth-form-side">
|
|
<div class="auth-box">
|
|
<div style="font-size:40px;margin-bottom:12px;">🔑</div>
|
|
<h1>Forgot Password?</h1>
|
|
<p class="auth-subtitle">Enter your email and we'll send a reset link</p>
|
|
|
|
<div class="form-group" style="margin-top:24px;">
|
|
<label class="form-label" for="email">Email Address</label>
|
|
<input id="email" type="email" class="input" placeholder="you@example.com"/>
|
|
</div>
|
|
|
|
<button class="btn btn-primary w-full" id="resetBtn" onclick="sendReset()" style="border-radius:var(--radius-sm);">
|
|
Send Reset Link
|
|
</button>
|
|
|
|
<div class="auth-links"><a href="/login" class="fancy-link">← Back to Sign In</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script src="/js/toast.js"></script>
|
|
<script>
|
|
async function sendReset() {
|
|
const email = document.getElementById("email").value.trim();
|
|
const btn = document.getElementById("resetBtn");
|
|
if (!email) { showToast("Please enter your email address", "warning"); return; }
|
|
|
|
btn.disabled = true; btn.textContent = "Sending…";
|
|
try {
|
|
await fetch("/api/auth/forgot-password", {
|
|
method: "POST", headers: { "Content-Type": "application/json" },
|
|
body: JSON.stringify({ email })
|
|
});
|
|
showToast("If that email exists, a reset link has been sent.", "info", 7000);
|
|
document.getElementById("email").value = "";
|
|
} catch { showToast("Network error. Please try again.", "error"); }
|
|
finally { btn.disabled = false; btn.textContent = "Send Reset Link"; }
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|