Skip to content

Commit

Permalink
fixup! [wip] feat(ban): ban participant from RightSidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
DorraJaouad committed Jun 3, 2024
1 parent 068df3c commit 5a777ce
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/components/RightSidebar/Participants/Participant.vue
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@

<!-- Remove -->
<NcActionSeparator v-if="canBeModerated && showPermissionsOptions" />
<NcActionButton v-if="canBeModerated && supportBanV1"
<NcActionButton v-if="canBeModerated && supportBanV1 && showPermissionsOptions"
key="ban-participant"
class="critical"
close-after-click
Expand Down Expand Up @@ -984,13 +984,19 @@ export default {
},

async banParticipant() {
await this.$store.dispatch('banParticipant', {
token: this.token,
attendeeId: this.attendeeId,
internalNote: this.internalNote,
})
this.internalNote = ''
this.isBanDialogOpen = false
try {
await this.$store.dispatch('banParticipant', {
token: this.token,
attendeeId: this.attendeeId,
internalNote: this.internalNote,
})
this.internalNote = ''
this.isBanDialogOpen = false
showSuccess(t('spreed', 'Participant {displayName} is banned successfully', { displayName: this.computedName }))
} catch(error) {
showError(t('spreed', 'Could not ban participant {displayName}', { displayName: this.computedName }))
}

},

async removeParticipant() {
Expand Down

0 comments on commit 5a777ce

Please sign in to comment.