diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /app/assets/javascripts/members/components/avatars | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/members/components/avatars')
-rw-r--r-- | app/assets/javascripts/members/components/avatars/user_avatar.vue | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/app/assets/javascripts/members/components/avatars/user_avatar.vue b/app/assets/javascripts/members/components/avatars/user_avatar.vue index 9687eacb036..ec59f0f681c 100644 --- a/app/assets/javascripts/members/components/avatars/user_avatar.vue +++ b/app/assets/javascripts/members/components/avatars/user_avatar.vue @@ -8,10 +8,14 @@ import { import { generateBadges } from 'ee_else_ce/members/utils'; import { glEmojiTag } from '~/emoji'; import { __ } from '~/locale'; +import { isUserBusy } from '~/set_status_modal/utils'; import { AVATAR_SIZE } from '../../constants'; export default { name: 'UserAvatar', + i18n: { + busy: __('Busy'), + }, avatarSize: AVATAR_SIZE, orphanedUserLabel: __('Orphaned member'), safeHtmlConfig: { ADD_TAGS: ['gl-emoji'] }, @@ -46,7 +50,10 @@ export default { }).filter((badge) => badge.show); }, statusEmoji() { - return this.user?.status?.emoji; + return this.user?.showStatus && this.user?.status?.emoji; + }, + isUserBusy() { + return isUserBusy(this.user?.availability || ''); }, }, methods: { @@ -73,6 +80,11 @@ export default { :entity-id="user.id" > <template #meta> + <div v-if="isUserBusy" class="gl-p-1"> + <span class="gl-text-gray-500 gl-font-sm gl-font-weight-normal" + >({{ $options.i18n.busy }})</span + > + </div> <div v-if="statusEmoji" class="gl-p-1"> <span v-safe-html:[$options.safeHtmlConfig]="glEmojiTag(statusEmoji)" |