diff options
Diffstat (limited to 'app/assets/javascripts/notes/components/noteable_note.vue')
-rw-r--r-- | app/assets/javascripts/notes/components/noteable_note.vue | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/app/assets/javascripts/notes/components/noteable_note.vue b/app/assets/javascripts/notes/components/noteable_note.vue index 6edc65c856e..4c02588127e 100644 --- a/app/assets/javascripts/notes/components/noteable_note.vue +++ b/app/assets/javascripts/notes/components/noteable_note.vue @@ -2,8 +2,6 @@ import $ from 'jquery'; import { mapGetters, mapActions } from 'vuex'; import { escape } from 'underscore'; -import { truncateSha } from '~/lib/utils/text_utility'; -import { s__, sprintf } from '~/locale'; import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue'; import Flash from '../../flash'; import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue'; @@ -39,11 +37,6 @@ export default { required: false, default: '', }, - commit: { - type: Object, - required: false, - default: () => null, - }, }, data() { return { @@ -80,24 +73,6 @@ export default { isTarget() { return this.targetNoteHash === this.noteAnchorId; }, - actionText() { - if (this.commit) { - const { id, url } = this.commit; - const linkStart = `<a class="commit-sha monospace" href="${escape(url)}">`; - const linkEnd = '</a>'; - return sprintf( - s__('MergeRequests|commented on commit %{linkStart}%{commitId}%{linkEnd}'), - { - commitId: truncateSha(id), - linkStart, - linkEnd, - }, - false, - ); - } - - return '<span class="d-none d-sm-inline">·</span>'; - }, }, created() { @@ -225,9 +200,13 @@ export default { </div> <div class="timeline-content"> <div class="note-header"> - <note-header v-once :author="author" :created-at="note.created_at" :note-id="note.id"> - <span v-html="actionText"></span> - </note-header> + <note-header + v-once + :author="author" + :created-at="note.created_at" + :note-id="note.id" + action-text="commented" + /> <note-actions :author-id="author.id" :note-id="note.id" |