diff options
author | Phil Hughes <me@iamphill.com> | 2018-02-02 17:33:02 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-02-02 17:33:42 +0300 |
commit | 9b7971379e48c3c2034e53594be3c96af2a1007d (patch) | |
tree | 99a3646f37eb9ee90024e78e6cee1c8d5e8a414f /app/assets | |
parent | 54a575f1bbba44573ab92dc58a4242f1ee734c5d (diff) |
Backport of mr_widget_author.vue EE changes
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> |