File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff 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 (
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 11import Sockette from 'sockette' ;
22import { EventEmitter } from 'events' ;
33
4- export const SOCKET_EVENTS = [
5- 'SOCKET_OPEN' ,
6- 'SOCKET_RECONNECT' ,
7- 'SOCKET_CLOSE' ,
8- 'SOCKET_ERROR' ,
9- ] ;
10-
114export class Websocket extends EventEmitter {
125 // Timer instance for this socket.
136 private timer : any = null ;
You can’t perform that action at this time.
0 commit comments