mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
feat: Reintroduce collaboration feature (#10602)
This commit is contained in:
@@ -101,6 +101,7 @@ import { createEventBus } from 'n8n-design-system';
|
||||
import type { PinDataSource } from '@/composables/usePinnedData';
|
||||
import { useClipboard } from '@/composables/useClipboard';
|
||||
import { useBeforeUnload } from '@/composables/useBeforeUnload';
|
||||
import { useCollaborationStore } from '@/stores/collaboration.store';
|
||||
import { getResourcePermissions } from '@/permissions';
|
||||
import NodeViewUnfinishedWorkflowMessage from '@/components/NodeViewUnfinishedWorkflowMessage.vue';
|
||||
|
||||
@@ -134,6 +135,7 @@ const credentialsStore = useCredentialsStore();
|
||||
const environmentsStore = useEnvironmentsStore();
|
||||
const externalSecretsStore = useExternalSecretsStore();
|
||||
const rootStore = useRootStore();
|
||||
const collaborationStore = useCollaborationStore();
|
||||
const executionsStore = useExecutionsStore();
|
||||
const canvasStore = useCanvasStore();
|
||||
const npsSurveyStore = useNpsSurveyStore();
|
||||
@@ -338,6 +340,8 @@ async function initializeWorkspaceForExistingWorkflow(id: string) {
|
||||
}
|
||||
|
||||
await projectsStore.setProjectNavActiveIdByWorkflowHomeProject(workflow.value.homeProject);
|
||||
|
||||
collaborationStore.notifyWorkflowOpened(id);
|
||||
} catch (error) {
|
||||
toast.showError(error, i18n.baseText('openWorkflow.workflowNotFoundError'));
|
||||
|
||||
@@ -1456,6 +1460,7 @@ watch(
|
||||
onBeforeMount(() => {
|
||||
if (!isDemoRoute.value) {
|
||||
pushConnectionStore.pushConnect();
|
||||
collaborationStore.initialize();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1509,6 +1514,7 @@ onBeforeUnmount(() => {
|
||||
|
||||
onDeactivated(() => {
|
||||
removeBeforeUnloadEventBindings();
|
||||
collaborationStore.terminate();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user