From fb4f1d68cc01bb9fff7a60d082ca0c306d13dfc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Thu, 3 Dec 2020 20:46:54 +0100 Subject: [PATCH] remove WS and add memberUpdate. --- src/component/main.vue | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/component/main.vue b/src/component/main.vue index 45a5a77b..07d54e1f 100644 --- a/src/component/main.vue +++ b/src/component/main.vue @@ -196,23 +196,19 @@ public requestControl() { this.api.user.controlRequest() - //this.websocket.send('control/request') } public releaseControl() { this.api.user.controlRelease() - //this.websocket.send('control/release') } public takeControl() { this.api.admin.controlTake() - //this.websocket.send('control/take') } public giveControl(id: string) { const controlTargetPayload = { id } this.api.admin.controlGive({ controlTargetPayload }) - //this.websocket.send('control/give', { id }) } public resetControl() { @@ -238,6 +234,22 @@ this.api.admin.membersCreate({ memberDataPayload }) } + public memberUpdate( + memberId: string, + memberDataPayload: { + secret: string + name: string + isAdmin: boolean + canLogin: boolean + canConnect: boolean + canWatch: boolean + canHost: boolean + canAccessClipboard: boolean + }, + ) { + this.api.admin.membersUpdate({ memberId, memberDataPayload }) + } + public memberDelete(memberId: string) { this.api.admin.membersDelete({ memberId }) }