PageSourceSearch

https://quantum.info.np/assets/ForgotMailboxPassword-B23dqFP4.js

js quantum.info.np collected 2026-09-24 15:08:29 UTC 3,185 bytes, 1 lines download raw bytes

1import{j as e}from"./animation-BGSh0CuA.js";import{a as s,L as u}from"./react-core-CPS7rS0j.js";import{e as p,am as l}from"./index-Bq2hyaAL.js";import{s as y,d2 as b,cS as h}from"./icons-Du2VgR0N.js";const w=()=>{const[t,n]=s.useState(""),[r,o]=s.useState(!1),[m,c]=s.useState(!1),d=async a=>{if(a.preventDefault(),!!t.trim()){o(!0);try{const i=await fetch("/api/mail-account/forgot-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t.trim()})});if(!i.ok){const x=await i.json().catch(()=>({}));l.error(x.error||"Something went wrong — please try again");return}c(!0)}catch{l.error("Network error — please try again")}finally{o(!1)}}};return e.jsx("div",{className:"min-h-screen flex items-center justify-center px-4 py-16",style:{backgroundColor:"var(--bg-secondary)"},children:e.jsxs("div",{className:"w-full max-w-md rounded-2xl p-8 sm:p-10 border shadow-sm",style:{backgroundColor:"var(--bg-primary)",borderColor:"var(--border-primary)"},children:[m?e.jsxs("div",{className:"text-center py-4",children:[e.jsx("div",{className:"w-14 h-14 rounded-full bg-[var(--primary-50)] flex items-center justify-center mx-auto mb-5",children:e.jsx(y,{className:"w-8 h-8 text-[var(--primary-600)]"})}),e.jsx("h1",{className:"text-xl font-bold text-[var(--text-primary)] mb-2",children:"Check your recovery inbox"}),e.jsx("p",{className:"text-sm text-[var(--text-secondary)]",children:"If that mailbox has a recovery email configured, we've sent a password reset link there. It expires in 45 minutes and can only be used once."})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-14 h-14 rounded-full bg-[var(--primary-50)] flex items-center justify-center mb-5",children:e.jsx(b,{className:"w-7 h-7 text-[var(--primary-600)]"})}),e.jsx("h1",{className:"text-xl font-bold text-[var(--text-primary)] mb-2",children:"Forgot your mailbox password?"}),e.jsx("p",{className:"text-sm text-[var(--text-secondary)] mb-6",children:"Enter your email address. If a recovery email is configured for it, we'll send a reset link there."}),e.jsxs("form",{onSubmit:d,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"email",className:"block text-sm font-semibold text-[var(--text-primary)] mb-2",children:"Mailbox email address"}),e.jsx("input",{id:"email",type:"email",required:!0,value:t,onChange:a=>n(a.target.value),placeholder:"[email protected]",disabled:r,className:"w-full px-4 py-3 border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-[var(--primary-400)]/40",style:{backgroundColor:"transparent",color:"var(--text-primary)",borderColor:"var(--border-primary)"}})]}),e.jsx("button",{type:"submit",disabled:r,className:`w-full py-3 px-6 rounded-lg font-semibold text-sm transition-all ${r?"bg-gray-400 cursor-not-allowed text-white":"bg-[var(--primary-600)] text-white hover:bg-[var(--primary-900)]"}`,children:r?"Sending…":"Send reset link"})]})]}),e.jsxs(u,{to:p.index,className:"mt-6 inline-flex items-center gap-1.5 text-sm text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:[e.jsx(h,{className:"w-3.5 h-3.5"})," Back to home"]})]})})};export{w 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.