PageSourceSearch

https://jumpsuitgroup.com/assets/_admin-DURzdH9W.js

js jumpsuitgroup.com collected 2026-10-07 00:00:56 UTC 4,420 bytes, 1 lines download raw bytes

1import{c as a,u as x,r as l,f,j as e,s as m,I as b,F as p,g as k,M as y,L as j,O as N}from"./main-Bbiwo7iD.js";import{u as v}from"./useServerFn-C_N7G6W3.js";import{g as M}from"./admin.functions-CIYfECJ9.js";import{B as h}from"./button-DBLYZy1a.js";import{u as S}from"./use-auth-ready-ZSIS0Tyd.js";import{C as w}from"./clipboard-list-ClqsTW6V.js";import{L as _}from"./link-2-Dv3ww4wg.js";const A=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],L=a("code-xml",A);const C=[["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"}]],W=a("log-out",C);const q=[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]],I=a("tags",q);const O=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],R=a("users",O);const $=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],z=a("webhook",$);function G(){const o=x(),u=v(M),{ready:i,user:n}=S(),[d,r]=l.useState("checking"),s=f({select:t=>t.location.pathname});if(l.useEffect(()=>{if(!i)return;if(!n){o({to:"/login"});return}let t=!1;return r("checking"),u().then(c=>{t||r(c.isAdmin?"ok":"denied")}).catch(()=>r("denied")),()=>{t=!0}},[i,n?.id]),!i||n&&d==="checking")return e.jsx("div",{className:"flex min-h-screen items-center justify-center text-muted-foreground",children:"Loading…"});if(!n)return e.jsx("div",{className:"flex min-h-screen items-center justify-center text-muted-foreground",children:"Redirecting…"});if(d==="denied")return e.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 px-4 text-center",children:[e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"No dashboard access"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your account isn't an admin. Ask an existing admin to grant you access."}),e.jsx(h,{onClick:async()=>{await m.auth.signOut(),o({to:"/login"})},children:"Sign out"})]});const g=[{to:"/admin",label:"Submissions",icon:b},{to:"/admin/forms",label:"Forms",icon:w},{to:"/admin/blog",label:"Blog",icon:p},{to:"/admin/blog/authors",label:"Authors",icon:R},{to:"/admin/blog/tags",label:"Tags",icon:I},{to:"/admin/redirects",label:"Redirects",icon:_},{to:"/admin/emails",label:"Emails",icon:k},{to:"/admin/sms",label:"SMS Alerts",icon:y},{to:"/admin/webhooks",label:"Webhooks",icon:z},{to:"/admin/integrations",label:"Integrations",icon:L}];return e.jsx("div",{className:"min-h-screen bg-background",children:e.jsxs("div",{className:"flex",children:[e.jsxs("aside",{className:"sticky top-0 hidden h-screen w-60 shrink-0 border-r border-border bg-card p-4 md:block",children:[e.jsxs("div",{className:"mb-6 px-2",children:[e.jsx("div",{className:"text-sm font-semibold text-foreground",children:"JSG Dashboard"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Internal team"})]}),e.jsx("nav",{className:"space-y-1",children:g.map(t=>{const c=t.to==="/admin"?s==="/admin":t.to==="/admin/blog"?s.startsWith("/admin/blog")&&!s.startsWith("/admin/blog/authors")&&!s.startsWith("/admin/blog/tags"):s.startsWith(t.to);return e.jsxs(j,{to:t.to,className:`flex items-center gap-2 rounded-lg px-3 py-2 text-sm transition-colors ${c?"bg-primary/10 text-primary font-medium":"text-foreground/80 hover:bg-muted"}`,children:[e.jsx(t.icon,{className:"h-4 w-4"}),t.label]},t.to)})}),e.jsx("div",{className:"absolute bottom-4 left-4 right-4",children:e.jsxs(h,{variant:"outline",size:"sm",className:"w-full",onClick:async()=>{await m.auth.signOut(),o({to:"/login"})},children:[e.jsx(W,{className:"mr-2 h-4 w-4"})," Sign out"]})})]}),e.jsx("main",{className:"flex-1 min-w-0 p-6",children:e.jsx(N,{})})]})})}export{G 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.