mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(editor): Redirect to workflow editor after saving in debug mode (#7645)
This commit is contained in:
@@ -379,7 +379,17 @@ export default defineComponent({
|
||||
name: this.workflowName,
|
||||
tags: this.currentWorkflowTagIds,
|
||||
});
|
||||
if (saved) await this.settingsStore.fetchPromptsData();
|
||||
|
||||
if (saved) {
|
||||
await this.settingsStore.fetchPromptsData();
|
||||
|
||||
if (this.$route.name === VIEWS.EXECUTION_DEBUG) {
|
||||
await this.$router.replace({
|
||||
name: VIEWS.WORKFLOW,
|
||||
params: { name: this.currentWorkflowId },
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
onShareButtonClick() {
|
||||
this.uiStore.openModalWithData({
|
||||
|
||||
@@ -459,7 +459,11 @@ export default defineComponent({
|
||||
},
|
||||
},
|
||||
async beforeRouteLeave(to, from, next) {
|
||||
if (getNodeViewTab(to) === MAIN_HEADER_TABS.EXECUTIONS || from.name === VIEWS.TEMPLATE_IMPORT) {
|
||||
if (
|
||||
getNodeViewTab(to) === MAIN_HEADER_TABS.EXECUTIONS ||
|
||||
from.name === VIEWS.TEMPLATE_IMPORT ||
|
||||
(getNodeViewTab(to) === MAIN_HEADER_TABS.WORKFLOW && from.name === VIEWS.EXECUTION_DEBUG)
|
||||
) {
|
||||
next();
|
||||
return;
|
||||
}
|
||||
@@ -793,7 +797,16 @@ export default defineComponent({
|
||||
},
|
||||
async onSaveKeyboardShortcut(e: KeyboardEvent) {
|
||||
let saved = await this.saveCurrentWorkflow();
|
||||
if (saved) await this.settingsStore.fetchPromptsData();
|
||||
if (saved) {
|
||||
await this.settingsStore.fetchPromptsData();
|
||||
|
||||
if (this.$route.name === VIEWS.EXECUTION_DEBUG) {
|
||||
await this.$router.replace({
|
||||
name: VIEWS.WORKFLOW,
|
||||
params: { name: this.currentWorkflow },
|
||||
});
|
||||
}
|
||||
}
|
||||
if (this.activeNode) {
|
||||
// If NDV is open, save will not work from editable input fields
|
||||
// so don't show success message if this is true
|
||||
@@ -3995,7 +4008,7 @@ export default defineComponent({
|
||||
|
||||
const node = tempWorkflow.nodes[nodeNameTable[nodeName]];
|
||||
try {
|
||||
this.setPinData(node, data.pinData![nodeName], 'add-nodes');
|
||||
this.setPinData(node, data.pinData[nodeName], 'add-nodes');
|
||||
pinDataSuccess = true;
|
||||
} catch (error) {
|
||||
pinDataSuccess = false;
|
||||
|
||||
Reference in New Issue
Block a user