Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/components/TopBar/CallButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<button v-else-if="showLeaveCallButton && !canEndForAll"
class="top-bar__button error"
:disabled="loading"
@click="leaveCall">
@click="leaveCall(false)">
<span
class="icon"
:class="leaveCallIcon" />
Expand Down Expand Up @@ -262,19 +262,25 @@ export default {
this.loading = false
},

async leaveCall(all = false) {
console.info('Leaving call')
async leaveCall(endMeetingForAll = false) {
if (endMeetingForAll) {
console.info('End meeting for everyone')
} else {
console.info('Leaving call')
}

// Remove selected participant
this.$store.dispatch('selectedVideoPeerId', null)
this.loading = true

// Open navigation
emit('toggle-navigation', {
open: true,
})
await this.$store.dispatch('leaveCall', {
token: this.token,
participantIdentifier: this.$store.getters.getParticipantIdentifier(),
all,
all: endMeetingForAll,
})
this.loading = false
},
Expand Down