Commit 72956fbf authored by Lucas Détré's avatar Lucas Détré

adding page reload and loading gif to modification saving process

parent 5d07fb68
Pipeline #2396 passed with stage
in 1 minute and 33 seconds
......@@ -37,7 +37,10 @@
</div>
</div>
<div v-else class="text-center loading-gif">
<img src="./../assets/images/loading.gif" alt="loading...">
<div v-if="modificationInProgress" class="mt-5">
<h2>Modification en cours...</h2>
</div>
<img src="./../assets/images/loading.gif" alt="loading...">
</div>
</div>
</div>
......@@ -61,6 +64,7 @@
rerenderKey: 0,
collapsed: false,
currentRuleName: decodeURI(window.location.hash).split('#').pop() == "modified" ? decodeURI(window.location.hash).split('#')[1]:decodeURI(window.location.hash).split('#').pop(),
inProgressModification : false,
}
},
computed: {
......
......@@ -230,6 +230,8 @@
};
},
save: function() {
this.$parent.isLoading = true;
this.$parent.modificationInProgress = true;
this.ruleData = this.content
if (this.comment == '') {
this.error_flags.noResume = true;
......@@ -280,6 +282,10 @@
this.error_flags.notModified = false;
}
return false;
}).then(()=> {
this.$parent.isLoading = false;
this.$parent.modificationInProgress = false;
location.reload();
});
},
toTree: function (lines) { // eslint-disable-line no-unused-vars
......
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