summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2017-11-25 16:08:23 +0100
committerTim Zallmann <tzallmann@gitlab.com>2017-12-19 12:26:02 +0100
commit5ae29886f918e46a68ee1fb44c873fc35945c736 (patch)
tree5a91ed31836172ed395b0994940a111972b57063
parent7818f653859c978df0c895502c810a1db596bec5 (diff)
downloadgitlab-ce-5ae29886f918e46a68ee1fb44c873fc35945c736.tar.gz
Persistent Storage
-rw-r--r--app/assets/javascripts/ide/components/ide.vue4
-rw-r--r--app/assets/javascripts/ide/stores/index.js4
2 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/ide/components/ide.vue b/app/assets/javascripts/ide/components/ide.vue
index 652cb1c69ba..abfabe6e68d 100644
--- a/app/assets/javascripts/ide/components/ide.vue
+++ b/app/assets/javascripts/ide/components/ide.vue
@@ -28,7 +28,7 @@ export default {
RepoPreview,
},
mounted() {
- const returnValue = 'Are you sure you want to lose unsaved changes?';
+ /* const returnValue = 'Are you sure you want to lose unsaved changes?';
window.onbeforeunload = (e) => {
if (!this.changedFiles.length) return undefined;
@@ -36,7 +36,7 @@ export default {
returnValue,
});
return returnValue;
- };
+ }; */
},
};
</script>
diff --git a/app/assets/javascripts/ide/stores/index.js b/app/assets/javascripts/ide/stores/index.js
index 6ac9bfd8189..358568866d0 100644
--- a/app/assets/javascripts/ide/stores/index.js
+++ b/app/assets/javascripts/ide/stores/index.js
@@ -1,5 +1,6 @@
import Vue from 'vue';
import Vuex from 'vuex';
+import createPersistedState from 'vuex-persistedstate';
import state from './state';
import * as actions from './actions';
import * as getters from './getters';
@@ -12,4 +13,7 @@ export default new Vuex.Store({
actions,
mutations,
getters,
+ plugins: [createPersistedState({
+ key: 'gitlab-ide',
+ })],
});