diff --git a/packages/editor-ui/src/Interface.ts b/packages/editor-ui/src/Interface.ts index 1818b22776..67a4053308 100644 --- a/packages/editor-ui/src/Interface.ts +++ b/packages/editor-ui/src/Interface.ts @@ -447,6 +447,7 @@ export type IPushData = | PushDataExecutionStarted | PushDataExecuteAfter | PushDataExecuteBefore + | PushDataNodeDescriptionUpdated | PushDataConsoleMessage | PushDataReloadNodeType | PushDataRemoveNodeType @@ -458,67 +459,72 @@ export type IPushData = | PushDataWorkflowFailedToActivate | PushDataWorkflowUsersChanged; -type PushDataActiveWorkflowAdded = { +export type PushDataActiveWorkflowAdded = { data: IActiveWorkflowAdded; type: 'workflowActivated'; }; -type PushDataActiveWorkflowRemoved = { +export type PushDataActiveWorkflowRemoved = { data: IActiveWorkflowRemoved; type: 'workflowDeactivated'; }; -type PushDataWorkflowFailedToActivate = { +export type PushDataWorkflowFailedToActivate = { data: IWorkflowFailedToActivate; type: 'workflowFailedToActivate'; }; -type PushDataExecutionRecovered = { +export type PushDataExecutionRecovered = { data: IPushDataExecutionRecovered; type: 'executionRecovered'; }; -type PushDataExecutionFinished = { +export type PushDataExecutionFinished = { data: IPushDataExecutionFinished; type: 'executionFinished'; }; -type PushDataExecutionStarted = { +export type PushDataExecutionStarted = { data: IPushDataExecutionStarted; type: 'executionStarted'; }; -type PushDataExecuteAfter = { +export type PushDataExecuteAfter = { data: IPushDataNodeExecuteAfter; type: 'nodeExecuteAfter'; }; -type PushDataExecuteBefore = { +export type PushDataExecuteBefore = { data: IPushDataNodeExecuteBefore; type: 'nodeExecuteBefore'; }; -type PushDataConsoleMessage = { +export type PushDataNodeDescriptionUpdated = { + data: {}; + type: 'nodeDescriptionUpdated'; +}; + +export type PushDataConsoleMessage = { data: IPushDataConsoleMessage; type: 'sendConsoleMessage'; }; -type PushDataReloadNodeType = { +export type PushDataReloadNodeType = { data: IPushDataReloadNodeType; type: 'reloadNodeType'; }; -type PushDataRemoveNodeType = { +export type PushDataRemoveNodeType = { data: IPushDataRemoveNodeType; type: 'removeNodeType'; }; -type PushDataTestWebhook = { +export type PushDataTestWebhook = { data: IPushDataTestWebhook; type: 'testWebhookDeleted' | 'testWebhookReceived'; }; -type PushDataWorkerStatusMessage = { +export type PushDataWorkerStatusMessage = { data: IPushDataWorkerStatusMessage; type: 'sendWorkerStatusMessage'; }; diff --git a/packages/editor-ui/src/components/MainHeader/CollaborationPane.vue b/packages/editor-ui/src/components/MainHeader/CollaborationPane.vue index 31d387b3db..daabc0a178 100644 --- a/packages/editor-ui/src/components/MainHeader/CollaborationPane.vue +++ b/packages/editor-ui/src/components/MainHeader/CollaborationPane.vue @@ -54,6 +54,7 @@ const onDocumentVisibilityChange = () => { }; onMounted(() => { + collaborationStore.initialize(); startHeartbeat(); document.addEventListener('visibilitychange', onDocumentVisibilityChange); }); @@ -61,6 +62,7 @@ onMounted(() => { onBeforeUnmount(() => { document.removeEventListener('visibilitychange', onDocumentVisibilityChange); stopHeartbeat(); + collaborationStore.terminate(); }); diff --git a/packages/editor-ui/src/components/MainHeader/MainHeader.vue b/packages/editor-ui/src/components/MainHeader/MainHeader.vue index c0e7068140..ed7b43715e 100644 --- a/packages/editor-ui/src/components/MainHeader/MainHeader.vue +++ b/packages/editor-ui/src/components/MainHeader/MainHeader.vue @@ -16,9 +16,9 @@