mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
feat(editor): Add localStorage flag to prevent opening NDV in new canvas (no-changelog) (#10187)
This commit is contained in:
parent
2f3baa4251
commit
5929351f0c
|
@ -136,6 +136,8 @@ export function useCanvasOperations({
|
||||||
const externalHooks = useExternalHooks();
|
const externalHooks = useExternalHooks();
|
||||||
const clipboard = useClipboard();
|
const clipboard = useClipboard();
|
||||||
|
|
||||||
|
const preventOpeningNDV = !!localStorage.getItem('NodeView.preventOpeningNDV');
|
||||||
|
|
||||||
const editableWorkflow = computed(() => workflowsStore.workflow);
|
const editableWorkflow = computed(() => workflowsStore.workflow);
|
||||||
const editableWorkflowObject = computed(() => workflowsStore.getCurrentWorkflow());
|
const editableWorkflowObject = computed(() => workflowsStore.getCurrentWorkflow());
|
||||||
|
|
||||||
|
@ -558,7 +560,7 @@ export function useCanvasOperations({
|
||||||
|
|
||||||
runAddNodeHooks(nodeData, options);
|
runAddNodeHooks(nodeData, options);
|
||||||
|
|
||||||
if (options.openNDV) {
|
if (options.openNDV && !preventOpeningNDV) {
|
||||||
ndvStore.setActiveNodeName(nodeData.name);
|
ndvStore.setActiveNodeName(nodeData.name);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue