Skip to content

Commit 231ff03

Browse files
committed
Fix kill button not showing up when restarting
1 parent c0f7c9b commit 231ff03

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

resources/scripts/components/server/StopOrKillButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const StopOrKillButton = ({ onPress }: { onPress: (action: PowerAction) => void
88
const status = ServerContext.useStoreState(state => state.status.value);
99

1010
useEffect(() => {
11-
setClicked(state => [ 'stopping' ].indexOf(status) < 0 ? false : state);
11+
setClicked(status === 'stopping');
1212
}, [ status ]);
1313

1414
return (
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export enum SocketEvent {
2+
DAEMON_MESSAGE = 'daemon message',
3+
INSTALL_OUTPUT = 'install output',
4+
INSTALL_STARTED = 'install started',
5+
INSTALL_COMPLETED = 'install completed',
6+
CONSOLE_OUTPUT = 'console output',
7+
STATUS = 'status',
8+
STATS = 'stats',
9+
BACKUP_COMPLETED = 'backup completed',
10+
}

resources/scripts/plugins/Websocket.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
import Sockette from 'sockette';
22
import { EventEmitter } from 'events';
33

4-
export const SOCKET_EVENTS = [
5-
'SOCKET_OPEN',
6-
'SOCKET_RECONNECT',
7-
'SOCKET_CLOSE',
8-
'SOCKET_ERROR',
9-
];
10-
114
export class Websocket extends EventEmitter {
125
// Timer instance for this socket.
136
private timer: any = null;

0 commit comments

Comments
 (0)