PageSourceSearch

https://thinggaard.dk/assets/adgangskode-BbYvPs60.js

js thinggaard.dk collected 2026-10-04 14:40:07 UTC 1,573 bytes, 1 lines download raw bytes

1import{u as x,b as g,d as f,r,e as h,f as j,j as e,P as b,B as k}from"./index-C2KlasXz.js";import{u as w}from"./useServerFn-Cw002wbj.js";import{I as y}from"./input-B9Pgl5GR.js";import{L as P}from"./label-BVFt2x2p.js";function E(){const u=x(),{next:d}=g.useSearch(),c=w(f),[t,i]=r.useState(""),[o,s]=r.useState(null),[n,l]=r.useState(!1),m=h(d)??j[0];async function p(a){a.preventDefault(),l(!0),s(null);try{if((await c({data:{password:t}})).ok){await u.navigate({href:m,reloadDocument:!0});return}s("Adgangskoden er ikke korrekt.")}catch{s("Der skete en fejl. Prøv igen.")}finally{l(!1)}}return e.jsx(b,{brand:null,children:e.jsx("div",{className:"container mx-auto px-4 py-16",children:e.jsxs("div",{className:"mx-auto max-w-md rounded-xl border bg-card p-6 shadow-sm",children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Beskyttet side"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Siden er kun for Thinggaards medarbejdere og samarbejdspartnere. Indtast adgangskoden for at fortsætte."}),e.jsxs("form",{onSubmit:p,className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(P,{htmlFor:"page-gate-password",children:"Adgangskode"}),e.jsx(y,{id:"page-gate-password",type:"password",autoComplete:"current-password",autoFocus:!0,value:t,onChange:a=>i(a.target.value),required:!0})]}),o?e.jsx("p",{className:"text-sm text-destructive",role:"alert",children:o}):null,e.jsx(k,{type:"submit",className:"w-full",disabled:n||t.length===0,children:n?"Kontrollerer…":"Fortsæt"})]})]})})})}export{E as component};

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.