Local modifications to ClusterLabs/Anvil by Alteeve
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
6.8 KiB

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[753],{8954:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/server",function(){return t(1142)}])},8750:function(e,n,t){"use strict";t.d(n,{Z:function(){return V}});var r=t(5893),o=t(1113),i=t(1496),c=t(2293),a=t(7357),l=t(2992),s=t(4799),u=t(7294),d=t(7169),f=t(4433),p=t(9029),g=t(7533),h=t(8462),v=t(7212),m=t(8619),x=[{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:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],j={width:"40em",height:"40em"},b=t(4390),w=t(582),Z=t(4690),y=t(1770),O=t(7750),k=t(1883);function _(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){_(e,n,t[n])}))}return e}var P="AnvilDrawer",S={actionIcon:"".concat(P,"-actionIcon"),list:"".concat(P,"-list")},N=(0,i.ZP)(g.ZP)((function(){var e;return _(e={},"& .".concat(S.list),{width:"200px"}),_(e,"& .".concat(S.actionIcon),{fontSize:"2.3em",color:d.of}),e})),B=function(e){var n=e.open,t=e.setOpen,o=(0,(0,k.Z)().getSessionUser)();return(0,r.jsx)(N,{BackdropProps:{invisible:!0},anchor:"left",open:n,onClose:function(){return t(!n)},children:(0,r.jsx)("div",{role:"presentation",children:(0,r.jsxs)(h.Z,{className:S.list,children:[(0,r.jsx)(v.ZP,{children:(0,r.jsx)(O.Ac,{children:o?(0,r.jsxs)(r.Fragment,{children:["Welcome, ",o.name]}):"Unregistered"})}),(0,r.jsx)(w.Z,{}),(0,r.jsx)(m.Z,{component:"a",href:"/index.html",children:(0,r.jsxs)(Z.Z,{fullWidth:!0,row:!0,spacing:"2em",children:[(0,r.jsx)(f.Z,{className:S.actionIcon}),(0,r.jsx)(O.Ac,{children:"Dashboard"})]})}),x.map((function(e){return(0,r.jsx)(m.Z,{component:"a",href:e.uri,children:(0,r.jsxs)(Z.Z,{fullWidth:!0,row:!0,spacing:"2em",children:[(0,r.jsx)("img",C({alt:e.text,src:e.image},j)),(0,r.jsx)(O.Ac,{children:e.text})]})},"anvil-drawer-".concat(e.image))})),(0,r.jsx)(m.Z,{onClick:function(){b.Z.put("/auth/logout").then((function(){window.location.replace("/login")})).catch((function(e){(0,y.Z)(e)}))},children:(0,r.jsxs)(Z.Z,{fullWidth:!0,row:!0,spacing:"2em",children:[(0,r.jsx)(p.Z,{className:S.actionIcon}),(0,r.jsx)(O.Ac,{children:"Logout"})]})})]})})})},E=t(3377),D=t(2444);function A(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var I="Header",R={input:"".concat(I,"-input"),barElement:"".concat(I,"-barElement"),iconBox:"".concat(I,"-iconBox"),searchBar:"".concat(I,"-searchBar"),icons:"".concat(I,"-icons")},U=(0,i.ZP)(c.Z)((function(e){var n,t=e.theme;return A(n={paddingTop:t.spacing(.5),paddingBottom:t.spacing(.5),paddingLeft:t.spacing(3),paddingRight:t.spacing(3),borderBottom:"solid 1px",borderBottomColor:d.hM,position:"static"},"& .".concat(R.input),{height:"2.8em",width:"30vw",backgroundColor:t.palette.secondary.main,borderRadius:d.n_}),A(n,"& .".concat(R.barElement),{padding:0}),A(n,"& .".concat(R.iconBox),A({},t.breakpoints.down("sm"),{display:"none"})),A(n,"& .".concat(R.searchBar),A({},t.breakpoints.down("sm"),{flexGrow:1,paddingLeft:"15vw"})),A(n,"& .".concat(R.icons),{paddingLeft:".1em",paddingRight:".1em"}),n})),V=function(){var e=(0,u.useRef)({}),n=(0,u.useRef)({}),t=(0,u.useState)(!1),i=t[0],c=t[1];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(U,{children:(0,r.jsxs)(a.Z,{display:"flex",justifyContent:"space-between",flexDirection:"row",children:[(0,r.jsx)(Z.Z,{row:!0,children:(0,r.jsx)(l.Z,{onClick:function(){return c(!i)},children:(0,r.jsx)("img",{alt:"",src:"/pngs/logo.png",width:"160",height:"40"})})}),(0,r.jsx)(Z.Z,{className:R.iconBox,row:!0,spacing:0,children:(0,r.jsx)(a.Z,{children:(0,r.jsx)(s.Z,{onClick:fu