diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-02-02 19:19:58 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-02-02 19:19:58 +0300 |
commit | 283ace44dd156a5698a3191e2901c3302c1ad52f (patch) | |
tree | be8658f970149ea1352fd865b6063034e4ffefee /app/assets | |
parent | 8e97e1fc76eb9fd85083f7f1d2684bb5a6de2425 (diff) | |
parent | 9b7971379e48c3c2034e53594be3c96af2a1007d (diff) |
Merge branch 'mr-widget-author-component-backport' into 'master'
Backport of mr_widget_author.vue EE changes
See merge request gitlab-org/gitlab-ce!16884
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue index 7ac9eadcde0..cb6e9858736 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue @@ -1,11 +1,26 @@ <script> + import tooltip from '../../vue_shared/directives/tooltip'; + export default { name: 'MRWidgetAuthor', + directives: { + tooltip, + }, props: { author: { type: Object, required: true, }, + showAuthorName: { + type: Boolean, + required: false, + default: true, + }, + showAuthorTooltip: { + type: Boolean, + required: false, + default: false, + }, }, computed: { authorUrl() { @@ -21,12 +36,17 @@ <a :href="authorUrl" class="author-link inline" + :v-tooltip="showAuthorTooltip" + :title="author.name" > <img :src="avatarUrl" class="avatar avatar-inline s16" /> - <span class="author"> + <span + class="author" + v-if="showAuthorName" + > {{ author.name }} </span> </a> |