1import{u as g,r as l,j as a,L as c}from"./react-95UiQ7Qb.js";import{u as j}from"./app-D9t7qDTd.js";import{u as N}from"./i18n-DEuOV1ge.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./query-DDrQXTvB.js";import"./editor-BjpF1L86.js";import"./vendor-CXzJWQZt.js";function L(){const{t:s}=N(),{login:h}=j(),m=g(),[o,d]=l.useState(""),[i,p]=l.useState(""),[u,n]=l.useState(null);async function x(e){e.preventDefault(),n(null);try{const r=await h(o,i);m(r.emailVerified?"/app":"/verify-email")}catch(r){const t=r;n(t.code?s("errors."+t.code,{defaultValue:t.message??""}):t.message??s("errors.network"))}}return a.jsx("div",{className:"auth-bg",children:a.jsxs("div",{className:"auth-card",children:[a.jsxs("div",{className:"auth-wordmark",children:[a.jsx("img",{className:"auth-mark",src:"/icon.png",alt:""}),"NoteLink"]}),a.jsx("h1",{className:"auth-title",children:s("auth.logIn")}),u&&a.jsx("p",{className:"auth-error",role:"alert",children:u}),a.jsxs("form",{onSubmit:x,className:"auth-form",children:[a.jsxs("div",{className:"auth-field",children:[a.jsx("label",{htmlFor:"auth-email",className:"auth-label",children:s("auth.email")}),a.jsx("input",{id:"auth-email","aria-label":s("auth.email"),type:"email",className:"auth-input",value:o,onChange:e=>d(e.target.value)})]}),a.jsxs("div",{className:"auth-field",children:[a.jsx("label",{htmlFor:"auth-password",className:"auth-label",children:s("auth.password")}),a.jsx("input",{id:"auth-password","aria-label":s("auth.password"),type:"password",className:"auth-input",value:i,onChange:e=>p(e.target.value)})]}),a.jsx("button",{type:"submit",className:"btn-primary",children:s("auth.logIn")})]}),a.jsx("p",{className:"auth-footer",children:a.jsx(c,{to:"/forgot-password",children:s("auth.forgotPassword")})}),a.jsxs("p",{className:"auth-footer",children:[s("auth.noAccountPrompt")," ",a.jsx(c,{to:"/register",children:s("auth.register")})]})]})})}export{L as LoginPage};
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.