PageSourceSearch

https://edigits.ru/assets/AdminLayout-BB1jA42l.js

js edigits.ru collected 2026-10-08 13:46:05 UTC 4,267 bytes, 1 lines download raw bytes

1import{c as l,j as e,L as d,a as c,r as h,M as x}from"./index-Bp5mEfbk.js";import{u as o}from"./useAdminLocale-B1J4N7gp.js";const m=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],g=l("file-text",m);const y=[["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"}]],p=l("layout-dashboard",y);const b=[["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"}]],f=l("log-out",b);const u=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],j=l("settings",u);function N(){const[i,s]=o();return e.jsx("div",{className:"inline-flex rounded-lg border border-gray-200 bg-gray-50 p-0.5",children:d.map(t=>{const r=c[t],a=i===t;return e.jsx("button",{type:"button",onClick:()=>s(t),className:`px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${a?"bg-white text-gray-900 shadow-sm":"text-gray-500 hover:text-gray-800"}`,children:r.shortLabel},t)})})}const w=[{path:"#/admin",label:"Дашборд",icon:p},{path:"#/admin/content",label:"Контент",icon:g},{path:"#/admin/settings",label:"Настройки",icon:j}];function L({children:i}){const[s,t]=h.useState(!1),[r]=o(),a=c[r];return e.jsxs("div",{className:"min-h-screen bg-gray-100 flex",children:[e.jsxs("aside",{className:`fixed lg:static inset-y-0 left-0 z-50 w-64 bg-gray-900 text-white transition-transform duration-300 ${s?"translate-x-0":"-translate-x-full lg:translate-x-0"}`,children:[e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("img",{src:"/logo.png",alt:"ЛЦ",className:"w-10 h-10 object-contain",style:{filter:"brightness(0) invert(1)"}}),e.jsxs("div",{children:[e.jsx("h1",{className:"font-bold text-lg",children:"Админ-панель"}),e.jsx("p",{className:"text-xs text-gray-400",children:"контент по локали"})]})]}),e.jsx("nav",{className:"space-y-2",children:w.map(n=>e.jsxs("a",{href:n.path,className:"flex items-center gap-3 px-4 py-3 rounded-lg transition-colors text-gray-400 hover:bg-gray-800 hover:text-white",onClick:()=>t(!1),children:[e.jsx(n.icon,{className:"w-5 h-5"}),e.jsx("span",{children:n.label})]},n.path))})]}),e.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-4 border-t border-gray-800",children:e.jsxs("button",{type:"button",onClick:async()=>{try{await fetch("/api/logout",{method:"POST"})}catch{}finally{window.location.assign("#/admin/login")}},className:"w-full flex items-center gap-3 px-4 py-3 text-gray-400 hover:text-white transition-colors text-left",children:[e.jsx(f,{className:"w-5 h-5"}),e.jsx("span",{children:"Выйти"})]})})]}),s&&e.jsx("div",{className:"fixed inset-0 bg-black/50 z-40 lg:hidden",onClick:()=>t(!1)}),e.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[e.jsx("header",{className:"bg-white border-b border-gray-200 px-6 py-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("button",{onClick:()=>t(!0),className:"lg:hidden p-2 hover:bg-gray-100 rounded-lg",children:e.jsx(x,{className:"w-6 h-6"})}),e.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Управление сайтом"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"hidden sm:inline text-xs text-gray-500",children:[a.label," · ",a.host]}),e.jsx(N,{})]})]})}),e.jsx("main",{className:"flex-1 p-6 overflow-auto",children:i})]})]})}export{L as AdminLayout};

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.