mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 04:10:01 +00:00
refactor(core): Delete all collaboration related code (no-changelog) (#9929)
This commit is contained in:
committed by
GitHub
parent
24091dfd9b
commit
22990342df
@@ -246,7 +246,6 @@ import {
|
||||
AI_NODE_CREATOR_VIEW,
|
||||
DRAG_EVENT_DATA_KEY,
|
||||
UPDATE_WEBHOOK_ID_NODE_TYPES,
|
||||
TIME,
|
||||
AI_ASSISTANT_LOCAL_STORAGE_KEY,
|
||||
CANVAS_AUTO_ADD_MANUAL_TRIGGER_EXPERIMENT,
|
||||
} from '@/constants';
|
||||
@@ -322,7 +321,6 @@ import type {
|
||||
import { type RouteLocation, useRouter } from 'vue-router';
|
||||
import { dataPinningEventBus, nodeViewEventBus } from '@/event-bus';
|
||||
import { useCanvasStore } from '@/stores/canvas.store';
|
||||
import { useCollaborationStore } from '@/stores/collaboration.store';
|
||||
import { useCredentialsStore } from '@/stores/credentials.store';
|
||||
import { useEnvironmentsStore } from '@/stores/environments.ee.store';
|
||||
import { useExternalSecretsStore } from '@/stores/externalSecrets.ee.store';
|
||||
@@ -471,18 +469,15 @@ export default defineComponent({
|
||||
|
||||
await this.$router.push(to);
|
||||
} else {
|
||||
this.collaborationStore.notifyWorkflowClosed(this.currentWorkflow);
|
||||
next();
|
||||
}
|
||||
} else if (confirmModal === MODAL_CANCEL) {
|
||||
this.collaborationStore.notifyWorkflowClosed(this.currentWorkflow);
|
||||
this.workflowsStore.setWorkflowId(PLACEHOLDER_EMPTY_WORKFLOW_ID);
|
||||
this.resetWorkspace();
|
||||
this.uiStore.stateIsDirty = false;
|
||||
next();
|
||||
}
|
||||
} else {
|
||||
this.collaborationStore.notifyWorkflowClosed(this.currentWorkflow);
|
||||
next();
|
||||
}
|
||||
},
|
||||
@@ -588,7 +583,6 @@ export default defineComponent({
|
||||
useWorkflowsEEStore,
|
||||
useHistoryStore,
|
||||
useExternalSecretsStore,
|
||||
useCollaborationStore,
|
||||
usePushConnectionStore,
|
||||
useSourceControlStore,
|
||||
useExecutionsStore,
|
||||
@@ -1035,7 +1029,6 @@ export default defineComponent({
|
||||
if (!this.isDemo) {
|
||||
this.pushStore.pushConnect();
|
||||
}
|
||||
this.collaborationStore.initialize();
|
||||
},
|
||||
beforeUnmount() {
|
||||
// Make sure the event listeners get removed again else we
|
||||
@@ -1049,7 +1042,6 @@ export default defineComponent({
|
||||
if (!this.isDemo) {
|
||||
this.pushStore.pushDisconnect();
|
||||
}
|
||||
this.collaborationStore.terminate();
|
||||
|
||||
this.resetWorkspace();
|
||||
this.instance.unbind();
|
||||
@@ -1506,7 +1498,6 @@ export default defineComponent({
|
||||
this.executionsStore.activeExecution = selectedExecution;
|
||||
}
|
||||
this.canvasStore.stopLoading();
|
||||
this.collaborationStore.notifyWorkflowOpened(workflow.id);
|
||||
},
|
||||
touchTap(e: MouseEvent | TouchEvent) {
|
||||
if (this.deviceSupport.isTouchDevice) {
|
||||
@@ -3681,18 +3672,10 @@ export default defineComponent({
|
||||
if (this.isDemo || window.preventNodeViewBeforeUnload) {
|
||||
return;
|
||||
} else if (this.uiStore.stateIsDirty) {
|
||||
// A bit hacky solution to detecting users leaving the page after prompt:
|
||||
// 1. Notify that workflow is closed straight away
|
||||
this.collaborationStore.notifyWorkflowClosed(this.workflowsStore.workflowId);
|
||||
// 2. If user decided to stay on the page we notify that the workflow is opened again
|
||||
this.unloadTimeout = setTimeout(() => {
|
||||
this.collaborationStore.notifyWorkflowOpened(this.workflowsStore.workflowId);
|
||||
}, 5 * TIME.SECOND);
|
||||
e.returnValue = true; //Gecko + IE
|
||||
return true; //Gecko + Webkit, Safari, Chrome etc.
|
||||
} else {
|
||||
this.canvasStore.startLoading(this.$locale.baseText('nodeView.redirecting'));
|
||||
this.collaborationStore.notifyWorkflowClosed(this.workflowsStore.workflowId);
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user