feat(editor): Set default canvas version to version 2 on internal deployment (no-changelog) (#10514)

This commit is contained in:
Alex Grozav 2024-08-26 10:32:57 +03:00 committed by GitHub
parent 351d8413e9
commit 51c70b5cff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,9 +10,11 @@ import { useWorkflowsStore } from '@/stores/workflows.store';
import { useWorkflowHelpers } from '@/composables/useWorkflowHelpers';
import { useCanvasOperations } from '@/composables/useCanvasOperations';
import { useSourceControlStore } from '@/stores/sourceControl.store';
import { useSettingsStore } from '@/stores/settings.store';
const workflowsStore = useWorkflowsStore();
const sourceControlStore = useSourceControlStore();
const settingsStore = useSettingsStore();
const router = useRouter();
const route = useRoute();
@ -20,7 +22,10 @@ const workflowHelpers = useWorkflowHelpers({ router });
const { resetWorkspace } = useCanvasOperations({ router });
const nodeViewVersion = useLocalStorage('NodeView.version', '1');
const nodeViewVersion = useLocalStorage(
'NodeView.version',
settingsStore.deploymentType === 'n8n-internal' ? '2' : '1',
);
const workflowId = computed<string>(() => route.params.name as string);