mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 14:23:44 +02:00
Correctly handle socket state in the app and make it possible to listen for events
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { Action, action } from 'easy-peasy';
|
||||
import Sockette from 'sockette';
|
||||
import { Websocket } from '@/plugins/Websocket';
|
||||
|
||||
export interface SocketState {
|
||||
instance: Sockette | null;
|
||||
instance: Websocket | null;
|
||||
connected: boolean;
|
||||
setInstance: Action<SocketState, Sockette | null>;
|
||||
setInstance: Action<SocketState, Websocket | null>;
|
||||
setConnectionState: Action<SocketState, boolean>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user