PageSourceSearch

https://savingoursistersadoption.org/assets/ForgotPassword-BXqLWgvL.js

js savingoursistersadoption.org collected 2026-10-03 19:41:25 UTC 3,317 bytes, 1 lines download raw bytes

1import{a as t,j as e}from"./motion-BI7BCvRY.js";import{q as u,L as d}from"./index-CchBgHHc.js";import{B as f}from"./button-PEFy30kz.js";import{I as g}from"./input-DlKomqkE.js";import{C as j,a as w,d as b,b as y}from"./card-Dl3nh9NT.js";import{L as N}from"./label--I_IGCVd.js";import{S as k}from"./shield-D1o4aayW.js";import{M as S}from"./mail-OvA_KiWy.js";import"./charts-C3LtiW-D.js";function F(){t.useEffect(()=>{document.title="Reset Your Password - Saving Our Sisters"},[]),t.useEffect(()=>{u()},[]);const[r,m]=t.useState(""),[i,n]=t.useState(!1),[x,l]=t.useState(!1),[o,c]=t.useState(""),h=async a=>{a.preventDefault(),n(!0),c("");try{const s=await fetch("/api/auth/request-reset",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r}),credentials:"include"});if(!s.ok){const p=await s.json().catch(()=>({}));throw new Error(p.error??"Could not send the reset link. Please try again.")}l(!0)}catch(s){c(s instanceof Error?s.message:"Something went wrong. Please try again.")}finally{n(!1)}};return e.jsx("main",{id:"main-content",className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 p-4",children:e.jsxs(j,{className:"w-full max-w-md bg-slate-800/50 border-slate-700 text-white",children:[e.jsxs(w,{className:"text-center space-y-2",children:[e.jsx("div",{className:"mx-auto bg-pink-500/20 p-3 rounded-full w-fit",children:e.jsx(k,{className:"h-8 w-8 text-pink-400"})}),e.jsx("h1",{className:"text-2xl font-bold text-white leading-none tracking-tight",children:"Reset your password"}),e.jsx(b,{className:"text-slate-400",children:"We'll email you a link to set a new password."})]}),e.jsx(y,{children:x?e.jsxs("div",{className:"space-y-4",role:"status","aria-live":"polite",children:[e.jsx("p",{className:"text-sm text-slate-300",children:"If an account with that email exists, a reset link is on its way. The link expires in one hour."}),e.jsxs("p",{className:"text-sm text-slate-400",children:["Didn't get it? Check spam, then"," ",e.jsx("button",{type:"button",onClick:()=>l(!1),className:"text-pink-400 underline hover:text-pink-300",children:"try another address"}),"."]}),e.jsx(d,{href:"/admin/login",className:"block text-center text-sm text-slate-400 hover:text-white",children:"Back to sign in"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("form",{onSubmit:h,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(N,{htmlFor:"email",className:"text-slate-300",children:"Email address"}),e.jsxs("div",{className:"relative",children:[e.jsx(S,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400"}),e.jsx(g,{id:"email",type:"email",value:r,onChange:a=>m(a.target.value),placeholder:"[email protected]",className:"pl-10 bg-slate-700/50 border-slate-600 text-white placeholder:text-slate-500","data-testid":"input-reset-email",required:!0})]})]}),o&&e.jsx("p",{className:"text-sm text-red-400",role:"alert",children:o}),e.jsx(f,{type:"submit",className:"w-full bg-pink-500 hover:bg-pink-600 text-white",disabled:i,"data-testid":"button-request-reset",children:i?"Sending...":"Send reset link"})]}),e.jsx(d,{href:"/admin/login",className:"mt-4 block text-center text-sm text-slate-400 hover:text-white",children:"Back to sign in"})]})})]})})}export{F as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.