PageSourceSearch

https://convolyze.io/assets/ResetPassword-BgVL0M3B.js

js convolyze.io collected 2026-10-02 01:57:12 UTC 3,030 bytes, 1 lines download raw bytes

1import{p as v,m as N,r,s as g,j as e,S}from"./index-Bbgev6vg.js";const a=8,k=()=>{const h=v(),{updatePassword:f}=N(),[n,b]=r.useState(""),[u,w]=r.useState(""),[l,o]=r.useState(null),[c,m]=r.useState(null),[p,d]=r.useState(!1),[y,x]=r.useState(!1);r.useEffect(()=>{const{data:{subscription:s}}=g.auth.onAuthStateChange((t,i)=>{(t==="PASSWORD_RECOVERY"||i)&&x(!0)});return g.auth.getSession().then(({data:{session:t}})=>{t&&x(!0)}),()=>s.unsubscribe()},[]);const j=async s=>{if(s.preventDefault(),o(null),m(null),n.length<a){o(`Password must be at least ${a} characters long.`);return}if(n!==u){o("Passwords do not match.");return}d(!0);const{error:t}=await f(n);if(t){const i=/weak|pwned|known/i.test(t.message)?"This password has been found in a known data breach. Please choose a more unique password.":t.message;o(i),d(!1);return}m("✅ Password updated! Redirecting to your dashboard..."),d(!1),setTimeout(()=>h("/dashboard",{replace:!0}),1500)};return e.jsxs("div",{className:"flex items-center justify-center min-h-screen bg-background p-4",children:[e.jsx(S,{title:"Reset password — Convolyze",description:"Set a new password for your Convolyze account.",path:"/reset-password",noindex:!0}),e.jsxs("div",{className:"w-full max-w-sm",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"🎙️ Convolyze"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"Choose a new password"})]}),e.jsx("div",{className:"p-8 space-y-6 rounded-xl border border-border bg-card shadow-lg",children:y?e.jsxs("form",{onSubmit:j,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"New password"}),e.jsx("input",{type:"password",value:n,onChange:s=>b(s.target.value),required:!0,minLength:a,className:"w-full px-3 py-2 rounded-md border border-input bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-ring",placeholder:`At least ${a} characters`})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Confirm new password"}),e.jsx("input",{type:"password",value:u,onChange:s=>w(s.target.value),required:!0,minLength:a,className:"w-full px-3 py-2 rounded-md border border-input bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-ring",placeholder:"Repeat password"})]}),l&&e.jsx("p",{className:"text-sm text-destructive",children:l}),c&&e.jsx("p",{className:"text-sm text-primary",children:c}),e.jsx("button",{type:"submit",disabled:p,className:"w-full py-2 rounded-md bg-primary text-primary-foreground text-sm font-medium hover:opacity-90 disabled:opacity-50 transition-opacity",children:p?"Updating...":"Update password"})]}):e.jsx("p",{className:"text-sm text-muted-foreground text-center",children:"Validating reset link... If this hangs, your link may have expired. Request a new one from the sign-in page."})})]})]})};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.