You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
30 KiB
1 line
30 KiB
7 months ago
|
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[817],{72315:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/anvil",function(){return n(38312)}])},42458:function(e,t,n){"use strict";var s=n(85893),r=n(14440),o=n(77831);let a="Decorator",i={ok:"".concat(a,"-ok"),warning:"".concat(a,"-warning"),error:"".concat(a,"-error"),off:"".concat(a,"-off")};t.Z=e=>{let{colour:t,sx:n,...a}=e;return(0,s.jsx)(r.Z,{...a,className:i[t],sx:{borderRadius:o.n_,height:"100%",width:"1.4em",["&.".concat(i.ok)]:{backgroundColor:o.Ej},["&.".concat(i.warning)]:{backgroundColor:o.Wd},["&.".concat(i.error)]:{backgroundColor:o.hM},["&.".concat(i.off)]:{backgroundColor:o.s7},...n}})}},39937:function(e,t,n){"use strict";n.d(t,{Z:function(){return D}});var s=n(85893),r=n(19338),o=n(89262),a=n(32653),i=n(14440),c=n(34815),l=n(80594),d=n(67294),u=n(77831),h=n(55278),x=n(26076),g=n(8489),m=n(37969),p=n(54965),j=n(49520);let v=[{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/manage-element"},{text:"Files",image:"/pngs/files_on.png",uri:"/file-manager"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/config"},{text:"Mail",image:"/pngs/email_on.png",uri:"/mail-config"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],f={width:"40em",height:"40em"};var Z=n(98484),b=n(29535),w=n(56903),_=n(97607),k=n(59278),C=n(6946);let N="AnvilDrawer",y={actionIcon:"".concat(N,"-actionIcon"),list:"".concat(N,"-list")},A=(0,o.ZP)(g.ZP)(()=>({["& .".concat(y.list)]:{width:"200px"},["& .".concat(y.actionIcon)]:{fontSize:"2.3em",color:u.of}}));var S=e=>{let{open:t,setOpen:n}=e,{getSessionUser:r}=(0,C.Z)(),o=r();return(0,s.jsx)(A,{BackdropProps:{invisible:!0},anchor:"left",open:t,onClose:()=>n(!t),children:(0,s.jsx)("div",{role:"presentation",children:(0,s.jsxs)(m.Z,{className:y.list,children:[(0,s.jsx)(p.ZP,{children:(0,s.jsx)(k.Ac,{children:o?(0,s.jsxs)(s.Fragment,{children:["Welcome, ",o.name]}):"Unregistered"})}),(0,s.jsx)(b.Z,{}),(0,s.jsx)(j.Z,{component:"a",href:"/index.html",children:(0,s.jsxs)(w.Z,{fullWidth:!0,row:!0,spacing:"2em",children:[(0,s.jsx)(h.Z,{className:y.actionIcon}),(0,s.jsx)(k.Ac,{children:"Dashboard"})]})}),v.map(e=>(0,s.jsx)(j.Z,{component:"a",href:e.uri,children:(0,s.jsxs)(w.Z,{fullWidth:!0,row:!0,spacing:"2em",children:[(0,s.jsx)("img",{alt:e.text,src:e.image,...f}),(0,s.jsx)(k.Ac,{children:e.text})]})},"anvil-drawer-".concat(e.image))),(0,s.jsx)(j.Z,{onClick:()=>{Z.Z.put("/auth/logout").then(()=>{window.location.replace("/login")}).catch(e=>{(0,_.Z)(e)})},children:(0,s.jsxs)(w.Z,{fullWidth:!0,row:!0,spacing:"2em",children:[(0,s.jsx)(x.Z,{className:y.actionIcon}),(0,s.jsx)(k.Ac,{children:"Logout"})]})})]})})})},B=n(85838),P=n(39333);let T="Header",I={input:"".concat(T,"-input"),barElement:"".concat(T,"-barElement"),iconBox:"".concat(T,"-iconBox"),searchBar:"".concat(T,"-searchBar"),icons:"".concat(T,"-icons")},F=(0,o.ZP)(a.Z)(e=>{let{theme:t}=e;return{paddingTop:t.spacing(.5),paddingBottom:t.spacing(.5),paddingLeft:t.spacing(3),paddingRight:t.spacing(3),borderBottom:"solid 1px",borderBottomColor:u.hM,position:"static",["& .".concat(I.input)]:{height:"2.8em",width:"30vw",backgroundColor:t.palette.secondary.main,borderRadius:u.n_},["& .".concat(I.barElement)]:{padding:0},["& .".concat(I.iconBox)]:{[t.breakpoints.down("sm")]:{display:"none"}},["& .".concat(I.searchBar)]:{[t.breakpoints.down("sm")]:{flexGrow:1,paddingLeft:"15vw"}},["& .".concat(I.icons)]:{paddingLeft:".1em",paddingRight:".1em"}}});var D=()=>{let e=(0,d.useRef)({}),t=(0,d.useRef)({}),[n,o]=(0,d.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(F,{children:(0,s.jsxs)(i.Z,{display:"flex",justifyContent:"space-between",flexDirection:"row",children:[(0,s.jsx)(w.Z,{row:!0,children:(0,s.jsx)(c.Z,{onClick:()=>o(!n),children:(0,s.jsx)("img",{alt:"",src:"/pngs/logo.png",width:"160",height:"40"})})}),(0,s.jsx)(w.Z,{className:I.iconBox,row:!0,spacing:0,children:(0,s.jsx)(i.Z,{children:(0,s.jsx)(l.Z,{onClick:e=>{var n,s;let{currentTarget:r}=e;null===(n=t.current.setAnchor)||void 0===n||n.call(null,r),null===(s=t.current
|