mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-15 21:03:45 +02:00
First pass at connecting to console and rendering the output from the server.
This commit is contained in:
@@ -39,15 +39,13 @@ export class Websocket extends EventEmitter {
|
||||
this.socket.open();
|
||||
}
|
||||
|
||||
json (data: any) {
|
||||
this.socket.json(data);
|
||||
}
|
||||
|
||||
reconnect () {
|
||||
this.socket.reconnect();
|
||||
}
|
||||
|
||||
send (data: any) {
|
||||
this.socket.send(data);
|
||||
send (event: string, payload?: string | string[]) {
|
||||
this.socket.send(JSON.stringify({
|
||||
event, args: Array.isArray(payload) ? payload : [ payload ],
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user