PageSourceSearch

https://speednuvem.lovable.app/assets/ForgotPassword-CqVEg_dP.js

js speednuvem.lovable.app collected 2026-10-03 03:45:24 UTC 2,919 bytes, 1 lines download raw bytes

1import{h as t,z as h,o as e,q as f,L as r,C as p,B as d,w as g}from"./index-0sYytr9Y.js";import{I as j}from"./input-BCJbetdg.js";import{L as v}from"./label-B33dDc81.js";import{M as N}from"./mail-DmqSwq-M.js";import{A as b}from"./arrow-right-D4uL-tgF.js";const q=()=>{const[i,c]=t.useState(""),[n,o]=t.useState(!1),[m,x]=t.useState(!1),{toast:l}=h(),u=async a=>{a.preventDefault(),o(!0);try{const{error:s}=await g.functions.invoke("password-reset",{body:{action:"request-reset",email:i,redirectTo:`${window.location.origin}/reset-password`}});if(s)throw s;x(!0),l({title:"Email enviado!",description:"Verifique sua caixa de entrada."})}catch(s){l({title:"Erro",description:s.message||"Erro ao enviar email",variant:"destructive"})}finally{o(!1)}};return e.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-glow pointer-events-none"}),e.jsxs(f.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"w-full max-w-md relative",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsxs(r,{to:"/",className:"inline-flex items-center gap-2 mb-6",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-primary flex items-center justify-center",children:e.jsx(p,{className:"w-6 h-6 text-primary-foreground"})}),e.jsxs("span",{className:"font-heading text-2xl font-bold text-foreground",children:["Speed",e.jsx("span",{className:"text-gradient",children:"Nuvem"})]})]}),e.jsx("h1",{className:"font-heading text-2xl font-bold text-foreground",children:"Esqueceu sua senha?"}),e.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"Informe seu email para receber o link de redefinição"})]}),m?e.jsxs("div",{className:"glass rounded-2xl p-8 text-center space-y-4",children:[e.jsx(N,{className:"w-12 h-12 text-primary mx-auto"}),e.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Email enviado!"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Se o email estiver cadastrado, você receberá um link para redefinir sua senha."}),e.jsx(r,{to:"/login",children:e.jsx(d,{variant:"outline",className:"mt-4",children:"← Voltar ao login"})})]}):e.jsxs("form",{onSubmit:u,className:"glass rounded-2xl p-8 space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(v,{htmlFor:"email",children:"Email"}),e.jsx(j,{id:"email",type:"email",placeholder:"[email protected]",value:i,onChange:a=>c(a.target.value),required:!0,className:"bg-secondary/50 border-border"})]}),e.jsxs(d,{variant:"hero",size:"lg",className:"w-full",disabled:n,children:[n?"Enviando...":"Enviar link de redefinição",e.jsx(b,{className:"w-4 h-4 ml-1"})]}),e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:e.jsx(r,{to:"/login",className:"text-primary hover:underline font-medium",children:"← Voltar ao login"})})]})]})]})};export{q 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.