|
@@ -12,7 +12,7 @@
|
|
<v-expansion-panel-header>
|
|
<v-expansion-panel-header>
|
|
<span>Meeting Room</span>
|
|
<span>Meeting Room</span>
|
|
<v-spacer></v-spacer>
|
|
<v-spacer></v-spacer>
|
|
- <v-btn v-if="meeting.uid" color="purple" small ripple outlined class="mr-3" @click.stop="leaveMeeting">Leave</v-btn>
|
|
|
|
|
|
+ <v-btn :disabled="meetingLoading" v-if="meeting.uid" color="purple" small ripple outlined class="mr-3" @click.stop="leaveMeeting">Leave</v-btn>
|
|
</v-expansion-panel-header>
|
|
</v-expansion-panel-header>
|
|
<v-expansion-panel-content>
|
|
<v-expansion-panel-content>
|
|
<meeting-room></meeting-room>
|
|
<meeting-room></meeting-room>
|
|
@@ -62,11 +62,11 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
active_panel: [0, 1, 2],
|
|
active_panel: [0, 1, 2],
|
|
- lobbies: []
|
|
|
|
|
|
+ lobbies_: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapState(["user", "meeting"])
|
|
|
|
|
|
+ ...mapState(["user", "meeting", "lobbies", "meetingLoading"])
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
meeting: {
|
|
meeting: {
|
|
@@ -75,7 +75,6 @@ export default {
|
|
this.$socket.emit("meetingLeft", { lobby_uid: oldVal.lobby_uid, meeting_name: oldVal.name, meeting_uid: oldVal.uid, user: this.user })
|
|
this.$socket.emit("meetingLeft", { lobby_uid: oldVal.lobby_uid, meeting_name: oldVal.name, meeting_uid: oldVal.uid, user: this.user })
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
if (newVal && newVal.uid) {
|
|
if (newVal && newVal.uid) {
|
|
this.$socket.emit("meetingJoined", { lobby_uid: newVal.lobby_uid, meeting_name: newVal.name, meeting_uid: newVal.uid, user: this.user })
|
|
this.$socket.emit("meetingJoined", { lobby_uid: newVal.lobby_uid, meeting_name: newVal.name, meeting_uid: newVal.uid, user: this.user })
|
|
|
|
|
|
@@ -109,19 +108,23 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
sockets: {
|
|
sockets: {
|
|
- incomingCall: function(data) {
|
|
|
|
|
|
+ incomingCall: function(data){
|
|
let self = this
|
|
let self = this
|
|
|
|
|
|
this.$store.commit('setCall', data)
|
|
this.$store.commit('setCall', data)
|
|
},
|
|
},
|
|
- reconnect: function() {
|
|
|
|
|
|
+ disconnect: function(){
|
|
|
|
+ this.$store.commit("nullifyMeetingsOnline")
|
|
|
|
+ },
|
|
|
|
+ reconnect: function(){
|
|
|
|
+ this.$socket.emit("userData", {
|
|
|
|
+ user: this.user,
|
|
|
|
+ meeting: this.meeting,
|
|
|
|
+ lobbies_uid_list: this.lobbies.reduce((acc, cur) => { return [...acc, cur.uid] }, [])
|
|
|
|
+ })
|
|
|
|
+
|
|
if (this.meeting.uid) {
|
|
if (this.meeting.uid) {
|
|
this.$socket.emit("meetingJoined", { lobby_uid: this.meeting.lobby_uid, meeting_uid: this.meeting.uid, user: this.user })
|
|
this.$socket.emit("meetingJoined", { lobby_uid: this.meeting.lobby_uid, meeting_uid: this.meeting.uid, user: this.user })
|
|
- this.$socket.emit("userData", {
|
|
|
|
- user: this.userProp,
|
|
|
|
- meeting: this.meeting,
|
|
|
|
- lobbies_uid_list: lobbies.reduce((acc, cur) => { return [...acc, cur.uid] }, [])
|
|
|
|
- })
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
'call-data': function(data){
|
|
'call-data': function(data){
|
|
@@ -140,6 +143,7 @@ export default {
|
|
/* Meeting Handlers */
|
|
/* Meeting Handlers */
|
|
|
|
|
|
'meeting-activity': function(data){
|
|
'meeting-activity': function(data){
|
|
|
|
+
|
|
this.$store.commit("setLobbyActivity", data)
|
|
this.$store.commit("setLobbyActivity", data)
|
|
},
|
|
},
|
|
'meeting-created': function(data){
|
|
'meeting-created': function(data){
|
|
@@ -149,7 +153,7 @@ export default {
|
|
this.$store.commit("setUpdatedMeetingInLobby", data)
|
|
this.$store.commit("setUpdatedMeetingInLobby", data)
|
|
},
|
|
},
|
|
'meeting-closed': function(data){
|
|
'meeting-closed': function(data){
|
|
- this.$eventBus.$emit("leaveMeeting")
|
|
|
|
|
|
+ this.$store.dispatch("leaveMeeting");
|
|
},
|
|
},
|
|
|
|
|
|
/* Lobby Handlers */
|
|
/* Lobby Handlers */
|
|
@@ -203,8 +207,6 @@ export default {
|
|
|
|
|
|
this.$store.commit("setInitialUser", this.userProp)
|
|
this.$store.commit("setInitialUser", this.userProp)
|
|
this.$store.commit("setLobbies", lobbies)
|
|
this.$store.commit("setLobbies", lobbies)
|
|
-
|
|
|
|
- this.$socket.emit("callDataRequest", lobbies)
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|