Improvements on #911 to display unsaved changes. Now works with back button. (#1098)

Co-authored-by: Omar Ajoue <krynble@gmail.com>
This commit is contained in:
Jan
2020-10-25 12:47:49 +01:00
committed by GitHub
parent dc93694a1a
commit 72ac20b070
4 changed files with 48 additions and 3 deletions

View File

@@ -398,7 +398,7 @@ export default mixins(
return;
}
this.$store.commit('setWorkflowName', {newName: workflowName, setStateDirty: true});
this.$store.commit('setWorkflowName', {newName: workflowName, setStateDirty: false});
this.$showMessage({
title: 'Workflow renamed',
@@ -452,6 +452,7 @@ export default mixins(
if(result) {
const importConfirm = await this.confirmMessage(`When you switch workflows your current workflow changes will be lost.`, 'Save your Changes?', 'warning', 'Yes, switch workflows and forget changes');
if (importConfirm === true) {
this.$store.commit('setStateDirty', false);
this.$router.push({ name: 'NodeViewNew' });
this.$showMessage({