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:
@@ -174,11 +174,13 @@
|
||||
<script lang="ts">
|
||||
import { get, set, unset } from 'lodash-es';
|
||||
import { mapStores } from 'pinia';
|
||||
import mixins from 'vue-typed-mixins';
|
||||
import { useLogStreamingStore } from '@/stores/logStreaming.store';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import ParameterInputList from '@/components/ParameterInputList.vue';
|
||||
import type { IMenuItem, INodeUi, IUpdateInformation } from '@/Interface';
|
||||
import NodeCredentials from '@/components/NodeCredentials.vue';
|
||||
import type { IMenuItem, INodeUi, ITab, IUpdateInformation } from '@/Interface';
|
||||
import type {
|
||||
IDataObject,
|
||||
INodeCredentials,
|
||||
@@ -194,26 +196,27 @@ import {
|
||||
defaultMessageEventBusDestinationSentryOptions,
|
||||
} from 'n8n-workflow';
|
||||
import type { PropType } from 'vue';
|
||||
import Vue, { defineComponent } from 'vue';
|
||||
import { LOG_STREAM_MODAL_KEY, MODAL_CONFIRM } from '@/constants';
|
||||
import Vue from 'vue';
|
||||
import { LOG_STREAM_MODAL_KEY } from '@/constants';
|
||||
import Modal from '@/components/Modal.vue';
|
||||
import { useMessage } from '@/composables';
|
||||
import { showMessage } from '@/mixins/showMessage';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useUsersStore } from '@/stores/users.store';
|
||||
import { destinationToFakeINodeUi } from '@/components/SettingsLogStreaming/Helpers.ee';
|
||||
import { destinationToFakeINodeUi } from './Helpers.ee';
|
||||
import {
|
||||
webhookModalDescription,
|
||||
sentryModalDescription,
|
||||
syslogModalDescription,
|
||||
} from './descriptions.ee';
|
||||
import type { BaseTextKey } from '@/plugins/i18n';
|
||||
import InlineNameEdit from '@/components/InlineNameEdit.vue';
|
||||
import SaveButton from '@/components/SaveButton.vue';
|
||||
import InlineNameEdit from '../InlineNameEdit.vue';
|
||||
import SaveButton from '../SaveButton.vue';
|
||||
import EventSelection from '@/components/SettingsLogStreaming/EventSelection.ee.vue';
|
||||
import { Checkbox } from 'element-ui';
|
||||
import type { EventBus } from '@/event-bus';
|
||||
import { createEventBus } from '@/event-bus';
|
||||
|
||||
export default defineComponent({
|
||||
export default mixins(showMessage).extend({
|
||||
name: 'event-destination-settings-modal',
|
||||
props: {
|
||||
modalName: String,
|
||||
@@ -229,14 +232,11 @@ export default defineComponent({
|
||||
components: {
|
||||
Modal,
|
||||
ParameterInputList,
|
||||
NodeCredentials,
|
||||
InlineNameEdit,
|
||||
SaveButton,
|
||||
EventSelection,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
...useMessage(),
|
||||
};
|
||||
Checkbox,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -311,6 +311,18 @@ export default defineComponent({
|
||||
}
|
||||
return items;
|
||||
},
|
||||
tabItems(): ITab[] {
|
||||
return [
|
||||
{
|
||||
label: this.$locale.baseText('settings.log-streaming.tab.settings'),
|
||||
value: 'settings',
|
||||
},
|
||||
{
|
||||
label: this.$locale.baseText('settings.log-streaming.tab.events'),
|
||||
value: 'events',
|
||||
},
|
||||
];
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.isInstanceOwner = this.usersStore.currentUser?.globalRole?.name === 'owner';
|
||||
@@ -430,23 +442,17 @@ export default defineComponent({
|
||||
this.testMessageSent = true;
|
||||
},
|
||||
async removeThis() {
|
||||
const deleteConfirmed = await this.confirm(
|
||||
const deleteConfirmed = await this.confirmMessage(
|
||||
this.$locale.baseText('settings.log-streaming.destinationDelete.message', {
|
||||
interpolate: { destinationName: this.destination.label },
|
||||
}),
|
||||
this.$locale.baseText('settings.log-streaming.destinationDelete.headline'),
|
||||
{
|
||||
type: 'warning',
|
||||
confirmButtonText: this.$locale.baseText(
|
||||
'settings.log-streaming.destinationDelete.confirmButtonText',
|
||||
),
|
||||
cancelButtonText: this.$locale.baseText(
|
||||
'settings.log-streaming.destinationDelete.cancelButtonText',
|
||||
),
|
||||
},
|
||||
'warning',
|
||||
this.$locale.baseText('settings.log-streaming.destinationDelete.confirmButtonText'),
|
||||
this.$locale.baseText('settings.log-streaming.destinationDelete.cancelButtonText'),
|
||||
);
|
||||
|
||||
if (deleteConfirmed !== MODAL_CONFIRM) {
|
||||
if (deleteConfirmed === false) {
|
||||
return;
|
||||
} else {
|
||||
this.eventBus.emit('remove', this.destination.id);
|
||||
|
||||
Reference in New Issue
Block a user