Fixes, theming & deploy files
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user