Commit c7f3bc74 authored by Thomas Randolph's avatar Thomas Randolph

Pass the diffFile down so the renamed viewer can use it

Also updates other components that eventually
use the same component
parent f44fe3fe
...@@ -128,6 +128,7 @@ export default { ...@@ -128,6 +128,7 @@ export default {
<no-preview-viewer v-else-if="noPreview" /> <no-preview-viewer v-else-if="noPreview" />
<diff-viewer <diff-viewer
v-else v-else
:diff-file="diffFile"
:diff-mode="diffMode" :diff-mode="diffMode"
:diff-viewer-mode="diffViewerMode" :diff-viewer-mode="diffViewerMode"
:new-path="diffFile.new_path" :new-path="diffFile.new_path"
......
...@@ -116,6 +116,7 @@ export default { ...@@ -116,6 +116,7 @@ export default {
</div> </div>
<div v-else> <div v-else>
<diff-viewer <diff-viewer
:diff-file="discussion.diff_file"
:diff-mode="diffMode" :diff-mode="diffMode"
:diff-viewer-mode="diffViewerMode" :diff-viewer-mode="diffViewerMode"
:new-path="discussion.diff_file.new_path" :new-path="discussion.diff_file.new_path"
......
...@@ -7,6 +7,10 @@ import ModeChanged from './viewers/mode_changed.vue'; ...@@ -7,6 +7,10 @@ import ModeChanged from './viewers/mode_changed.vue';
export default { export default {
props: { props: {
diffFile: {
type: Object,
required: true,
},
diffMode: { diffMode: {
type: String, type: String,
required: true, required: true,
...@@ -92,6 +96,7 @@ export default { ...@@ -92,6 +96,7 @@ export default {
<div v-if="viewer" class="diff-file preview-container"> <div v-if="viewer" class="diff-file preview-container">
<component <component
:is="viewer" :is="viewer"
:diff-file="diffFile"
:diff-mode="diffMode" :diff-mode="diffMode"
:new-path="fullNewPath" :new-path="fullNewPath"
:old-path="fullOldPath" :old-path="fullOldPath"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment