User controls, UI improvement

This commit is contained in:
Thomas
2020-08-04 16:00:55 +02:00
parent 1d1d79f90e
commit ea81b7f598
11 changed files with 182 additions and 68 deletions

View File

@@ -195,7 +195,10 @@ function handleDataChannelMessage (event) {
console.log('[RTC] data channel message type ' + data.type)
switch (data.type) {
case 'status':
store.dispatch('room/setRoomStatus', data.message)
if (!store.state.room.admin || store.state.room.roomSettings.userControl) store.dispatch('room/setRoomStatus', data.message)
break
case 'settings':
if (!store.state.room.admin) store.dispatch('room/setRoomSettings', data.message)
break
case 'vote':
store.dispatch('room/vote', { link: data.message.link, linkID: data.message.linkID, isPositive: data.message.isPositive, voterName: data.message.voterName })