File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
resources/scripts/components/server Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,15 @@ import { faMicrochip } from '@fortawesome/free-solid-svg-icons/faMicrochip';
1010import { bytesToHuman } from '@/helpers' ;
1111import Spinner from '@/components/elements/Spinner' ;
1212
13+ type PowerAction = 'start' | 'stop' | 'restart' | 'kill' ;
14+
1315const GreyBox = styled . div `
1416 ${ tw `mt-4 shadow-md bg-neutral-700 rounded p-3 flex text-xs` }
1517` ;
1618
1719const ChunkedConsole = lazy ( ( ) => import ( '@/components/server/Console' ) ) ;
1820
19- const StopOrKillButton = ( { onPress } : { onPress : ( action : string ) => void } ) => {
21+ const StopOrKillButton = ( { onPress } : { onPress : ( action : PowerAction ) => void } ) => {
2022 const [ clicked , setClicked ] = useState ( false ) ;
2123 const status = ServerContext . useStoreState ( state => state . status . value ) ;
2224
@@ -60,7 +62,7 @@ export default () => {
6062 setCpu ( stats . cpu_absolute ) ;
6163 } ;
6264
63- const sendPowerCommand = ( command : 'start' | 'stop' | 'restart' | 'kill' ) => {
65+ const sendPowerCommand = ( command : PowerAction ) => {
6466 instance && instance . send ( 'set state' , command ) ;
6567 } ;
6668
You can’t perform that action at this time.
0 commit comments