mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 02:51:14 +00:00
Revert "refactor(editor): Turn showMessage mixin to composable" (#6243)
Revert "refactor(editor): Turn showMessage mixin to composable (#6081)"
This reverts commit b95fcd7323.
This commit is contained in:
@@ -328,7 +328,7 @@ import Vue from 'vue';
|
||||
|
||||
import { externalHooks } from '@/mixins/externalHooks';
|
||||
import { genericHelpers } from '@/mixins/genericHelpers';
|
||||
import { useToast } from '@/composables';
|
||||
import { showMessage } from '@/mixins/showMessage';
|
||||
import type {
|
||||
ITimeoutHMS,
|
||||
IUser,
|
||||
@@ -337,12 +337,12 @@ import type {
|
||||
IWorkflowSettings,
|
||||
IWorkflowShortResponse,
|
||||
} from '@/Interface';
|
||||
import Modal from '@/components/Modal.vue';
|
||||
import Modal from './Modal.vue';
|
||||
import {
|
||||
EnterpriseEditionFeature,
|
||||
PLACEHOLDER_EMPTY_WORKFLOW_ID,
|
||||
WORKFLOW_SETTINGS_MODAL_KEY,
|
||||
} from '@/constants';
|
||||
} from '../constants';
|
||||
|
||||
import mixins from 'vue-typed-mixins';
|
||||
|
||||
@@ -356,16 +356,11 @@ import useWorkflowsEEStore from '@/stores/workflows.ee.store';
|
||||
import { useUsersStore } from '@/stores/users.store';
|
||||
import { createEventBus } from '@/event-bus';
|
||||
|
||||
export default mixins(externalHooks, genericHelpers).extend({
|
||||
export default mixins(externalHooks, genericHelpers, showMessage).extend({
|
||||
name: 'WorkflowSettings',
|
||||
components: {
|
||||
Modal,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
...useToast(),
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoading: true,
|
||||
@@ -453,7 +448,7 @@ export default mixins(externalHooks, genericHelpers).extend({
|
||||
this.maxExecutionTimeout = this.rootStore.maxExecutionTimeout;
|
||||
|
||||
if (!this.workflowId || this.workflowId === PLACEHOLDER_EMPTY_WORKFLOW_ID) {
|
||||
this.showMessage({
|
||||
this.$showMessage({
|
||||
title: 'No workflow active',
|
||||
message: 'No workflow active to display settings of.',
|
||||
type: 'error',
|
||||
@@ -482,7 +477,7 @@ export default mixins(externalHooks, genericHelpers).extend({
|
||||
try {
|
||||
await Promise.all(promises);
|
||||
} catch (error) {
|
||||
this.showError(
|
||||
this.$showError(
|
||||
error,
|
||||
'Problem loading settings',
|
||||
'The following error occurred loading the data:',
|
||||
@@ -759,7 +754,7 @@ export default mixins(externalHooks, genericHelpers).extend({
|
||||
data.settings!.executionTimeout !== -1 ? hours * 3600 + minutes * 60 + seconds : -1;
|
||||
|
||||
if (data.settings!.executionTimeout === 0) {
|
||||
this.showError(
|
||||
this.$showError(
|
||||
new Error(this.$locale.baseText('workflowSettings.showError.saveSettings1.errorMessage')),
|
||||
this.$locale.baseText('workflowSettings.showError.saveSettings1.title'),
|
||||
this.$locale.baseText('workflowSettings.showError.saveSettings1.message') + ':',
|
||||
@@ -772,7 +767,7 @@ export default mixins(externalHooks, genericHelpers).extend({
|
||||
const { hours, minutes, seconds } = this.convertToHMS(
|
||||
this.workflowSettings.maxExecutionTimeout as number,
|
||||
);
|
||||
this.showError(
|
||||
this.$showError(
|
||||
new Error(
|
||||
this.$locale.baseText('workflowSettings.showError.saveSettings2.errorMessage', {
|
||||
interpolate: {
|
||||
@@ -796,7 +791,7 @@ export default mixins(externalHooks, genericHelpers).extend({
|
||||
const workflow = await this.workflowsStore.updateWorkflow(this.$route.params.name, data);
|
||||
this.workflowsStore.setWorkflowVersionId(workflow.versionId);
|
||||
} catch (error) {
|
||||
this.showError(
|
||||
this.$showError(
|
||||
error,
|
||||
this.$locale.baseText('workflowSettings.showError.saveSettings3.title'),
|
||||
);
|
||||
@@ -818,7 +813,7 @@ export default mixins(externalHooks, genericHelpers).extend({
|
||||
|
||||
this.isLoading = false;
|
||||
|
||||
this.showMessage({
|
||||
this.$showMessage({
|
||||
title: this.$locale.baseText('workflowSettings.showMessage.saveSettings.title'),
|
||||
type: 'success',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user