Skip to content

Commit

Permalink
fix(Participant): adjust remove label for circles
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Feb 21, 2024
1 parent 09bec5e commit adfefcb
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@
<template #icon>
<Delete :size="20" />
</template>
{{ isGroup ? t('spreed', 'Remove group and members') : t('spreed', 'Remove participant') }}
{{ removeParticipantLabel }}
</NcActionButton>
</NcActions>

Expand Down Expand Up @@ -760,10 +760,6 @@ export default {
return [PARTICIPANT.TYPE.GUEST, PARTICIPANT.TYPE.GUEST_MODERATOR].includes(this.participantType)
},

isGroup() {
return this.participant.actorType === ATTENDEE.ACTOR_TYPE.GROUPS
},

isModerator() {
return this.participantTypeIsModerator(this.participantType)
},
Expand All @@ -776,6 +772,18 @@ export default {
|| this.participant.actorType === ATTENDEE.ACTOR_TYPE.EMAILS)
},

removeParticipantLabel() {
switch (this.participant.actorType) {
case ATTENDEE.ACTOR_TYPE.GROUPS:
return t('spreed', 'Remove group and members')
case ATTENDEE.ACTOR_TYPE.CIRCLES:
return t('spreed', 'Remove circle and members')
case ATTENDEE.ACTOR_TYPE.USERS:
default:
return t('spreed', 'Remove participant')
}
},

showModeratorLabel() {
return this.isModerator
&& ![CONVERSATION.TYPE.ONE_TO_ONE, CONVERSATION.TYPE.ONE_TO_ONE_FORMER, CONVERSATION.TYPE.CHANGELOG].includes(this.conversation.type)
Expand Down

0 comments on commit adfefcb

Please sign in to comment.