biohazard-vfx/.next/static/chunks/app/admin/page-92c9ba6e4f9396cf.js
Nicholai 7ed45d15da
Some checks failed
Build and Push to Docker Hub / Push Docker image to Docker Hub (push) Has been cancelled
Build and Push Docker Image / build-and-push (push) Has been cancelled
Dockerized baby
2025-08-19 05:35:01 -06:00

1 line
8.0 KiB
JavaScript

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3698],{11656:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>h});var a=t(95155),l=t(12108),c=t(35695),r=t(12115),i=t(6874),n=t.n(i),d=t(32941);function m(e){let{label:s,value:t,icon:l,trend:c}=e;return(0,a.jsxs)("div",{className:"card",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between mb-3",children:[l&&(0,a.jsx)("div",{className:"text-xl",children:l}),c&&(0,a.jsxs)("span",{className:"text-xs ".concat(c.isPositive?"text-green-400":"text-red-400"),children:[c.isPositive?"↑":"↓"," ",Math.abs(c.value),"%"]})]}),(0,a.jsx)("p",{className:"text-text-muted text-xs mb-1",children:s}),(0,a.jsx)("p",{className:"text-2xl font-bold text-white",children:t})]})}t(29706);var o=t(16494);function x(){let[e,s]=(0,r.useState)({projects:0,blogPosts:0,teamMembers:0,faqs:0});return(0,r.useEffect)(()=>{let e=JSON.parse(localStorage.getItem("biohazard_projects")||"[]"),t=JSON.parse(localStorage.getItem("biohazard_blog_posts")||"[]"),a=JSON.parse(localStorage.getItem("biohazard_team_members")||"[]"),l=JSON.parse(localStorage.getItem("biohazard_faqs")||"[]");s({projects:e.length||8,blogPosts:t.filter(e=>e.published).length,teamMembers:a.length||3,faqs:l.filter(e=>e.published).length||5})},[]),(0,a.jsxs)("div",{className:"mt-12",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-white mb-6",children:"Quick Stats"}),(0,a.jsxs)(d.xA,{cols:4,children:[(0,a.jsx)(m,{label:"Total Projects",value:e.projects}),(0,a.jsx)(m,{label:"Published Posts",value:e.blogPosts}),(0,a.jsx)(m,{label:"Team Members",value:e.teamMembers}),(0,a.jsx)(m,{label:"FAQ Items",value:e.faqs})]})]})}function h(){var e;let{data:s,status:t}=(0,l.useSession)(),i=(0,c.useRouter)();return((0,r.useEffect)(()=>{"loading"!==t&&(s||i.push("/admin/login"))},[s,t,i]),"loading"===t)?(0,a.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:(0,a.jsx)("div",{className:"spinner w-8 h-8"})}):s?(0,a.jsxs)("div",{children:[(0,a.jsx)(d.zY,{title:"Admin Dashboard",subtitle:"Welcome, ".concat(null==(e=s.user)?void 0:e.name),actions:(0,a.jsx)(o.A,{})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 gap-6",children:[(0,a.jsxs)(n(),{href:"/admin/projects",className:"card card-hover",children:[(0,a.jsx)("div",{className:"flex items-center mb-2",children:(0,a.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Projects"})}),(0,a.jsx)("p",{className:"text-text-muted text-sm",children:"Manage portfolio projects"})]}),(0,a.jsxs)(n(),{href:"/admin/blog",className:"card card-hover",children:[(0,a.jsx)("div",{className:"flex items-center mb-4",children:(0,a.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Blog Posts"})}),(0,a.jsx)("p",{className:"text-text-muted text-sm",children:"Create and edit blog posts"})]}),(0,a.jsxs)(n(),{href:"/admin/media",className:"card card-hover",children:[(0,a.jsx)("div",{className:"flex items-center mb-4",children:(0,a.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Media Library"})}),(0,a.jsx)("p",{className:"text-text-muted text-sm",children:"Upload and manage files"})]}),(0,a.jsxs)(n(),{href:"/admin/team",className:"card card-hover",children:[(0,a.jsx)("div",{className:"flex items-center mb-4",children:(0,a.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Team"})}),(0,a.jsx)("p",{className:"text-text-muted text-sm",children:"Manage team members"})]}),(0,a.jsxs)(n(),{href:"/admin/faq",className:"card card-hover",children:[(0,a.jsx)("div",{className:"flex items-center mb-4",children:(0,a.jsx)("h3",{className:"text-lg font-semibold text-white",children:"FAQs"})}),(0,a.jsx)("p",{className:"text-text-muted text-sm",children:"Manage frequently asked questions"})]}),(0,a.jsxs)("div",{className:"card opacity-50",children:[(0,a.jsx)("div",{className:"flex items-center mb-4",children:(0,a.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Settings"})}),(0,a.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})]})]}),(0,a.jsx)(x,{})]}):null}},16494:(e,s,t)=>{"use strict";t.d(s,{A:()=>i});var a=t(95155),l=t(12115),c=t(12108),r=t(49903);function i(e){let{className:s=""}=e,[t,i]=(0,l.useState)(!1),[n,d]=(0,l.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.$n,{variant:"secondary",size:"sm",className:s,onClick:()=>i(!0),children:"Sign Out"}),t&&(0,a.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,a.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),(0,a.jsxs)("div",{className:"relative w-full max-w-md bg-surface-900 border border-surface-600 rounded-xl shadow-xl p-6",children:[(0,a.jsx)("h3",{className:"text-xl font-semibold text-white mb-2",children:"Sign out"}),(0,a.jsx)("p",{className:"text-text-muted mb-6",children:"Are you sure you want to sign out of your account?"}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,a.jsx)(r.$n,{variant:"ghost",onClick:()=>i(!1),children:"Cancel"}),(0,a.jsx)(r.$n,{variant:"danger",isLoading:n,onClick:async()=>{try{d(!0),await (0,c.signOut)({callbackUrl:"/"})}finally{d(!1)}},children:"Sign Out"})]})]})]})]})}},29706:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>r});var a=t(95155),l=t(66766),c=t(12115);function r(e){let{src:s,alt:t="Image",placeholderText:r="Image Coming Soon",placeholderSize:i,...n}=e,[d,m]=(0,c.useState)(!1),{width:o,height:x,fill:h}=n,u=(0,c.useMemo)(()=>{let e="number"==typeof o?o:(null==i?void 0:i.width)||1200,s="number"==typeof x?x:(null==i?void 0:i.height)||(h?675:800),t=encodeURIComponent(r);return"https://placehold.co/".concat(e,"x").concat(s,"/111113/CCCCCC?text=").concat(t)},[o,x,h,i,r]),g=!s||""===s.trim()||d?u:s;return(0,a.jsx)(l.default,{...n,src:g,alt:t,onError:()=>m(!0)})}},32941:(e,s,t)=>{"use strict";t.d(s,{mc:()=>r,wn:()=>c,xA:()=>i,zY:()=>l});var a=t(95155);function l(e){let{title:s,subtitle:t,actions:l}=e;return(0,a.jsx)("div",{className:"mb-6",children:(0,a.jsxs)("div",{className:"flex items-start justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-3xl font-display tracking-tight text-white mb-2",children:s}),t&&(0,a.jsx)("p",{className:"text-text-muted text-base max-w-3xl",children:t})]}),l&&(0,a.jsx)("div",{className:"flex items-center gap-2",children:l})]})})}function c(e){let{children:s,className:t=""}=e;return(0,a.jsx)("section",{className:"section-spacing ".concat(t),children:s})}function r(e){let{children:s,className:t=""}=e;return(0,a.jsx)("div",{className:"w-full px-4 sm:px-6 lg:px-8 ".concat(t),children:s})}function i(e){let{children:s,cols:t=3,gap:l="md",className:c=""}=e;return(0,a.jsx)("div",{className:"grid ".concat({1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}[t]," ").concat({sm:"gap-3",md:"gap-4",lg:"gap-6"}[l]," ").concat(c),children:s})}t(12115)},49903:(e,s,t)=>{"use strict";t.d(s,{$n:()=>r,z9:()=>i});var a=t(95155),l=t(6874),c=t.n(l);function r(e){let{variant:s="primary",size:t="md",isLoading:l=!1,children:c,className:r="",disabled:i,...n}=e;return(0,a.jsx)("button",{className:"".concat({primary:"btn-primary",secondary:"btn-secondary",ghost:"btn-ghost",danger:"btn bg-red-500 hover:bg-red-600 text-white"}[s]," ").concat({sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}[t]," ").concat(r," ").concat(l?"opacity-75 cursor-wait":""),disabled:i||l,...n,children:l?(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"spinner w-3 h-3"}),"Loading..."]}):c})}function i(e){let{variant:s="primary",size:t="md",children:l,className:r="",href:i="#",...n}=e;return(0,a.jsx)(c(),{href:i,className:"".concat({primary:"btn-primary",secondary:"btn-secondary",ghost:"btn-ghost"}[s]," ").concat({sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}[t]," ").concat(r),...n,children:l})}t(12115)},89484:(e,s,t)=>{Promise.resolve().then(t.bind(t,11656))}},e=>{e.O(0,[6874,6766,6454,8441,5964,7358],()=>e(e.s=89484)),_N_E=e.O()}]);