Disconnect from server if not in room
This commit is contained in:
parent
18484fbbcb
commit
f6d9ffd5c1
|
@ -64,7 +64,7 @@
|
|||
|
||||
<!-- MODALS -->
|
||||
<div v-if="darkMode">
|
||||
<sweet-modal ref="joinroomModal" overlay-theme="dark" modal-theme="dark" >
|
||||
<sweet-modal v-on:close="joinRoomModalClosed()" ref="joinroomModal" overlay-theme="dark" modal-theme="dark" >
|
||||
<joinroom></joinroom>
|
||||
</sweet-modal>
|
||||
</div>
|
||||
|
@ -313,6 +313,11 @@ export default {
|
|||
return this.$refs.joinroomModal.open()
|
||||
//$('#joinRoomModal').modal('open');
|
||||
},
|
||||
joinRoomModalClosed: function(){
|
||||
if (!this.ptRoom){
|
||||
this.$store.dispatch('disconnectServer')
|
||||
}
|
||||
},
|
||||
showChat: function(){
|
||||
this.showToggleChat = !this.showToggleChat
|
||||
console.log('toggleChat')
|
||||
|
|
|
@ -151,7 +151,6 @@ export default {
|
|||
joinRoom: function(){
|
||||
var that = this
|
||||
console.log('Attempting to join room ' + this.room)
|
||||
console.log(this)
|
||||
if (!this.context.getters.getConnected){
|
||||
console.log('Cant join room because we arent connected to a server!')
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue