dsql-admin/dsql-app/.local_dist/static/chunks/5313-568ff7314fa4913c.js
Benjamin Toby 1584891c88 Bug Fixes
2024-11-05 16:25:58 +01:00

1 line
5.8 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5313],{85313:function(e,s,l){l.d(s,{Z:function(){return b}});var a=l(85893),t=l(67294),n=l(9008),r=l.n(n),i=l(828),c=l(64017),d=l(64689),x=l(38544),o=l(39269),u=l(50027),h=l(51903),m=l(28466);function p(e){var s=(0,i.Z)(t.useState(!0),2),l=s[0],n=s[1];return(0,a.jsxs)("aside",{className:"aside"+(l?" mobile-collapsed":" mobile-expanded"),style:{maxWidth:l?"250px":"300px",zIndex:800},children:[(0,a.jsx)(c.Z,{adminAside:!0,collapseAsideMobile:l,setCollapseAsideMobile:n}),(0,a.jsx)("hr",{className:"opacity-0 mt-4"}),(0,a.jsxs)("div",{className:"main-links"+(l?" hidden lg:flex":" "),children:[(0,a.jsxs)("a",{href:"/su","data-currentlink":"/su","data-strictlink":"true",children:[(0,a.jsx)(d.Z,{className:"text-slate-400"}),(0,a.jsx)("span",{children:"Dashboard"})]}),(0,a.jsxs)("a",{href:"/su/users","data-currentlink":"/su/users",children:[(0,a.jsx)(x.Z,{className:"text-slate-400"}),(0,a.jsx)("span",{children:"Users"})]}),(0,a.jsxs)("a",{href:"/su/error-logs","data-currentlink":"/su/error-logs",children:[(0,a.jsx)(o.Z,{className:"text-slate-400"}),(0,a.jsx)("span",{children:"Error Logs"})]}),!1,(0,a.jsxs)("a",{href:"/su/backups","data-currentlink":"/su/backups",children:[(0,a.jsx)(u.Z,{className:"text-slate-400"}),(0,a.jsx)("span",{children:"Backups"})]}),(0,a.jsxs)("a",{href:"/su/console","data-currentlink":"/su/console",children:[(0,a.jsx)(h.Z,{className:"text-slate-400"}),(0,a.jsx)("span",{children:"Console"})]}),(0,a.jsxs)("a",{href:"/su/envar","data-currentlink":"/su/envar",children:[(0,a.jsx)(m.Z,{className:"text-slate-400"}),(0,a.jsx)("span",{children:"Env"})]})]})]})}var f=l(44981),j=l(8971);function g(e){var s=e.user,l=(e.extraHeaderContent,(0,i.Z)(t.useState(s||null),2)),n=(l[0],l[1]);return t.useEffect((function(){(null===s||void 0===s?void 0:s.logged_in_status)&&n(s||null)}),[s]),(0,a.jsx)("section",{className:"overflow-visible w-full px-0 md:px-8 py-0 flex justify-center bg-white dark:bg-slate-800 shadow-lg gap-4 dark:shadow-black/10 z-50 shadow-slate-900/5",style:{zIndex:700,border:"none"},children:(0,a.jsxs)("div",{className:"w-full items-center justify-between gap-4 md:gap-8",children:[(0,a.jsxs)("div",{className:"hidden xl:flex flex-col items-stretch grow fixed xl:static top-0 right-0 px-4 xl:px-0 shadow-xl xl:shadow-none h-screen xl:h-auto overflow-auto xl:overflow-visible w-screen sl:w-auto bg-white xl:bg-transparent pb-10 xl:pb-0",id:"main-nav-content-wrapper",children:[(0,a.jsxs)("div",{className:"items-center mb-2 flex xl:hidden",children:[(0,a.jsx)("a",{href:"/",className:"hidden xl:flex",children:(0,a.jsx)("img",{src:"/images/logo-icon-alt-2.png",alt:"Logo Icon",width:37})}),(0,a.jsx)("button",{className:"outlined gray ml-auto",onClick:function(e){var s=document.getElementById("main-nav-content-wrapper");null===s||void 0===s||s.classList.toggle("hidden")},style:{border:"none"},children:(0,a.jsx)("span",{className:"font-semibold text-4xl",children:"\u2715"})})]}),(0,a.jsx)("div",{className:"flex items-center w-full gap-6 grow flex-col xl:flex-row justify-start xl:justify-between",children:(0,a.jsx)("div",{className:"gap-2 flex-col-reverse xl:flex-row gap-y-6 w-full xl:w-auto py-2",children:(0,a.jsxs)("div",{className:"ml-auto dropdown-wrapper",children:[(0,a.jsx)("div",{className:"bg-white rounded-full overflow-hidden",style:{width:"36px",height:"36px"},children:(0,a.jsx)("img",{src:"/images/user-preset-thumbnail.png",alt:"User Image",width:35,className:"w-full h-full object-cover"})}),(0,a.jsx)("span",{children:(0,a.jsx)("b",{children:"Super User"})}),(0,a.jsx)(j.Z,{size:20}),(0,a.jsx)("div",{className:"dropdown",children:(0,a.jsx)("a",{href:"/su/logout",children:"Logout"})})]})})})]}),(0,a.jsx)("div",{className:"ml-2",children:(0,a.jsx)(f.Z,{})}),(0,a.jsxs)("button",{className:"bg-transparent w-16 p-4 gap-1.5 flex xl:hidden flex-col hover:bg-transparent transition-all ml-auto",onClick:function(e){var s=document.getElementById("main-nav-content-wrapper");null===s||void 0===s||s.classList.toggle("hidden")},style:{minWidth:"50px",backgroundColor:"transparent"},id:"main-header-hamburger-button","aria-label":"Mobile Hambutget Button",children:[(0,a.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,a.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,a.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"})]})]})})}var w=l(29678);function b(e){var s=e.children,l=e.head,n=e.user;return t.useEffect((function(){var e=document.querySelectorAll("aside .main-links a");(0,w.Z)({links:e})}),[]),(0,a.jsxs)(t.Fragment,{children:[(0,a.jsxs)(r(),{children:[(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/admin.css"}),l]}),(0,a.jsxs)("div",{className:"admin w-full flex items-start gap-0",children:[(0,a.jsx)(p,{}),(0,a.jsxs)("main",{className:"relative",children:[(0,a.jsx)(g,{user:n}),(0,a.jsx)("div",{className:"flex-col items-start gap-6 px-4 sl:px-8 py-8 bg-slate-50 dark:bg-slate-900",children:s}),(0,a.jsx)("footer",{className:"flex justify-center w-full items-center p-4",children:(0,a.jsxs)("div",{className:"max-w-6xl w-full justify-center flex-wrap",children:[(0,a.jsxs)("a",{href:"/",className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:"/images/logo-icon-alt-2.png",alt:"Datasquirel Logo",width:30}),(0,a.jsx)("span",{className:"text-lg font-bold",children:"Datasquirel"})]}),(0,a.jsx)("span",{className:"opacity-25",children:"|"}),(0,a.jsxs)("span",{className:"text-sm text-slate-400 dark:text-slate-600 text-center",children:[(new Date).getFullYear()," \xa9 Datasquirel. All rights reserved."]}),(0,a.jsx)("span",{className:"opacity-25",children:"|"}),(0,a.jsx)("a",{href:"/docs",children:"Docs"}),(0,a.jsx)("span",{className:"opacity-25",children:"|"}),(0,a.jsx)("a",{href:"/terms",children:"Terms"})]})})]})]})]})}}}]);