forked from noxious/client
added a bit of styling to character screen, listen for socket notifications
This commit is contained in:
@ -28,6 +28,12 @@ export const useSocketStore: StoreDefinition<any> = defineStore('socket', {
|
||||
console.log("Reconnect failed")
|
||||
this.disconnectSocket();
|
||||
})
|
||||
|
||||
this.connection.on('notification', (data: any) => {
|
||||
if(data.error) console.error(data.error);
|
||||
if (data.success) console.log(data.success);
|
||||
if (data.message) console.log(data.message);
|
||||
});
|
||||
},
|
||||
disconnectSocket() {
|
||||
if (!this.connection) return;
|
||||
|
Reference in New Issue
Block a user