PageSourceSearch

https://kobra-kladno.lovable.app/assets/_authenticated-CmDkzU0r.js

js kobra-kladno.lovable.app collected 2026-10-03 03:35:09 UTC 3,637 bytes, 1 lines download raw bytes

1import{f as h,r as m,g as p,h as g,d as c,u as b,e as f,j as e,c as i,C as y,O as j}from"./index-BYkFCx3B.js";import{N as v,D as N,I as k}from"./newspaper-Bo7elztS.js";function w(o){const n=h(),r=m.useRef(void 0);return p(n.stores.location,d=>{const a=d;if(n.options.defaultStructuralSharing){const s=g(r.current,a);return r.current=s,s}return a})}const O=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],z=c("external-link",O);const A=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],L=c("layout-dashboard",A);const R=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],_=c("log-out",R);function S(){const{session:o,isAdmin:n,loading:r,signOut:d,user:a}=b(),s=f(),l=w();if(m.useEffect(()=>{r||o||s({to:"/login"})},[r,o,s]),r||!o)return e.jsx("div",{className:"min-h-screen grid place-items-center text-muted-foreground",children:"Načítám…"});if(!n)return e.jsx("div",{className:"min-h-screen grid place-items-center px-6",children:e.jsxs("div",{className:"max-w-md text-center space-y-4",children:[e.jsx("h1",{className:"font-display text-3xl tracking-wider",children:"Nemáš přístup"}),e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Tvůj účet (",a?.email,") nemá roli ",e.jsx("code",{children:"admin"}),". Požádej správce o přidělení role."]}),e.jsxs("div",{className:"flex gap-2 justify-center pt-2",children:[e.jsx("button",{onClick:()=>d(),className:"px-4 py-2 border border-border rounded-md text-sm hover:bg-muted",children:"Odhlásit"}),e.jsx(i,{to:"/",className:"px-4 py-2 bg-foreground text-background rounded-md text-sm",children:"Zpět na web"})]})]})});const x=[{to:"/admin",label:"Přehled",icon:L,exact:!0},{to:"/admin/aktuality",label:"Aktuality",icon:v},{to:"/admin/rozvrh",label:"Rozvrh",icon:y},{to:"/admin/sporty",label:"Sporty",icon:N},{to:"/admin/zpravy",label:"Zprávy",icon:k}];return e.jsxs("div",{className:"min-h-screen flex bg-muted/30",children:[e.jsxs("aside",{className:"w-60 bg-background border-r border-border flex flex-col",children:[e.jsxs("div",{className:"px-6 py-5 border-b border-border",children:[e.jsx(i,{to:"/",className:"font-display text-xl tracking-wider",children:"KOBRA · Admin"}),e.jsx("div",{className:"text-[10px] text-muted-foreground tracking-wider mt-1 truncate",children:a?.email})]}),e.jsx("nav",{className:"flex-1 p-3 space-y-1",children:x.map(t=>{const u=t.exact?l.pathname===t.to:l.pathname.startsWith(t.to);return e.jsxs(i,{to:t.to,className:`flex items-center gap-3 px-3 py-2 rounded-md text-sm transition-colors ${u?"bg-primary text-primary-foreground":"text-foreground hover:bg-muted"}`,children:[e.jsx(t.icon,{size:16})," ",t.label]},t.to)})}),e.jsxs("div",{className:"p-3 border-t border-border space-y-1",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-3 px-3 py-2 rounded-md text-sm text-muted-foreground hover:bg-muted",children:[e.jsx(z,{size:16})," Otevřít web"]}),e.jsxs("button",{onClick:async()=>{await d(),s({to:"/login"})},className:"w-full flex items-center gap-3 px-3 py-2 rounded-md text-sm text-muted-foreground hover:bg-muted",children:[e.jsx(_,{size:16})," Odhlásit"]})]})]}),e.jsx("main",{className:"flex-1 overflow-auto",children:e.jsx(j,{})})]})}export{S 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.