UI updates

This commit is contained in:
advplyr 2022-04-09 20:29:59 -05:00
parent 12a153d423
commit abf140bd21
10 changed files with 142 additions and 51 deletions

View file

@ -46,6 +46,7 @@ class ServerSocket extends EventEmitter {
this.socket.on('connect', this.onConnect.bind(this))
this.socket.on('disconnect', this.onDisconnect.bind(this))
this.socket.on('init', this.onInit.bind(this))
this.socket.on('user_updated', this.onUserUpdated.bind(this))
this.socket.onAny((evt, args) => {
console.log(`[SOCKET] ${this.socket.id}: ${evt} ${JSON.stringify(args)}`)
@ -78,6 +79,11 @@ class ServerSocket extends EventEmitter {
}
this.emit('initialized', true)
}
onUserUpdated(data) {
console.log('[SOCKET] User updated', data)
this.emit('user_updated', data)
}
}
export default ({ app, store }, inject) => {