diff options
author | Bryce Johnson <bryce@gitlab.com> | 2017-04-16 02:38:07 +0300 |
---|---|---|
committer | Bryce Johnson <bryce@gitlab.com> | 2017-05-18 23:37:48 +0300 |
commit | 3c668fa04fd7e0a1d925e9666eb727ed3e83d145 (patch) | |
tree | 556d553c9b8915eee0337527f6f8feae0217d3e9 /app/assets/javascripts/vue_shared/components/commit.js | |
parent | a3eabcc20c422db7032e31397c21dbc6ca3166de (diff) |
Consolidate user avatar Vue logic
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/commit.js')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/commit.js | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/app/assets/javascripts/vue_shared/components/commit.js b/app/assets/javascripts/vue_shared/components/commit.js index 9b060a0a35f..23bc5fbc034 100644 --- a/app/assets/javascripts/vue_shared/components/commit.js +++ b/app/assets/javascripts/vue_shared/components/commit.js @@ -1,4 +1,5 @@ import commitIconSvg from 'icons/_icon_commit.svg'; +import userAvatarLink from './user_avatar/user_avatar_link.vue'; export default { props: { @@ -110,6 +111,9 @@ export default { return { commitIconSvg }; }, + components: { + userAvatarLink, + }, template: ` <div class="branch-commit"> @@ -133,16 +137,14 @@ export default { <p class="commit-title"> <span v-if="title"> - <a v-if="hasAuthor" + <user-avatar-link + v-if="hasAuthor" class="avatar-image-container" - :href="author.web_url"> - <img - class="avatar has-tooltip s20" - :src="author.avatar_url" - :alt="userImageAltDescription" - :title="author.username" /> - </a> - + :link-href="author.web_url" + :img-src="author.avatar_url" + :img-alt="userImageAltDescription" + :tooltip-text="author.username" + /> <a class="commit-row-message" :href="commitUrl"> {{title}} |