mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix open modal bug
This commit is contained in:
parent
6a4fbd8a3f
commit
d67215c64b
|
@ -81,10 +81,12 @@ export default mixins(
|
||||||
}
|
}
|
||||||
return '#13ce66';
|
return '#13ce66';
|
||||||
},
|
},
|
||||||
|
isCurrentWorkflowOpen(): boolean {
|
||||||
|
return this.$store.getters['workflowId'] === this.workflowId;
|
||||||
|
},
|
||||||
disabled(): boolean {
|
disabled(): boolean {
|
||||||
const isNewWorkflow = !this.workflowId;
|
const isNewWorkflow = !this.workflowId;
|
||||||
const openWorkflow = this.$store.getters['workflowId'];
|
if (isNewWorkflow || this.isCurrentWorkflowOpen) {
|
||||||
if (isNewWorkflow || openWorkflow === this.workflowId) {
|
|
||||||
return !this.workflowActive && !this.containsTrigger;
|
return !this.workflowActive && !this.containsTrigger;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +159,7 @@ export default mixins(
|
||||||
this.$store.commit('setWorkflowActive', this.workflowId);
|
this.$store.commit('setWorkflowActive', this.workflowId);
|
||||||
|
|
||||||
// Show activation dialog only for current workflow and if user hasn't deactivated it
|
// Show activation dialog only for current workflow and if user hasn't deactivated it
|
||||||
if (this.isCurrentWorkflow && window.localStorage.getItem(LOCAL_STORAGE_ACTIVATION_FLAG) !== 'true') {
|
if (this.isCurrentWorkflowOpen && window.localStorage.getItem(LOCAL_STORAGE_ACTIVATION_FLAG) !== 'true') {
|
||||||
this.$store.dispatch('ui/openModal', WORKFLOW_ACTIVE_MODAL_KEY);
|
this.$store.dispatch('ui/openModal', WORKFLOW_ACTIVE_MODAL_KEY);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue