fix private toggle
This commit is contained in:
parent
da26eae24c
commit
929024a717
@ -91,6 +91,7 @@ export default {
|
|||||||
this.lobbyName = data.name
|
this.lobbyName = data.name
|
||||||
this.started = data.started
|
this.started = data.started
|
||||||
this.password = data.password
|
this.password = data.password
|
||||||
|
this.privateRoom = data.password !== ''
|
||||||
this.useDodgeCity = data.expansions.indexOf('dodge_city') !== -1
|
this.useDodgeCity = data.expansions.indexOf('dodge_city') !== -1
|
||||||
this.players = data.players.map(x => {
|
this.players = data.players.map(x => {
|
||||||
return {
|
return {
|
||||||
@ -221,8 +222,9 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
privateRoom() {
|
privateRoom(old, _new) {
|
||||||
this.$socket.emit('private')
|
if (this.isRoomOwner && old !== _new)
|
||||||
|
this.$socket.emit('private')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
Loading…
Reference in New Issue
Block a user