mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(editor): Enable collaboration features only in NodeView v2 (no-changelog) (#10756)
This commit is contained in:
committed by
GitHub
parent
ee5fbc543c
commit
a1e011dd2a
@@ -8,7 +8,6 @@ import { getNodeViewTab } from '@/utils/canvasUtils';
|
||||
import { MAIN_HEADER_TABS, PLACEHOLDER_EMPTY_WORKFLOW_ID, VIEWS } from '@/constants';
|
||||
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';
|
||||
|
||||
@@ -20,8 +19,6 @@ const router = useRouter();
|
||||
const route = useRoute();
|
||||
const workflowHelpers = useWorkflowHelpers({ router });
|
||||
|
||||
const { resetWorkspace } = useCanvasOperations({ router });
|
||||
|
||||
const nodeViewVersion = useLocalStorage(
|
||||
'NodeView.version',
|
||||
settingsStore.deploymentType === 'n8n-internal' ? '2' : '1',
|
||||
@@ -56,9 +53,6 @@ onBeforeRouteLeave(async (to, from, next) => {
|
||||
|
||||
await workflowHelpers.promptSaveUnsavedWorkflowChanges(next, {
|
||||
async confirm() {
|
||||
// Make sure workflow id is empty when leaving the editor
|
||||
workflowsStore.setWorkflowId(PLACEHOLDER_EMPTY_WORKFLOW_ID);
|
||||
|
||||
if (from.name === VIEWS.NEW_WORKFLOW) {
|
||||
// Replace the current route with the new workflow route
|
||||
// before navigating to the new route when saving new workflow.
|
||||
@@ -72,11 +66,10 @@ onBeforeRouteLeave(async (to, from, next) => {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
async cancel() {
|
||||
// Make sure workflow id is empty when leaving the editor
|
||||
workflowsStore.setWorkflowId(PLACEHOLDER_EMPTY_WORKFLOW_ID);
|
||||
resetWorkspace();
|
||||
|
||||
return true;
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user