From adfefcb5529f52c273d37b40cdc80473a42590af Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Wed, 21 Feb 2024 16:56:48 +0100 Subject: [PATCH] fix(Participant): adjust remove label for circles Signed-off-by: Maksim Sukharev --- .../Participant/Participant.vue | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.vue b/src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.vue index bc7afc93e66..6ba481ea524 100644 --- a/src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.vue +++ b/src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.vue @@ -310,7 +310,7 @@ - {{ isGroup ? t('spreed', 'Remove group and members') : t('spreed', 'Remove participant') }} + {{ removeParticipantLabel }} @@ -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) }, @@ -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)