biohazard-vfx/.next/static/chunks/app/admin/layout-64b90f1a69149b06.js
nicholai 2e476d7f34
Some checks are pending
Build and Push to Docker Hub / Push Docker image to Docker Hub (push) Waiting to run
Build and Push Docker Image / build-and-push (push) Waiting to run
1.1.design-tokens-and-typography in progress
2025-09-24 11:38:27 -06:00

1 line
7.0 KiB
JavaScript

try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9701c712-5cd0-4f8b-8616-16d085a4e217",e._sentryDebugIdIdentifier="sentry-dbid-9701c712-5cd0-4f8b-8616-16d085a4e217")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7581],{6983:(e,t,a)=>{Promise.resolve().then(a.bind(a,95506))},16494:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var s=a(95155),r=a(12115),n=a(12108),l=a(49903);function i(e){let{className:t=""}=e,[a,i]=(0,r.useState)(!1),[d,c]=(0,r.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.$n,{variant:"secondary",size:"sm",className:t,onClick:()=>i(!0),children:"Sign Out"}),a&&(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-6",onClick:e=>{e.target===e.currentTarget&&i(!1)},children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),(0,s.jsxs)("div",{className:"relative w-full max-w-md bg-surface-900 border border-surface-600 rounded-xl shadow-xl p-6",children:[(0,s.jsx)("h3",{className:"text-xl font-semibold text-white mb-2",children:"Sign out"}),(0,s.jsx)("p",{className:"text-text-muted mb-6",children:"Are you sure you want to sign out of your account?"}),(0,s.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,s.jsx)(l.$n,{variant:"ghost",onClick:()=>i(!1),children:"Cancel"}),(0,s.jsx)(l.$n,{variant:"danger",isLoading:d,onClick:async()=>{try{c(!0),await (0,n.signOut)({callbackUrl:"/"})}finally{c(!1)}},children:"Sign Out"})]})]})]})]})}},49903:(e,t,a)=>{"use strict";a.d(t,{$n:()=>r});var s=a(95155);function r(e){let{variant:t="primary",size:a="md",isLoading:r=!1,children:n,className:l="",disabled:i,...d}=e;return(0,s.jsx)("button",{className:"".concat({primary:"btn-primary",secondary:"btn-secondary",ghost:"btn-ghost",danger:"btn bg-destructive text-destructive-foreground hover:bg-brand-primary"}[t]," ").concat({sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}[a]," ").concat(l," ").concat(r?"opacity-75 cursor-wait":""),disabled:i||r,...d,children:r?(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"spinner w-3 h-3"}),"Loading..."]}):n})}a(6874),a(12115)},95506:(e,t,a)=>{"use strict";a.d(t,{AdminSidebar:()=>x,Navigation:()=>h});var s=a(95155),r=a(6874),n=a.n(r),l=a(35695),i=a(12115),d=a(12108),c=a(16494),o=a(1633);function h(){var e;let t=(0,l.usePathname)(),{data:a,status:r}=(0,d.useSession)(),[h,x]=(0,i.useState)(null),m=[{href:"/",label:"Home"},{href:"/projects",label:"Projects"},{href:"/crew",label:"Crew"},{href:"/blog",label:"Blog"},{href:"/faq",label:"FAQ"},{href:"/contact",label:"Contact"}],u="authenticated"===r?[...m,{href:"/admin",label:"Admin"}]:m;if(null==t?void 0:t.startsWith("/admin"))return null;let f=null!=h?h:t,[b,p]=(0,i.useState)(0);return(0,i.useEffect)(()=>{let e=()=>{p(Math.min(1,Math.max(0,("undefined"!=typeof globalThis&&"scrollY"in globalThis&&globalThis.scrollY||0)/200)))};if(e(),"undefined"!=typeof globalThis&&"addEventListener"in globalThis){let t=globalThis;return t.addEventListener("scroll",e,{passive:!0}),()=>t.removeEventListener("scroll",e)}},[]),(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"pointer-events-none fixed top-2 left-1/2 z-50 -translate-x-1/2 w-full px-4",children:(0,s.jsx)(o.P.nav,{initial:{opacity:0,y:-16},animate:{opacity:1,y:0},transition:{type:"spring",stiffness:120,damping:16,mass:.6},style:{maxWidth:"".concat(Math.round(1120-260*b),"px"),transition:"max-width 200ms ease"},className:"pointer-events-auto mx-auto max-w-6xl rounded-full origin-center transition-[background-color,backdrop-filter,box-shadow,border-color] duration-200 ".concat(b>.01?"border border-white/10 bg-black/20 backdrop-blur-xl shadow-[0_8px_40px_rgba(0,0,0,0.35)]":"border border-transparent bg-transparent backdrop-blur-0 shadow-none"),children:(0,s.jsxs)("div",{className:"flex items-center gap-3 px-3 py-1.5",children:[(0,s.jsx)(n(),{href:"/",className:"text-[13px] md:text-sm font-display tracking-tight text-white whitespace-nowrap leading-none",children:"Biohazard VFX"}),(0,s.jsx)("div",{className:"hidden md:block h-5 w-px bg-white/10"}),(0,s.jsx)("div",{className:"hidden md:flex items-center gap-1 mx-auto",children:u.map(e=>{let a=f===e.href;return(0,s.jsxs)("div",{className:"relative px-3 py-1",onMouseEnter:()=>x(e.href),onMouseLeave:()=>x(null),children:[(0,s.jsx)(n(),{href:e.href,className:["text-sm leading-none tracking-wide transition-colors",t===e.href?"text-white":"text-neutral-300 hover:text-white"].join(" "),children:e.label.toUpperCase()}),a&&(0,s.jsx)(o.P.div,{layoutId:"nav-underline",className:"absolute left-2 right-2 -bottom-1 h-0.5 bg-white/80",transition:{type:"spring",stiffness:300,damping:30}})]},e.href)})}),(0,s.jsx)("div",{className:"ml-auto hidden md:flex items-center gap-3",children:"authenticated"===r?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:null==a||null==(e=a.user)?void 0:e.email}),(0,s.jsx)(c.A,{})]}):null}),(0,s.jsx)("div",{className:"md:hidden flex-1",children:(0,s.jsx)("div",{className:"overflow-x-auto no-scrollbar",children:(0,s.jsx)("div",{className:"flex items-center gap-1",children:u.map(e=>{let a=t===e.href;return(0,s.jsx)(n(),{href:e.href,className:["px-3 py-2 rounded-full text-xs transition-colors",a?"bg-white/15 text-white":"text-neutral-300 hover:text-white hover:bg-white/10"].join(" "),children:e.label},e.href)})})})}),"authenticated"===r&&(0,s.jsx)("div",{className:"md:hidden",children:(0,s.jsx)(c.A,{})})]})})})})}function x(){let e=(0,l.usePathname)();return(0,s.jsx)("aside",{className:"w-60 h-screen fixed left-0 top-0 z-40",children:(0,s.jsxs)("div",{className:"h-full bg-surface-900/90 border-r border-surface-500/70 flex flex-col",children:[(0,s.jsx)("div",{className:"p-5 border-b border-surface-500/60",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-base font-semibold text-white leading-tight",children:"Admin Dashboard"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Biohazard VFX"})]})}),(0,s.jsx)("nav",{className:"p-3",children:(0,s.jsx)("ul",{className:"space-y-1",children:[{href:"/admin",label:"Dashboard"},{href:"/admin/projects",label:"Projects"},{href:"/admin/blog",label:"Blog"},{href:"/admin/team",label:"Team"},{href:"/admin/faq",label:"FAQs"},{href:"/admin/media",label:"Media"},{href:"/admin/assets",label:"Site Assets"}].map(t=>{let a=e===t.href;return(0,s.jsx)("li",{children:(0,s.jsx)(n(),{href:t.href,className:"block px-3 py-2 rounded text-sm transition-colors ".concat(a?"bg-surface-700 text-white":"text-text-muted hover:bg-surface-700 hover:text-white"),children:t.label})},t.href)})})}),(0,s.jsx)("div",{className:"mt-auto p-3 border-t border-surface-500/60",children:(0,s.jsx)(n(),{href:"/",className:"btn-secondary w-full inline-flex items-center justify-center gap-2 text-sm",title:"Return to site",children:"← Back to site"})})]})})}}},e=>{e.O(0,[6874,6454,1633,4850,8441,2691,7358],()=>e(e.s=6983)),_N_E=e.O()}]);