mirror of https://github.com/nextcloud/calendar
Merge pull request #3144 from nextcloud/design/status-of-user
Fix status indicator overlapping
This commit is contained in:
commit
678c55ef36
|
@ -21,11 +21,14 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-tooltip="tooltip" class="avatar-participation-status">
|
<div class="avatar-participation-status">
|
||||||
<Avatar
|
<Avatar
|
||||||
:disable-tooltip="true"
|
:disable-tooltip="true"
|
||||||
:user="avatarLink" />
|
:user="avatarLink" />
|
||||||
<div class="avatar-participation-status__indicator" :class="className" />
|
<div class="avatar-participation-status__indicator" :class="className.class" />
|
||||||
|
<div class="avatar-participation-status__text">
|
||||||
|
{{ className.label }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -68,84 +71,93 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
tooltip() {
|
className() {
|
||||||
if (this.isViewedByOrganizer && this.attendeeIsOrganizer) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.isResource && this.participationStatus === 'ACCEPTED') {
|
if (this.isResource && this.participationStatus === 'ACCEPTED') {
|
||||||
return this.$t('calendar', '{name} is available.', {
|
return {
|
||||||
name: this.commonName,
|
class: ['accepted', 'icon', 'icon-checkmark-white'],
|
||||||
})
|
label: t('calendar', 'Available.'),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (this.isResource && this.participationStatus === 'DECLINED') {
|
if (this.isResource && this.participationStatus === 'DECLINED') {
|
||||||
return this.$t('calendar', '{name} is not available.', {
|
return {
|
||||||
name: this.commonName,
|
class: ['declined', 'icon', 'icon-close-white'],
|
||||||
})
|
label: t('calendar', 'Not available.'),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.participationStatus === 'ACCEPTED' && this.isViewedByOrganizer) {
|
if (this.participationStatus === 'ACCEPTED' && this.isViewedByOrganizer) {
|
||||||
return this.$t('calendar', '{name} accepted your invitation.', {
|
return {
|
||||||
name: this.commonName,
|
class: ['accepted', 'icon', 'icon-checkmark-white'],
|
||||||
})
|
label: t('calendar', 'Invitation accepted.'),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (this.participationStatus === 'ACCEPTED' && !this.isViewedByOrganizer) {
|
if (this.participationStatus === 'ACCEPTED' && !this.isViewedByOrganizer) {
|
||||||
return this.$t('calendar', '{name} accepted {organizerName}\'s invitation.', {
|
return {
|
||||||
name: this.commonName,
|
class: ['accepted', 'icon', 'icon-checkmark-white'],
|
||||||
organizerName: this.organizerDisplayName,
|
label: t('calendar', 'Accepted {organizerName}\'s invitation.', {
|
||||||
})
|
organizerName: this.organizerDisplayName,
|
||||||
|
}),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.participationStatus === 'DECLINED' && this.isViewedByOrganizer) {
|
if (this.participationStatus === 'DECLINED' && this.isViewedByOrganizer) {
|
||||||
return this.$t('calendar', '{name} declined your invitation.', {
|
return {
|
||||||
name: this.commonName,
|
class: ['declined', 'icon', 'icon-close-white'],
|
||||||
})
|
label: t('calendar', 'Invitation declined.'),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (this.participationStatus === 'DECLINED' && !this.isViewedByOrganizer) {
|
if (this.participationStatus === 'DECLINED' && !this.isViewedByOrganizer) {
|
||||||
return this.$t('calendar', '{name} declined {organizerName}\'s invitation.', {
|
return {
|
||||||
name: this.commonName,
|
class: ['declined', 'icon', 'icon-close-white'],
|
||||||
organizerName: this.organizerDisplayName,
|
label: t('calendar', 'Declined {organizerName}\'s invitation.', {
|
||||||
})
|
organizerName: this.organizerDisplayName,
|
||||||
|
}),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.participationStatus === 'DELEGATED') {
|
if (this.participationStatus === 'DELEGATED') {
|
||||||
return this.$t('calendar', '{name} has delegated their invitation.', {
|
return this.$t('calendar', 'Invitation is delegated.')
|
||||||
name: this.commonName,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
if (this.participationStatus === 'TENTATIVE') {
|
if (this.participationStatus === 'TENTATIVE') {
|
||||||
return this.$t('calendar', '{name} marked their participation as tentative.', {
|
return {
|
||||||
name: this.commonName,
|
class: ['tentative', 'icon', 'icon-checkmark-white'],
|
||||||
})
|
label: t('calendar', 'Participation marked as tentative.'),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isViewedByOrganizer) {
|
if (this.isViewedByOrganizer) {
|
||||||
return this.$t('calendar', '{name} did not respond to your invitation yet.', {
|
return {
|
||||||
name: this.commonName,
|
class: ['no-response', 'icon', 'icon-invitees-no-response-white'],
|
||||||
})
|
label: t('calendar', 'Invitation sent'),
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return this.$t('calendar', '{name} did not respond to {organizerName}\'s invitation yet.', {
|
return {
|
||||||
name: this.commonName,
|
class: ['no-response', 'icon', 'icon-invitees-no-response-white'],
|
||||||
organizerName: this.organizerDisplayName,
|
label: t('calendar', 'Has not responded to {organizerName}\'s invitation yet.', {
|
||||||
})
|
organizerName: this.organizerDisplayName,
|
||||||
|
}),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
className() {
|
|
||||||
if (this.participationStatus === 'ACCEPTED') {
|
|
||||||
return ['accepted', 'icon', 'icon-checkmark-white']
|
|
||||||
}
|
|
||||||
if (this.participationStatus === 'DECLINED') {
|
|
||||||
return ['declined', 'icon', 'icon-close-white']
|
|
||||||
}
|
|
||||||
if (this.participationStatus === 'TENTATIVE') {
|
|
||||||
return ['tentative', 'icon', 'icon-checkmark-white']
|
|
||||||
}
|
|
||||||
if (this.participationStatus === 'DELEGATED') {
|
|
||||||
return ['delegated', 'icon', 'icon-confirm-white']
|
|
||||||
}
|
|
||||||
|
|
||||||
return ['no-response', 'icon', 'icon-invitees-no-response-white']
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .avatar-participation-status__indicator {
|
||||||
|
bottom: 15px;
|
||||||
|
left: 47px;
|
||||||
|
opacity: .45;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.avatar-participation-status__text {
|
||||||
|
opacity: .45;
|
||||||
|
left: 69px;
|
||||||
|
bottom: 35px;
|
||||||
|
white-space: nowrap;
|
||||||
|
position: relative;
|
||||||
|
min-width: 220px;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -175,3 +175,12 @@ export default {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.invitees-list-item__displayname {
|
||||||
|
margin-bottom: 17px;
|
||||||
|
}
|
||||||
|
.avatar-participation-status {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -83,3 +83,11 @@ export default {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.invitees-list-item__displayname {
|
||||||
|
margin-bottom: 13px;
|
||||||
|
}
|
||||||
|
.invitees-list-item__organizer-hint {
|
||||||
|
margin-bottom: 14px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue