Skip to content
Snippets Groups Projects

Consolidate user avatar Vue logic

Merged username-removed-408230 requested to merge user-avatar-vue-ce into master
All threads resolved!
1 file
+ 5
2
Compare changes
  • Side-by-side
  • Inline
@@ -26,10 +26,10 @@ const DiffNoteAvatars = Vue.extend({
<!-- FIXME: Pass an alt attribute here for accessibility -->
<user-avatar-image v-for="note in notesSubset"
class="diff-comment-avatar js-diff-comment-avatar"
@click="clickedAvatar($event)
@click="clickedAvatar($event)"
:img-src="note.authorAvatar"
:img-size="19"
:tooltip-text="note.authorName + ': ' + note.noteTruncated"
:tooltip-text="getTooltipText(note)"
:data-line-type="lineType"
data-html="true"/>
<span v-if="notesCount > shownAvatars"
@@ -151,6 +151,9 @@ const DiffNoteAvatars = Vue.extend({
setDiscussionVisible() {
this.isVisible = $(`.diffs .notes[data-discussion-id="${this.discussion.id}"]`).is(':visible');
},
getTooltipText(note) {
return `${note.authorName}: ${note.noteTruncated}`;
},
},
});
Loading