mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
More socket and console improvements for server
This commit is contained in:
29
resources/assets/scripts/store/modules/socket.js
Normal file
29
resources/assets/scripts/store/modules/socket.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import Status from './../../helpers/statuses';
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
connected: false,
|
||||
connectionError: null,
|
||||
status: Status.STATUS_OFF,
|
||||
},
|
||||
actions: {
|
||||
},
|
||||
mutations: {
|
||||
SOCKET_CONNECT: (state) => {
|
||||
state.connected = true;
|
||||
},
|
||||
|
||||
SOCKET_ERROR: (state, err) => {
|
||||
state.connectionError = err;
|
||||
},
|
||||
|
||||
'SOCKET_INITIAL STATUS': (state, data) => {
|
||||
state.status = data.status;
|
||||
},
|
||||
|
||||
SOCKET_STATUS: (state, data) => {
|
||||
state.status = data.status;
|
||||
}
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user