diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
commit | 3cccd102ba543e02725d247893729e5c73b38295 (patch) | |
tree | f36a04ec38517f5deaaacb5acc7d949688d1e187 /app/assets/javascripts/vue_shared/components/user_avatar | |
parent | 205943281328046ef7b4528031b90fbda70c75ac (diff) |
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/user_avatar')
3 files changed, 12 insertions, 4 deletions
diff --git a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image_new.vue b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image_new.vue index f52a3471ea4..c58a5357883 100644 --- a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image_new.vue +++ b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image_new.vue @@ -18,7 +18,7 @@ import { GlTooltip, GlAvatar } from '@gitlab/ui'; import defaultAvatarUrl from 'images/no_avatar.png'; import { __ } from '~/locale'; -import { placeholderImage } from '../../../lazy_loader'; +import { placeholderImage } from '~/lazy_loader'; export default { name: 'UserAvatarImageNew', @@ -96,11 +96,12 @@ export default { /> <gl-tooltip + v-if="tooltipText || $slots.default" :target="() => $refs.userAvatar.$el" :placement="tooltipPlacement" boundary="window" > - <slot> {{ tooltipText }}</slot> + <slot>{{ tooltipText }}</slot> </gl-tooltip> </span> </template> diff --git a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image_old.vue b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image_old.vue index bca10c76038..15ba8e3b39b 100644 --- a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image_old.vue +++ b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image_old.vue @@ -18,7 +18,7 @@ import { GlTooltip } from '@gitlab/ui'; import defaultAvatarUrl from 'images/no_avatar.png'; import { __ } from '~/locale'; -import { placeholderImage } from '../../../lazy_loader'; +import { placeholderImage } from '~/lazy_loader'; export default { name: 'UserAvatarImageOld', @@ -100,11 +100,12 @@ export default { class="avatar" /> <gl-tooltip + v-if="tooltipText || $slots.default" :target="() => $refs.userAvatarImage" :placement="tooltipPlacement" boundary="window" > - <slot> {{ tooltipText }}</slot> + <slot>{{ tooltipText }}</slot> </gl-tooltip> </span> </template> diff --git a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_list.vue b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_list.vue index e19d659c179..60b26d688b2 100644 --- a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_list.vue +++ b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_list.vue @@ -1,5 +1,6 @@ <script> import { GlButton } from '@gitlab/ui'; +import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { sprintf, __ } from '~/locale'; import UserAvatarLink from './user_avatar_link.vue'; @@ -8,6 +9,7 @@ export default { UserAvatarLink, GlButton, }, + mixins: [glFeatureFlagMixin()], props: { items: { type: Array, @@ -57,6 +59,9 @@ export default { return sprintf(__('%{count} more'), { count }); }, + imgCssClasses() { + return this.glFeatures.glAvatarForAllUserAvatars ? 'gl-mr-3' : ''; + }, }, methods: { expand() { @@ -80,6 +85,7 @@ export default { :img-alt="item.name" :tooltip-text="item.name" :img-size="imgSize" + :img-css-classes="imgCssClasses" /> <template v-if="hasBreakpoint"> <gl-button v-if="hasHiddenItems" variant="link" @click="expand"> |