summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diffs/components/app.vue
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2018-06-26 18:49:22 +0000
committerClement Ho <clemmakesapps@gmail.com>2018-06-26 18:49:22 +0000
commit53f77cfee164b3e0f7e3efb6511dee5e72dd75e6 (patch)
tree7ed5580947af4b34c946f51403480fd6d5b01ed1 /app/assets/javascripts/diffs/components/app.vue
parent869d645069f46585b73b261c79aefece2fd87b08 (diff)
downloadgitlab-ce-53f77cfee164b3e0f7e3efb6511dee5e72dd75e6.tar.gz
Added Diff Viewer to new VUE based MR page
Diffstat (limited to 'app/assets/javascripts/diffs/components/app.vue')
-rw-r--r--app/assets/javascripts/diffs/components/app.vue16
1 files changed, 9 insertions, 7 deletions
diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue
index 82ca10f4163..deddb61ca31 100644
--- a/app/assets/javascripts/diffs/components/app.vue
+++ b/app/assets/javascripts/diffs/components/app.vue
@@ -26,6 +26,10 @@ export default {
type: String,
required: true,
},
+ projectPath: {
+ type: String,
+ required: true,
+ },
shouldShow: {
type: Boolean,
required: false,
@@ -94,18 +98,16 @@ export default {
},
},
mounted() {
- this.setEndpoint(this.endpoint);
- this
- .fetchDiffFiles()
- .catch(() => {
- createFlash(__('Something went wrong on our end. Please try again!'));
- });
+ this.setBaseConfig({ endpoint: this.endpoint, projectPath: this.projectPath });
+ this.fetchDiffFiles().catch(() => {
+ createFlash(__('Fetching diff files failed. Please reload the page to try again!'));
+ });
},
created() {
this.adjustView();
},
methods: {
- ...mapActions(['setEndpoint', 'fetchDiffFiles']),
+ ...mapActions(['setBaseConfig', 'fetchDiffFiles']),
setActive(filePath) {
this.activeFile = filePath;
},