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
16 KiB
1 line
16 KiB
7 months ago
|
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[941],{91953:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/file-manager",function(){return t(6033)}])},39937:function(e,n,t){"use strict";t.d(n,{Z:function(){return D}});var l=t(85893),i=t(19338),s=t(89262),r=t(32653),o=t(14440),a=t(34815),c=t(80594),d=t(67294),u=t(77831),h=t(55278),m=t(26076),p=t(8489),g=t(37969),x=t(54965),v=t(49520);let f=[{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"}],j={width:"40em",height:"40em"};var Z=t(98484),b=t(29535),w=t(56903),y=t(97607),k=t(59278),C=t(6946);let S="AnvilDrawer",M={actionIcon:"".concat(S,"-actionIcon"),list:"".concat(S,"-list")},_=(0,s.ZP)(p.ZP)(()=>({["& .".concat(M.list)]:{width:"200px"},["& .".concat(M.actionIcon)]:{fontSize:"2.3em",color:u.of}}));var F=e=>{let{open:n,setOpen:t}=e,{getSessionUser:i}=(0,C.Z)(),s=i();return(0,l.jsx)(_,{BackdropProps:{invisible:!0},anchor:"left",open:n,onClose:()=>t(!n),children:(0,l.jsx)("div",{role:"presentation",children:(0,l.jsxs)(g.Z,{className:M.list,children:[(0,l.jsx)(x.ZP,{children:(0,l.jsx)(k.Ac,{children:s?(0,l.jsxs)(l.Fragment,{children:["Welcome, ",s.name]}):"Unregistered"})}),(0,l.jsx)(b.Z,{}),(0,l.jsx)(v.Z,{component:"a",href:"/index.html",children:(0,l.jsxs)(w.Z,{fullWidth:!0,row:!0,spacing:"2em",children:[(0,l.jsx)(h.Z,{className:M.actionIcon}),(0,l.jsx)(k.Ac,{children:"Dashboard"})]})}),f.map(e=>(0,l.jsx)(v.Z,{component:"a",href:e.uri,children:(0,l.jsxs)(w.Z,{fullWidth:!0,row:!0,spacing:"2em",children:[(0,l.jsx)("img",{alt:e.text,src:e.image,...j}),(0,l.jsx)(k.Ac,{children:e.text})]})},"anvil-drawer-".concat(e.image))),(0,l.jsx)(v.Z,{onClick:()=>{Z.Z.put("/auth/logout").then(()=>{window.location.replace("/login")}).catch(e=>{(0,y.Z)(e)})},children:(0,l.jsxs)(w.Z,{fullWidth:!0,row:!0,spacing:"2em",children:[(0,l.jsx)(m.Z,{className:M.actionIcon}),(0,l.jsx)(k.Ac,{children:"Logout"})]})})]})})})},I=t(85838),A=t(39333);let O="Header",P={input:"".concat(O,"-input"),barElement:"".concat(O,"-barElement"),iconBox:"".concat(O,"-iconBox"),searchBar:"".concat(O,"-searchBar"),icons:"".concat(O,"-icons")},R=(0,s.ZP)(r.Z)(e=>{let{theme:n}=e;return{paddingTop:n.spacing(.5),paddingBottom:n.spacing(.5),paddingLeft:n.spacing(3),paddingRight:n.spacing(3),borderBottom:"solid 1px",borderBottomColor:u.hM,position:"static",["& .".concat(P.input)]:{height:"2.8em",width:"30vw",backgroundColor:n.palette.secondary.main,borderRadius:u.n_},["& .".concat(P.barElement)]:{padding:0},["& .".concat(P.iconBox)]:{[n.breakpoints.down("sm")]:{display:"none"}},["& .".concat(P.searchBar)]:{[n.breakpoints.down("sm")]:{flexGrow:1,paddingLeft:"15vw"}},["& .".concat(P.icons)]:{paddingLeft:".1em",paddingRight:".1em"}}});var D=()=>{let e=(0,d.useRef)({}),n=(0,d.useRef)({}),[t,s]=(0,d.useState)(!1);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(R,{children:(0,l.jsxs)(o.Z,{display:"flex",justifyContent:"space-between",flexDirection:"row",children:[(0,l.jsx)(w.Z,{row:!0,children:(0,l.jsx)(a.Z,{onClick:()=>s(!t),children:(0,l.jsx)("img",{alt:"",src:"/pngs/logo.png",width:"160",height:"40"})})}),(0,l.jsx)(w.Z,{className:P.iconBox,row:!0,spacing:0,children:(0,l.jsx)(o.Z,{children:(0,l.jsx)(c.Z,{onClick:e=>{var t,l;let{currentTarget:i}=e;null===(t=n.current.setAnchor)||void 0===t||t.call(null,i),null===(l=n.current.setOpen)||void 0===l||l.call(null,!0)},sx:{color:u.of,padding:"0 .1rem"},children:(0,l.jsx)(I.Z,{icon:i.Z,ref:e})})})})]})}),(0,l.jsx)(F,{open:t,setOpen:s}),(0,l.jsx)(A.Z,{onFetchSuccessAppend:n=>{var t;null===(t=e.current.indicate)||void 0===t||t.call(null,Object.keys(n).length>0)},ref:n})]})}},62848:function(e,n,t){"use strict";var l=t(67294);n.Z=function(){let{actionProceedText:e="",content:n="",titleText:t="",...i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.useState)({action
|