Skip to content

Commit

Permalink
calendar-ui: Show group in attendee list
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Heinrich committed Aug 7, 2023
1 parent 5d70e25 commit 60d5bbd
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
19 changes: 16 additions & 3 deletions src/components/Editor/AvatarParticipationStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@

<template>
<div class="avatar-participation-status">
<Avatar :disable-tooltip="true"
<Avatar v-if="isGroup === true">
<template #icon>
<AccountMultiple :size="32" />
</template>
</Avatar>
<Avatar v-if="isGroup !== true"
:disable-tooltip="true"
:user="avatarLink"
:is-no-user="isResource" />

<template v-if="participationStatus === 'ACCEPTED' && isViewedByOrganizer">
<IconCheck class="avatar-participation-status__indicator"
fill-color="#32CD32"
Expand Down Expand Up @@ -125,6 +132,7 @@

<script>
import Avatar from '@nextcloud/vue/dist/Components/NcAvatar.js'
import AccountMultiple from 'vue-material-design-icons/AccountMultiple.vue'
import IconCheck from 'vue-material-design-icons/CheckCircle.vue'
import IconNoResponse from 'vue-material-design-icons/HelpCircle.vue'
import IconClose from 'vue-material-design-icons/CloseCircle.vue'
Expand All @@ -133,8 +141,9 @@ import IconDelegated from 'vue-material-design-icons/ArrowRightDropCircle.vue'
export default {
name: 'AvatarParticipationStatus',
components: {
Avatar,
IconCheck,
Avatar,
AccountMultiple,
IconCheck,
IconNoResponse,
IconClose,
IconDelegated,
Expand All @@ -161,6 +170,10 @@ export default {
type: Boolean,
required: true,
},
isGroup: {
type: Boolean,
required: false,
},
isSuggestion: {
type: Boolean,
default: false,
Expand Down
15 changes: 13 additions & 2 deletions src/components/Editor/Invitees/InviteesListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
:avatar-link="avatarLink"
:participation-status="attendee.participationStatus"
:organizer-display-name="organizerDisplayName"
:common-name="commonName" />
:common-name="commonName"
:is-group="true" />
<div class="invitees-list-item__displayname">
{{ commonName }}
</div>
Expand Down Expand Up @@ -65,7 +66,7 @@
<template #icon>
<Delete :size="20" decorative />
</template>
{{ $t('calendar', 'Remove attendee') }}
{{ removeAttendeeText }}
</ActionButton>
</Actions>
</div>
Expand Down Expand Up @@ -114,6 +115,16 @@ export default {
// return this.$store.getters.getAvatarForContact(this.uri) || this.commonName
return this.commonName
},
/**
* @return {string}
*/
removeAttendeeText() {
if (this.isGroup) {
return this.$t('calendar', 'Remove circle');

Check failure on line 123 in src/components/Editor/Invitees/InviteesListItem.vue

View workflow job for this annotation

GitHub Actions / eslint

Extra semicolon
} else {
return this.$t('calendar', 'Remove attendee');

Check failure on line 125 in src/components/Editor/Invitees/InviteesListItem.vue

View workflow job for this annotation

GitHub Actions / eslint

Extra semicolon
}
},
/**
* Common name of the organizer or the uri without the 'mailto:' prefix.
*
Expand Down

0 comments on commit 60d5bbd

Please sign in to comment.