summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/stores/mutations/file.js
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2018-03-23 11:45:43 +0100
committerTim Zallmann <tzallmann@gitlab.com>2018-03-28 12:17:02 +0200
commitf62359c23b86bb8c8dc241ff4e09bab24e74ccbd (patch)
treef2ac4a95d433ce476fd5337cabed81c8bb524530 /app/assets/javascripts/ide/stores/mutations/file.js
parent06afa5a3ff82e2d6edbcf668cc870e625784c09c (diff)
downloadgitlab-ce-f62359c23b86bb8c8dc241ff4e09bab24e74ccbd.tar.gz
Basic Setup for MR Showing
Diffstat (limited to 'app/assets/javascripts/ide/stores/mutations/file.js')
-rw-r--r--app/assets/javascripts/ide/stores/mutations/file.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/assets/javascripts/ide/stores/mutations/file.js b/app/assets/javascripts/ide/stores/mutations/file.js
index 2500f13db7c..1297d3aaf1f 100644
--- a/app/assets/javascripts/ide/stores/mutations/file.js
+++ b/app/assets/javascripts/ide/stores/mutations/file.js
@@ -35,6 +35,11 @@ export default {
raw,
});
},
+ [types.SET_FILE_TARGET_RAW_DATA](state, { file, raw }) {
+ Object.assign(file, {
+ targetRaw: raw,
+ });
+ },
[types.UPDATE_FILE_CONTENT](state, { path, content }) {
const changed = content !== state.entries[path].raw;
@@ -59,6 +64,16 @@ export default {
editorColumn,
});
},
+ [types.SET_FILE_MR_DIFF](state, { file, mrDiff }) {
+ Object.assign(file, {
+ mrDiff,
+ });
+ },
+ [types.SET_FILE_TARGET_BRANCH](state, { file, targetBranch }) {
+ Object.assign(file, {
+ targetBranch,
+ });
+ },
[types.DISCARD_FILE_CHANGES](state, path) {
Object.assign(state.entries[path], {
content: state.entries[path].raw,