Fixes, theming & deploy files

This commit is contained in:
Thomas
2020-08-01 18:19:39 +02:00
parent 76c6b45e2b
commit 1990ff0f04
23 changed files with 552 additions and 403 deletions

View File

@@ -39,6 +39,9 @@ const actions = {
leave ({ commit }) {
commit('LEAVE')
},
kick ({ commit }, target) {
commit('KICK', target)
},
broadcast ({ commit }, { message, type }) {
commit('BROADCAST', { message: message, type: type })
}
@@ -129,6 +132,15 @@ const mutations = {
})
state.peers = []
},
KICK (state, target) {
var peer = state.peers.find(peer => peer.name === target)
peer.dataChannel.close()
peer.connection.close()
const index = state.peers.indexOf(peer)
if (index > -1) {
state.peers.splice(index, 1)
}
},
BROADCAST (state, { message, type }) {
const data = JSON.stringify({
type: type,