PageSourceSearch

https://turtbit.netlify.app/assets/AdminLayout-DHeZtcxA.js

js turtbit.netlify.app collected 2026-10-03 11:33:14 UTC 3,552 bytes, 1 lines download raw bytes

1import{j as e,R as m}from"./react-Y-K936R1.js";import{u as d,L as x,A as p,H as g}from"./index-BjdigT07.js";import{u as h,d as b,N as u,O as f}from"./router-CeMPH2yP.js";import{$ as j,D as N,F as v,a0 as k,U as w,a1 as y,a2 as A,a3 as C,a4 as R,a5 as L,a6 as T,a7 as B,a8 as P,a9 as S,aa as F,G as O,ab as H,N as E}from"./icons-CQDfdol2.js";import"./pdf-Dzv5IkqD.js";import"./supabase-CSIM0fnT.js";import"./gsap-COV6joel.js";import"./lenis-XHln91gA.js";import"./markdown-D15z8ois.js";const G=[{heading:"Sales",items:[{to:"/admin",label:"Overview",icon:N,end:!0},{to:"/admin/invoices",label:"Invoices",icon:v},{to:"/admin/credit-notes",label:"Credit notes",icon:k},{to:"/admin/clients",label:"Clients",icon:w},{to:"/admin/catalog",label:"Items & services",icon:y},{to:"/admin/recurring",label:"Recurring",icon:A}]},{heading:"Purchases",items:[{to:"/admin/bills",label:"Bills",icon:C},{to:"/admin/vendors",label:"Vendors",icon:R},{to:"/admin/expenses",label:"Expenses",icon:L}]},{heading:"Money",items:[{to:"/admin/payments",label:"Payments",icon:T},{to:"/admin/referrals",label:"Referrals",icon:B}]},{heading:"Books",items:[{to:"/admin/ledger",label:"Ledger",icon:P},{to:"/admin/reports",label:"Reports",icon:S},{to:"/admin/settings",label:"Settings",icon:F}]},{heading:"Website",items:[{to:"/admin/site",label:"Site & brand",icon:O},{to:"/admin/pages",label:"Pages",icon:H},{to:"/admin/blog",label:"Blog",icon:E}]}],z=()=>{const{user:a,loading:n}=d(),l=h();return n?e.jsx("div",{className:"mx-auto max-w-7xl px-6 pb-24 pt-32",children:e.jsx(x,{label:"Checking your access…"})}):a?a.role!=="Admin"?e.jsxs("div",{className:"mx-auto max-w-md px-6 pb-32 pt-40 text-center",children:[e.jsx(j,{className:"mx-auto h-10 w-10 text-rose-500"}),e.jsx("h1",{className:"mt-6 text-2xl font-semibold tracking-tight",children:"Admin access only"}),e.jsxs("p",{className:"t-muted mt-3 text-[15px]",children:["The admin console is restricted to Turtbit administrators. You are signed in as ",a.email,"."]}),e.jsx("div",{className:"mt-8 flex justify-center",children:e.jsx(p,{to:"/",variant:"ghost",children:"Back to site"})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(g,{children:[e.jsx("title",{children:"Turtbit Admin"}),e.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),e.jsx("div",{className:"mx-auto max-w-[1400px] px-4 pb-24 pt-28 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"lg:flex lg:gap-8",children:[e.jsxs("aside",{className:"lg:w-56 lg:shrink-0",children:[e.jsxs("div",{className:"mb-4 hidden lg:block",children:[e.jsx("p",{className:"t-faint text-[11.5px] font-semibold uppercase tracking-wide",children:"Turtbit"}),e.jsx("p",{className:"text-[15px] font-semibold tracking-tight",children:"Admin console"})]}),e.jsx("nav",{className:"-mx-1 flex gap-1 overflow-x-auto pb-3 lg:mx-0 lg:flex-col lg:gap-0 lg:overflow-visible lg:pb-0",children:G.map(s=>e.jsxs(m.Fragment,{children:[e.jsx("p",{className:"t-faint hidden px-3 pb-1.5 pt-4 text-[11px] font-semibold uppercase tracking-wide lg:block",children:s.heading}),s.items.map(({to:i,label:o,icon:r,end:c})=>e.jsxs(u,{to:i,end:c,className:({isActive:t})=>`flex shrink-0 items-center gap-2.5 rounded-xl px-3 py-2 text-[13.5px] font-medium transition ${t?"text-white":"t-muted hover:opacity-70"}`,style:({isActive:t})=>t?{background:"var(--accent-fill)"}:void 0,children:[e.jsx(r,{className:"h-4 w-4"}),o]},i))]},s.heading))})]}),e.jsx("main",{className:"min-w-0 flex-1 pt-2 lg:pt-0",children:e.jsx(f,{})})]})})]}):e.jsx(b,{to:"/login",state:{from:l.pathname},replace:!0})};export{z 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.