From f90c506928cab678ad5e4a169c709e647329d131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sat, 7 Nov 2020 15:08:39 +0100 Subject: [PATCH] listen to all events. --- src/app.vue | 53 +++++++++++++++++++++++++- src/components/canvas.vue | 12 ++++-- src/internal/messages.ts | 79 +++++++++++++++++++++++++-------------- 3 files changed, 111 insertions(+), 33 deletions(-) diff --git a/src/app.vue b/src/app.vue index af3f292b..f30772d3 100644 --- a/src/app.vue +++ b/src/app.vue @@ -52,9 +52,60 @@ } mounted() { - this.neko.events.on('connected', () => { + this.neko.events.on('connect', () => { console.log('connected...') }) + this.neko.events.on('host.change', (id) => { + console.log('host.change', id) + }) + this.neko.events.on('disconnect', (message) => { + console.log('disconnect', message) + }) + this.neko.events.on('member.list', (members) => { + console.log('member.list', members) + }) + this.neko.events.on('member.connected', (id) => { + console.log('member.connected', id) + }) + this.neko.events.on('member.disconnected', (id) => { + console.log('member.disconnected', id) + }) + this.neko.events.on('control.request', (id) => { + console.log('control.request', id) + }) + this.neko.events.on('control.requesting', (id) => { + console.log('control.requesting', id) + }) + this.neko.events.on('clipboard.update', (text) => { + console.log('clipboard.update', text) + }) + this.neko.events.on('screen.configuration', (configurations) => { + console.log('screen.configuration', configurations) + }) + this.neko.events.on('screen.size', (width, height, rate) => { + console.log('screen.size', width, height, rate) + }) + this.neko.events.on('broadcast.status', (payload) => { + console.log('broadcast.status', payload) + }) + this.neko.events.on('member.ban', (id, target) => { + console.log('member.ban', id, target) + }) + this.neko.events.on('member.kick', (id, target) => { + console.log('member.kick', id, target) + }) + this.neko.events.on('member.muted', (id, target) => { + console.log('member.muted', id, target) + }) + this.neko.events.on('member.unmuted', (id, target) => { + console.log('member.unmuted', id, target) + }) + this.neko.events.on('room.locked', (id) => { + console.log('room.locked', id) + }) + this.neko.events.on('room.unlocked', (id) => { + console.log('room.unlocked', id) + }) } } diff --git a/src/components/canvas.vue b/src/components/canvas.vue index f14e4ec0..d7423064 100644 --- a/src/components/canvas.vue +++ b/src/components/canvas.vue @@ -1,6 +1,10 @@