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
11 KiB
1 line
11 KiB
9 months ago
|
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[302],{81302:function(e,n,t){t.d(n,{S:function(){return Display_FullSize},M:function(){return L}});var l=t(85893),r=t(50594),s=t(25709),i=t(31846),o=t(90948),c=t(5616),a=t(87627),u=t(15861),d=t(5152),h=t.n(d),x=t(67294),v=t(83221);let f="0xffe3",m="0xffe9";var p=[{keys:"Ctrl + Alt + Delete",scans:[]},{keys:"Ctrl + Alt + F1",scans:[f,m,"0xffbe"]},{keys:"Ctrl + Alt + F2",scans:[f,m,"0xffbf"]},{keys:"Ctrl + Alt + F3",scans:[f,m,"0xffc0"]},{keys:"Ctrl + Alt + F4",scans:[f,m,"0xffc1"]},{keys:"Ctrl + Alt + F5",scans:[f,m,"0xffc2"]},{keys:"Ctrl + Alt + F6",scans:[f,m,"0xffc3"]},{keys:"Ctrl + Alt + F7",scans:[f,m,"0xffc4"]},{keys:"Ctrl + Alt + F8",scans:[f,m,"0xffc5"]},{keys:"Ctrl + Alt + F9",scans:[f,m,"0xffc6"]}],j=t(65275),g=t(37260),C=t(39858),w=t(67645),b=t(57976),k=t(19467),Z=t(52621),components_Menu=e=>{let{getItemDisabled:n,items:t={},muiMenuProps:r,onItemClick:s,open:i,renderItem:o}=e,c=(0,x.useMemo)(()=>Object.entries(t),[t]),u=(0,x.useMemo)(()=>c.map(e=>{let[t,r]=e;return(0,l.jsx)(j.Z,{disabled:null==n?void 0:n.call(null,t,r),onClick:function(){for(var e=arguments.length,n=Array(e),l=0;l<e;l++)n[l]=arguments[l];return null==s?void 0:s.call(null,t,r,...n)},children:null==o?void 0:o.call(null,t,r)},t)}),[n,s,c,o]);return(0,l.jsx)(a.Z,{open:i,...r,children:u})},components_ButtonWithMenu=e=>{let{children:n,containedButtonProps:t,iconButtonProps:r,muiMenuProps:s,onButtonClick:i,onItemClick:o,variant:a="icon",...u}=e,[d,h]=(0,x.useState)(null),v=(0,x.useMemo)(()=>!!d,[d]),f=(0,x.useMemo)(()=>n||("icon"===a?(0,l.jsx)(b.Z,{fontSize:null==r?void 0:r.size}):"Options"),[n,null==r?void 0:r.size,a]),m=(0,x.useCallback)(function(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];let{0:{currentTarget:l}}=n;return h(l),null==i?void 0:i.call(null,...n)},[i]),p=(0,x.useMemo)(()=>"contained"===a?(0,l.jsx)(k.Z,{onClick:m,...t,children:f}):(0,l.jsx)(Z.Z,{onClick:m,...r,children:f}),[m,f,t,r,a]),j=(0,x.useCallback)(function(e,n){for(var t=arguments.length,l=Array(t>2?t-2:0),r=2;r<t;r++)l[r-2]=arguments[r];return h(null),null==o?void 0:o.call(null,e,n,...l)},[o]);return(0,l.jsxs)(c.Z,{children:[p,(0,l.jsx)(components_Menu,{muiMenuProps:{anchorEl:d,keepMounted:!0,onClose:()=>h(null),...s},onItemClick:j,open:v,...u})]})},y=t(41247),P=t(84154),S=t(7576),components_ServerMenu=e=>{var n;let{getItemDisabled:t,items:r,onItemClick:s,renderItem:i,serverName:o,serverState:a,serverUuid:u,...d}=e,{confirmDialog:h,setConfirmDialogOpen:v,setConfirmDialogProps:f,finishConfirm:m}=(0,S.Z)(),p=(0,x.useMemo)(()=>({"force-off":{colour:"red",description:(0,l.jsx)(l.Fragment,{children:"This is equal to pulling the power cord, which may cause data loss or system corruption."}),label:"Force off",path:"/command/stop-server/".concat(u,"?force=1")},"power-off":{description:(0,l.jsx)(l.Fragment,{children:"This is equal to pushing the power button. If the server doesn't respond to the corresponding signals, you may have to manually shut it down."}),label:"Power off",path:"/command/stop-server/".concat(u)},"power-on":{description:(0,l.jsx)(l.Fragment,{children:"This is equal to pushing the power button."}),label:"Power on",path:"/command/start-server/".concat(u)}}),[u]);return(0,l.jsxs)(c.Z,{children:[(0,l.jsx)(components_ButtonWithMenu,{getItemDisabled:e=>{let n=e.includes("on");return"running"===a===n},items:p,onItemClick:(e,n)=>{let{colour:t,description:r,label:s,path:i}=n,c=s.toLocaleLowerCase();f({actionProceedText:s,content:(0,l.jsx)(P.Ac,{children:r}),onProceedAppend:()=>{f(e=>({...e,loading:!0})),w.Z.put(i).then(()=>{m("Success",{children:(0,l.jsxs)(l.Fragment,{children:["Successfully registered ",c," job on ",o,"."]})})}).catch(e=>{let n=(0,y.Z)(e);n.children=(0,l.jsxs)(l.Fragment,{children:["Failed to register ",c," job on ",o,"; CAUSE:"," ",n.children,"."]}),m("Error",n)})},proceedColour:t,titleText:"".concat(s," server ").concat(o,"?")}),v(!0)},renderItem:(e,n)=>{let t;let{colour:r,label:s}=n;return r&&(t=k.D[r]),(0,l.jsx)(P.Ac,{inheritColour:!0,color:t,children:s})},...
|