PageSourceSearch

https://repaircircle.eu/assets/AdminJournalLogin-BbMZydyD.js

js repaircircle.eu collected 2026-10-07 11:51:42 UTC 1,939 bytes, 1 lines download raw bytes

1import{r as i,j as t}from"./vendor-react-CSSqAeAu.js";import{e as u,F as p,t as x,x as g,y as f,bH as h,v as j,I as y,B as w}from"./index-BGBqiLLz.js";import{L as b}from"./lock-CLXADZB-.js";import"./vendor-query-DiXUylMp.js";import"./vendor-charts-BKriOm_U.js";import"./vendor-motion-DNXF7DOe.js";function I(){const[,d]=u(),[e,l]=i.useState(""),[a,n]=i.useState(!1),{toast:s}=p(),c=async o=>{o.preventDefault(),n(!0);try{const r=await fetch("/api/admin/journal/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:e})});if(r.ok){const m=await r.json();localStorage.setItem("admin_journal_token",m.token),s({title:"Logged in successfully",description:"Welcome to the journal editor"}),d("/admin/journal")}else s({title:"Login failed",description:"Invalid password",variant:"destructive"})}catch{s({title:"Error",description:"Failed to connect to server",variant:"destructive"})}finally{n(!1)}};return t.jsx("div",{className:"min-h-screen bg-gradient-to-br from-stone-50 to-white dark:from-gray-950 dark:to-black flex items-center justify-center p-4",children:t.jsxs(x,{className:"w-full max-w-md",children:[t.jsxs(g,{className:"text-center",children:[t.jsx("div",{className:"mx-auto w-12 h-12 bg-stone-100 dark:bg-gray-900 rounded-full flex items-center justify-center mb-4",children:t.jsx(b,{className:"w-6 h-6 text-gray-700 dark:text-gray-400"})}),t.jsx(f,{className:"text-2xl",children:"Journal Admin"}),t.jsx(h,{children:"Enter your password to access the journal editor"})]}),t.jsx(j,{children:t.jsxs("form",{onSubmit:c,className:"space-y-4",children:[t.jsx("div",{children:t.jsx(y,{type:"password",placeholder:"Admin password",value:e,onChange:o=>l(o.target.value),disabled:a,autoFocus:!0,"data-testid":"input-admin-password"})}),t.jsx(w,{type:"submit",className:"w-full",disabled:a||!e,"data-testid":"button-admin-login",children:a?"Logging in...":"Login"})]})})]})})}export{I 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.