PageSourceSearch

https://hybridathlete.pl/assets/panel-login-DBPc8mnf.js

js hybridathlete.pl collected 2026-10-08 00:17:28 UTC 2,683 bytes, 1 lines download raw bytes

1import{x as w,r as t,j as e}from"./index-vHZgmjdL.js";import{u as y}from"./useAuth-CvMHp5KB.js";import{B as k}from"./button-Dd1c1VfM.js";import{I as x}from"./input-CgDf5JUj.js";import{L as g}from"./label-Bt-eNPiL.js";import{L as E}from"./lock-DFPyxSG4.js";import{C as f}from"./circle-alert-DWnnTPiX.js";import"./utils-D0L7aq16.js";function q(){const{signIn:h,isAdmin:r,loading:a,user:i}=y(),n=w(),[c,b]=t.useState(""),[m,j]=t.useState(""),[l,d]=t.useState(""),[u,o]=t.useState(!1);t.useEffect(()=>{a||(o(!1),i&&r&&n({to:"/panel",replace:!0}))},[r,a,n,i]);const v=async s=>{s.preventDefault(),d(""),o(!0);try{await h(c.trim(),m)}catch(p){const N=p instanceof Error?p.message:"Błąd logowania";d(N),o(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:e.jsxs("div",{className:"w-full max-w-sm",children:[e.jsxs("div",{className:"mb-8 text-center",children:[e.jsx("div",{className:"mx-auto mb-4 flex h-14 w-14 items-center justify-center border border-border bg-card",children:e.jsx(E,{className:"h-6 w-6 text-primary"})}),e.jsx("h1",{className:"font-display text-2xl uppercase tracking-tighter text-foreground",children:"Panel Admina"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground font-mono",children:"Zaloguj się aby zarządzać treściami"})]}),e.jsxs("form",{onSubmit:v,className:"space-y-4",children:[l&&e.jsxs("div",{className:"flex items-center gap-2 border border-destructive/50 bg-destructive/10 p-3 text-sm text-destructive",children:[e.jsx(f,{className:"h-4 w-4 shrink-0"}),l]}),!a&&i&&!r&&e.jsxs("div",{className:"flex items-center gap-2 border border-destructive/50 bg-destructive/10 p-3 text-sm text-destructive",children:[e.jsx(f,{className:"h-4 w-4 shrink-0"}),"To konto nie ma uprawnień administratora."]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{htmlFor:"email",className:"text-xs font-mono uppercase tracking-wider text-muted-foreground",children:"Email"}),e.jsx(x,{id:"email",type:"email",value:c,onChange:s=>b(s.target.value),autoComplete:"email",required:!0,className:"bg-card border-border",placeholder:"[email protected]"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{htmlFor:"password",className:"text-xs font-mono uppercase tracking-wider text-muted-foreground",children:"Hasło"}),e.jsx(x,{id:"password",type:"password",value:m,onChange:s=>j(s.target.value),autoComplete:"current-password",required:!0,className:"bg-card border-border",placeholder:"••••••••"})]}),e.jsx(k,{type:"submit",disabled:u,className:"w-full font-display uppercase tracking-tighter",children:u?"Logowanie...":"Zaloguj się"})]})]})})}export{q 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.