mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 08:34:07 -08:00
cleanup
This commit is contained in:
parent
9da7587b87
commit
63281ad28e
|
@ -358,18 +358,6 @@ export default mixins(
|
|||
async openWorkflow (data: IWorkflowDb, dirty = false) {
|
||||
this.resetWorkspace();
|
||||
|
||||
// let data: IWorkflowDb | undefined;
|
||||
// try {
|
||||
// data = await this.restApi().getWorkflow(workflowId);
|
||||
// } catch (error) {
|
||||
// this.$showError(error, 'Problem opening workflow', 'There was a problem opening the workflow:');
|
||||
// return;
|
||||
// }
|
||||
|
||||
// if (!data || data === undefined) {
|
||||
// throw new Error(`Workflow with id "${data.id}" could not be found!`);
|
||||
// }
|
||||
|
||||
this.$store.commit('setActive', data.active || false);
|
||||
this.$store.commit('setWorkflowId', data.id);
|
||||
this.$store.commit('setWorkflowName', {newName: data.name, setStateDirty: dirty});
|
||||
|
@ -1446,7 +1434,6 @@ export default mixins(
|
|||
|
||||
this.$titleSet(workflow.name, 'IDLE');
|
||||
|
||||
// compare local storage and db wfs
|
||||
const localStorageWorkflow = this.$store.getters.getWorkflowFromLocalStorage(workflowId);
|
||||
|
||||
if(localStorageWorkflow && !result) {
|
||||
|
@ -1478,10 +1465,6 @@ export default mixins(
|
|||
document.addEventListener('keydown', this.keyDown);
|
||||
document.addEventListener('keyup', this.keyUp);
|
||||
|
||||
window.addEventListener("unload", (e) => {
|
||||
this.$store.commit('setStateDirty', false);
|
||||
});
|
||||
|
||||
window.addEventListener("beforeunload", (e) => {
|
||||
if(this.$store.getters.getStateIsDirty === true) {
|
||||
const confirmationMessage = 'It looks like you have been editing something. '
|
||||
|
|
Loading…
Reference in a new issue