diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-12-05 15:29:41 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-12-05 15:29:41 +0300 |
commit | 9429514e303bdceee0621b5c4bf02ad8ca0a7add (patch) | |
tree | a7bc5cc425601c4ea73ff9a9be90eebc21a93b17 /app/assets/javascripts/vue_shared | |
parent | b9d8d85e20af046c7dbe11c69fd3252f0486b9b2 (diff) | |
parent | 3138fcdcd70fd30fea74deff537b9836d6c94d21 (diff) |
Merge branch '35616-move-k8-to-cluster-page' into cluster-page-with-list-clusters
Diffstat (limited to 'app/assets/javascripts/vue_shared')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/notes/system_note.vue | 8 | ||||
-rw-r--r-- | app/assets/javascripts/vue_shared/mixins/issuable.js | 13 |
2 files changed, 13 insertions, 8 deletions
diff --git a/app/assets/javascripts/vue_shared/components/notes/system_note.vue b/app/assets/javascripts/vue_shared/components/notes/system_note.vue index 98f8f32557d..2248699c399 100644 --- a/app/assets/javascripts/vue_shared/components/notes/system_note.vue +++ b/app/assets/javascripts/vue_shared/components/notes/system_note.vue @@ -17,7 +17,7 @@ * /> */ import { mapGetters } from 'vuex'; - import issueNoteHeader from '../../../notes/components/issue_note_header.vue'; + import noteHeader from '~/notes/components/note_header.vue'; import { spriteIcon } from '../../../lib/utils/common_utils'; export default { @@ -29,7 +29,7 @@ }, }, components: { - issueNoteHeader, + noteHeader, }, computed: { ...mapGetters([ @@ -60,12 +60,12 @@ </div> <div class="timeline-content"> <div class="note-header"> - <issue-note-header + <note-header :author="note.author" :created-at="note.created_at" :note-id="note.id" :action-text-html="note.note_html" - /> + /> </div> </div> </div> diff --git a/app/assets/javascripts/vue_shared/mixins/issuable.js b/app/assets/javascripts/vue_shared/mixins/issuable.js index 263361587e0..fab0919d96e 100644 --- a/app/assets/javascripts/vue_shared/mixins/issuable.js +++ b/app/assets/javascripts/vue_shared/mixins/issuable.js @@ -1,9 +1,14 @@ export default { - methods: { - issuableDisplayName(issuableType) { - const displayName = issuableType.replace(/_/, ' '); + props: { + issuableType: { + required: true, + type: String, + }, + }, - return this.__ ? this.__(displayName) : displayName; + computed: { + issuableDisplayName() { + return this.issuableType.replace(/_/g, ' '); }, }, }; |