PageSourceSearch

https://unterrichtsplanung.ai/assets/ResetPassword-BysrXYFK.js

js unterrichtsplanung.ai collected 2026-10-05 15:15:50 UTC 2,723 bytes, 1 lines download raw bytes

1import{n as e}from"./rolldown-runtime-DF2fYuay.js";import{nt as t,yn as n}from"./lucide-FiUllUuf.js";import{r}from"./react-vendor-DkRFjetv.js";import{U as i}from"./radix-DA0TVB9t.js";import{t as a}from"./client-CgQ6iHoJ.js";import{t as o}from"./spinner-DBN64AJ6.js";import{t as s}from"./button-DWibT-Lh.js";import{t as c}from"./label-Cmbd6Sco.js";import{i as l,n as u}from"./errors-BVF_zu8c.js";import{t as d}from"./input-DMUCdaa7.js";import{a as f,i as p,n as m,r as h,t as g}from"./card-BS9mZtL8.js";import{t as _}from"./Brand-C1Z3Aa48.js";var v=e(n(),1),y=i();function b(){let[e,n]=(0,v.useState)(``),[i,b]=(0,v.useState)(!1),[x,S]=(0,v.useState)(!1);async function C(t){t.preventDefault();let n=e.trim().toLowerCase();if(n){b(!0);try{let{error:e}=await a.auth.resetPasswordForEmail(n,{redirectTo:`${window.location.origin}/auth/update-password`});if(e)throw e;S(!0),l(`Link geschickt — schau in dein E-Mail-Postfach`)}catch(e){u(e,`Passwort-Reset`)}finally{b(!1)}}}return(0,y.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-gradient-to-b from-primary/5 to-background px-4 py-8`,children:(0,y.jsxs)(g,{className:`w-full max-w-md`,children:[(0,y.jsxs)(f,{className:`space-y-3 text-center`,children:[(0,y.jsx)(r,{to:`/`,className:`inline-flex justify-center`,children:(0,y.jsx)(_,{size:`lg`,withText:!1})}),(0,y.jsx)(`h1`,{className:`text-xl font-semibold leading-tight tracking-tight`,children:`Passwort zurücksetzen`}),(0,y.jsx)(h,{children:`Wir schicken dir einen Link per E-Mail, mit dem du ein neues Passwort setzen kannst.`})]}),x?(0,y.jsxs)(m,{className:`space-y-4 text-center`,children:[(0,y.jsxs)(`div`,{className:`rounded-md bg-muted p-4 text-sm`,children:[(0,y.jsx)(t,{className:`mx-auto mb-2 h-6 w-6 text-primary`}),(0,y.jsxs)(`p`,{children:[`Link gesendet an `,(0,y.jsx)(`strong`,{children:e})]}),(0,y.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:`Prüfe auch den Spam-Ordner. Der Link ist 1 Stunde lang gültig.`})]}),(0,y.jsx)(s,{variant:`ghost`,onClick:()=>S(!1),children:`Andere Adresse`})]}):(0,y.jsxs)(`form`,{onSubmit:C,children:[(0,y.jsxs)(m,{className:`space-y-4`,children:[(0,y.jsxs)(`div`,{className:`space-y-2`,children:[(0,y.jsx)(c,{htmlFor:`email`,children:`E-Mail`}),(0,y.jsx)(d,{id:`email`,type:`email`,autoComplete:`email`,value:e,onChange:e=>n(e.target.value),required:!0,placeholder:`[email protected]`})]}),(0,y.jsxs)(s,{type:`submit`,className:`w-full`,disabled:i,children:[i&&(0,y.jsx)(o,{className:`mr-2`}),`Link zum Zurücksetzen senden`]})]}),(0,y.jsx)(p,{className:`justify-center`,children:(0,y.jsx)(r,{to:`/login`,className:`text-xs text-muted-foreground hover:underline`,children:`← Zurück zum Login`})})]})]})})}export{b 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.