PageSourceSearch

https://www.littlepinkpotato.com/assets/ResetPassword-YbwLS0n6.js

js littlepinkpotato.com collected 2026-10-02 01:34:53 UTC 3,268 bytes, 1 lines download raw bytes

1import{a as w,u as S,r,s as i,j as e,L as h}from"./index-CTi3OetX.js";import{B as y}from"./button-C_TcsabZ.js";import{I as b}from"./input-CNzsvaTI.js";function k(){const g=w(),{t}=S(),[n,f]=r.useState(""),[d,p]=r.useState(""),[c,u]=r.useState(!1),[o,l]=r.useState(null),[m,x]=r.useState(!1),[j,N]=r.useState(!1);r.useEffect(()=>{const{data:{subscription:s}}=i.auth.onAuthStateChange(a=>{(a==="PASSWORD_RECOVERY"||a==="SIGNED_IN")&&x(!0)});return i.auth.getSession().then(({data:{session:a}})=>{a&&x(!0)}),()=>s.unsubscribe()},[]);async function v(s){if(s.preventDefault(),n!==d){l(t("reset.passwordsMismatch"));return}if(n.length<8){l(t("reset.passwordTooShort"));return}u(!0),l(null);const{error:a}=await i.auth.updateUser({password:n});if(u(!1),a){l(a.message);return}N(!0),g("/candidate/dashboard",{replace:!0})}return e.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center p-4 bg-petal",children:[e.jsxs(h,{to:"/",className:"absolute top-8 left-8 z-10 hidden sm:flex items-center gap-2",children:[e.jsx("img",{src:"/favicon/favicon.svg",alt:"",className:"h-7 w-7"}),e.jsx("span",{className:"text-2xl font-bold tracking-tighter text-garnet font-headline",children:"Little Pink Potato"})]}),e.jsxs("div",{className:"w-full max-w-md bg-white dark:bg-card editorial-shadow p-8 sm:p-12 rounded-3xl border border-border",children:[e.jsxs("div",{className:"text-center mb-10",children:[e.jsx("h1",{className:"font-headline text-3xl font-extrabold text-garnet tracking-tight mb-2",children:t("reset.title")}),e.jsx("p",{className:"text-garnet/60",children:t("reset.subtitle")})]}),j&&e.jsx("p",{className:"text-sm text-good text-center font-medium",children:t("reset.success")}),!m&&!o&&e.jsx("p",{className:"text-sm text-garnet/60 text-center",children:t("reset.verifying")}),o&&e.jsx("div",{className:"mb-6 p-4 bg-destructive/10 border border-destructive/20 rounded-xl text-destructive text-sm font-medium",children:o}),m&&e.jsxs("form",{onSubmit:v,className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-semibold text-garnet/70 font-headline",children:t("reset.newPassword")}),e.jsx(b,{type:"password",value:n,onChange:s=>f(s.target.value),required:!0,minLength:8,className:"h-12 bg-petal border-border text-garnet placeholder-garnet/30 focus-visible:ring-brand/30 rounded-xl",placeholder:t("reset.passwordMinPlaceholder")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-semibold text-garnet/70 font-headline",children:t("reset.confirmPassword")}),e.jsx(b,{type:"password",value:d,onChange:s=>p(s.target.value),required:!0,minLength:8,className:"h-12 bg-petal border-border text-garnet placeholder-garnet/30 focus-visible:ring-brand/30 rounded-xl",placeholder:t("reset.confirmPasswordPlaceholder")})]}),e.jsx(y,{type:"submit",className:"w-full h-12 text-base font-headline font-bold bg-brand hover:brightness-110 text-white rounded-xl transition-all",disabled:c,children:t(c?"reset.submitting":"reset.submit")})]}),e.jsx("p",{className:"mt-8 text-center text-sm text-garnet/60",children:e.jsx(h,{to:"/login",className:"text-brand hover:text-blush font-bold transition-colors",children:t("reset.backToSignIn")})})]})]})}export{k 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.