diff options
author | Jacques Erasmus <jerasmus@gitlab.com> | 2018-10-12 01:32:28 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-10-12 01:32:28 +0300 |
commit | a577cfcbb29a43f0d9e7b31567e37a735e40f316 (patch) | |
tree | b337cccdb9d91d2daa46275dca724604e10fc10e /app | |
parent | da4f77957ccff7cdf22110ef56a4286bbc5a7749 (diff) |
Fix broken file name navigation on MRs
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/diffs/components/diff_file_header.vue | 10 | ||||
-rw-r--r-- | app/assets/javascripts/notes/components/diff_with_note.vue | 1 |
2 files changed, 8 insertions, 3 deletions
diff --git a/app/assets/javascripts/diffs/components/diff_file_header.vue b/app/assets/javascripts/diffs/components/diff_file_header.vue index 15b37243030..dcf1057eb84 100644 --- a/app/assets/javascripts/diffs/components/diff_file_header.vue +++ b/app/assets/javascripts/diffs/components/diff_file_header.vue @@ -20,6 +20,11 @@ export default { Tooltip, }, props: { + discussionPath: { + type: String, + required: false, + default: '', + }, diffFile: { type: Object, required: true, @@ -65,8 +70,7 @@ export default { if (this.diffFile.submodule) { return this.diffFile.submoduleTreeUrl || this.diffFile.submoduleLink; } - - return `#${this.diffFile.fileHash}`; + return this.discussionPath; }, filePath() { if (this.diffFile.submodule) { @@ -152,7 +156,7 @@ export default { v-once ref="titleWrapper" :href="titleLink" - class="append-right-4" + class="append-right-4 js-title-wrapper" > <file-icon :file-name="filePath" diff --git a/app/assets/javascripts/notes/components/diff_with_note.vue b/app/assets/javascripts/notes/components/diff_with_note.vue index 353aa790743..d9e99603238 100644 --- a/app/assets/javascripts/notes/components/diff_with_note.vue +++ b/app/assets/javascripts/notes/components/diff_with_note.vue @@ -94,6 +94,7 @@ export default { class="diff-file file-holder" > <diff-file-header + :discussion-path="discussion.discussionPath" :diff-file="diffFile" :can-current-user-fork="false" :discussions-expanded="isDiscussionsExpanded" |