mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
refactor(editor): Turn titleChange mixin to composable (#6059)
This commit is contained in:
@@ -209,7 +209,7 @@ import { restApi } from '@/mixins/restApi';
|
||||
import useGlobalLinkActions from '@/composables/useGlobalLinkActions';
|
||||
import useCanvasMouseSelect from '@/composables/useCanvasMouseSelect';
|
||||
import { showMessage } from '@/mixins/showMessage';
|
||||
import { titleChange } from '@/mixins/titleChange';
|
||||
import { useTitleChange } from '@/composables/useTitleChange';
|
||||
|
||||
import { workflowHelpers } from '@/mixins/workflowHelpers';
|
||||
import { workflowRun } from '@/mixins/workflowRun';
|
||||
@@ -226,6 +226,7 @@ import {
|
||||
IConnection,
|
||||
IConnections,
|
||||
IDataObject,
|
||||
IExecutionsSummary,
|
||||
INode,
|
||||
INodeConnections,
|
||||
INodeCredentialsDetails,
|
||||
@@ -254,7 +255,6 @@ import type {
|
||||
ITag,
|
||||
INewWorkflowData,
|
||||
IWorkflowTemplate,
|
||||
IExecutionsSummary,
|
||||
IWorkflowToShare,
|
||||
IUser,
|
||||
INodeUpdatePropertiesInformation,
|
||||
@@ -307,7 +307,6 @@ import {
|
||||
N8nPlusEndpointType,
|
||||
EVENT_PLUS_ENDPOINT_CLICK,
|
||||
} from '@/plugins/endpoints/N8nPlusEndpointType';
|
||||
import { usePostHog } from '@/stores/posthog';
|
||||
|
||||
interface AddNodeOptions {
|
||||
position?: XYPosition;
|
||||
@@ -325,7 +324,6 @@ export default mixins(
|
||||
moveNodeWorkflow,
|
||||
restApi,
|
||||
showMessage,
|
||||
titleChange,
|
||||
workflowHelpers,
|
||||
workflowRun,
|
||||
debounceHelper,
|
||||
@@ -345,6 +343,7 @@ export default mixins(
|
||||
return {
|
||||
...useCanvasMouseSelect(),
|
||||
...useGlobalLinkActions(),
|
||||
...useTitleChange(),
|
||||
};
|
||||
},
|
||||
errorCaptured: (err, vm, info) => {
|
||||
@@ -1423,7 +1422,7 @@ export default mixins(
|
||||
this.workflowsStore.executingNode = null;
|
||||
this.uiStore.removeActiveAction('workflowRunning');
|
||||
|
||||
this.$titleSet(this.workflowsStore.workflowName, 'IDLE');
|
||||
this.titleSet(this.workflowsStore.workflowName, 'IDLE');
|
||||
this.$showMessage({
|
||||
title: this.$locale.baseText('nodeView.showMessage.stopExecutionCatch.unsaved.title'),
|
||||
message: this.$locale.baseText(
|
||||
@@ -1447,7 +1446,7 @@ export default mixins(
|
||||
retryOf: execution.retryOf,
|
||||
} as IPushDataExecutionFinished;
|
||||
this.workflowsStore.finishActiveExecution(pushData);
|
||||
this.$titleSet(execution.workflowData.name, 'IDLE');
|
||||
this.titleSet(execution.workflowData.name, 'IDLE');
|
||||
this.workflowsStore.executingNode = null;
|
||||
this.workflowsStore.setWorkflowExecutionData(executedData as IExecutionResponse);
|
||||
this.uiStore.removeActiveAction('workflowRunning');
|
||||
@@ -2597,7 +2596,7 @@ export default mixins(
|
||||
}
|
||||
|
||||
if (workflow) {
|
||||
this.$titleSet(workflow.name, 'IDLE');
|
||||
this.titleSet(workflow.name, 'IDLE');
|
||||
// Open existing workflow
|
||||
await this.openWorkflow(workflow);
|
||||
}
|
||||
@@ -3848,7 +3847,7 @@ export default mixins(
|
||||
async mounted() {
|
||||
this.resetWorkspace();
|
||||
this.canvasStore.initInstance(this.$refs.nodeView as HTMLElement);
|
||||
this.$titleReset();
|
||||
this.titleReset();
|
||||
window.addEventListener('message', this.onPostMessageReceived);
|
||||
|
||||
this.startLoading();
|
||||
|
||||
Reference in New Issue
Block a user