biohazard-vfx/.next/static/chunks/app/admin/page-76413b611fc1f4d4.js
Nicholai 0d1f6012ec
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
delinted and successfully builds
2025-08-16 06:37:34 -06:00

1 line
8.1 KiB
JavaScript

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[698],{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),n=t(6874),i=t.n(n),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-4",children:[l&&(0,a.jsx)("div",{className:"text-2xl",children:l}),c&&(0,a.jsxs)("span",{className:"text-sm ".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-sm mb-1",children:s}),(0,a.jsx)("p",{className:"text-3xl font-bold text-white",children:t})]})}t(66766);var o=t(49903);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,icon:"\uD83C\uDFAC"}),(0,a.jsx)(m,{label:"Published Posts",value:e.blogPosts,icon:"\uD83D\uDCDD"}),(0,a.jsx)(m,{label:"Team Members",value:e.teamMembers,icon:"\uD83D\uDC65"}),(0,a.jsx)(m,{label:"FAQ Items",value:e.faqs,icon:"❓"})]})]})}function h(){var e;let{data:s,status:t}=(0,l.useSession)(),n=(0,c.useRouter)();return((0,r.useEffect)(()=>{"loading"!==t&&(s||n.push("/admin/login"))},[s,t,n]),"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.z9,{href:"/api/auth/signout",variant:"secondary",size:"sm",children:"Sign Out"})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[(0,a.jsxs)(i(),{href:"/admin/projects",className:"card card-hover",children:[(0,a.jsxs)("div",{className:"flex items-center mb-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 bg-accent/10 rounded-lg flex items-center justify-center mr-4",children:(0,a.jsx)("span",{className:"text-2xl",children:"\uD83C\uDFAC"})}),(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)(i(),{href:"/admin/blog",className:"card card-hover",children:[(0,a.jsxs)("div",{className:"flex items-center mb-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 bg-accent/10 rounded-lg flex items-center justify-center mr-4",children:(0,a.jsx)("span",{className:"text-2xl",children:"\uD83D\uDCDD"})}),(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)(i(),{href:"/admin/media",className:"card card-hover",children:[(0,a.jsxs)("div",{className:"flex items-center mb-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 bg-accent/10 rounded-lg flex items-center justify-center mr-4",children:(0,a.jsx)("span",{className:"text-2xl",children:"\uD83D\uDCC1"})}),(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)(i(),{href:"/admin/team",className:"card card-hover",children:[(0,a.jsxs)("div",{className:"flex items-center mb-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 bg-accent/10 rounded-lg flex items-center justify-center mr-4",children:(0,a.jsx)("span",{className:"text-2xl",children:"\uD83D\uDC65"})}),(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)(i(),{href:"/admin/faq",className:"card card-hover",children:[(0,a.jsxs)("div",{className:"flex items-center mb-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 bg-accent/10 rounded-lg flex items-center justify-center mr-4",children:(0,a.jsx)("span",{className:"text-2xl",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.jsxs)("div",{className:"flex items-center mb-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 bg-surface-600 rounded-lg flex items-center justify-center mr-4",children:(0,a.jsx)("span",{className:"text-2xl",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}},32941:(e,s,t)=>{"use strict";t.d(s,{mc:()=>r,wn:()=>c,xA:()=>n,zY:()=>l});var a=t(95155);function l(e){let{title:s,subtitle:t,actions:l}=e;return(0,a.jsx)("div",{className:"mb-8",children:(0,a.jsxs)("div",{className:"flex items-start justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-4xl font-display tracking-tight text-white mb-2",children:s}),t&&(0,a.jsx)("p",{className:"text-text-muted text-lg",children:t})]}),l&&(0,a.jsx)("div",{className:"flex items-center gap-3",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:"container-custom ".concat(t),children:s})}function n(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-4",md:"gap-6",lg:"gap-8"}[l]," ").concat(c),children:s})}t(12115)},49903:(e,s,t)=>{"use strict";t.d(s,{$n:()=>r,z9:()=>n});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:n,...i}=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-3 py-1.5 text-sm",md:"px-4 py-2",lg:"px-6 py-3 text-lg"}[t]," ").concat(r," ").concat(l?"opacity-75 cursor-wait":""),disabled:n||l,...i,children:l?(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"spinner w-4 h-4"}),"Loading..."]}):c})}function n(e){let{variant:s="primary",size:t="md",children:l,className:r="",href:n="#",...i}=e;return(0,a.jsx)(c(),{href:n,className:"".concat({primary:"btn-primary",secondary:"btn-secondary",ghost:"btn-ghost"}[s]," ").concat({sm:"px-3 py-1.5 text-sm",md:"px-4 py-2",lg:"px-6 py-3 text-lg"}[t]," ").concat(r),...i,children:l})}t(12115)},66766:(e,s,t)=>{"use strict";t.d(s,{default:()=>l.a});var a=t(71469),l=t.n(a)},71469:(e,s,t)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),!function(e,s){for(var t in s)Object.defineProperty(e,t,{enumerable:!0,get:s[t]})}(s,{default:function(){return i},getImageProps:function(){return n}});let a=t(88229),l=t(38883),c=t(33063),r=a._(t(51193));function n(e){let{props:s}=(0,l.getImgProps)(e,{defaultLoader:r.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,t]of Object.entries(s))void 0===t&&delete s[e];return{props:s}}let i=c.Image},89484:(e,s,t)=>{Promise.resolve().then(t.bind(t,11656))}},e=>{e.O(0,[874,63,454,441,964,120],()=>e(e.s=89484)),_N_E=e.O()}]);