mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
feat: Replace new Vue() with custom event bus (no-changelog) (#5780)
* refactor: replace new Vue() with custom event bus (no-changelog) * fix: export types from design system main * fix: update component types * fix: update form inputs event bus
This commit is contained in:
@@ -193,7 +193,7 @@ import {
|
||||
defaultMessageEventBusDestinationSyslogOptions,
|
||||
defaultMessageEventBusDestinationSentryOptions,
|
||||
} from 'n8n-workflow';
|
||||
import Vue from 'vue';
|
||||
import Vue, { PropType } from 'vue';
|
||||
import { LOG_STREAM_MODAL_KEY } from '../../constants';
|
||||
import Modal from '@/components/Modal.vue';
|
||||
import { showMessage } from '@/mixins/showMessage';
|
||||
@@ -210,6 +210,7 @@ import InlineNameEdit from '../InlineNameEdit.vue';
|
||||
import SaveButton from '../SaveButton.vue';
|
||||
import EventSelection from '@/components/SettingsLogStreaming/EventSelection.ee.vue';
|
||||
import { Checkbox } from 'element-ui';
|
||||
import { createEventBus, EventBus } from '@/event-bus';
|
||||
|
||||
export default mixins(showMessage).extend({
|
||||
name: 'event-destination-settings-modal',
|
||||
@@ -221,7 +222,7 @@ export default mixins(showMessage).extend({
|
||||
},
|
||||
isNew: Boolean,
|
||||
eventBus: {
|
||||
type: Vue,
|
||||
type: Object as PropType<EventBus>,
|
||||
},
|
||||
},
|
||||
components: {
|
||||
@@ -248,7 +249,7 @@ export default mixins(showMessage).extend({
|
||||
webhookDescription: webhookModalDescription,
|
||||
sentryDescription: sentryModalDescription,
|
||||
syslogDescription: syslogModalDescription,
|
||||
modalBus: new Vue(),
|
||||
modalBus: createEventBus(),
|
||||
headerLabel: this.$props.destination.label,
|
||||
testMessageSent: false,
|
||||
testMessageResult: false,
|
||||
@@ -450,7 +451,7 @@ export default mixins(showMessage).extend({
|
||||
if (deleteConfirmed === false) {
|
||||
return;
|
||||
} else {
|
||||
this.$props.eventBus.$emit('remove', this.destination.id);
|
||||
this.$props.eventBus.emit('remove', this.destination.id);
|
||||
this.uiStore.closeModal(LOG_STREAM_MODAL_KEY);
|
||||
this.uiStore.stateIsDirty = false;
|
||||
}
|
||||
@@ -461,7 +462,7 @@ export default mixins(showMessage).extend({
|
||||
this.logStreamingStore.removeDestination(this.nodeParameters.id!);
|
||||
}
|
||||
this.ndvStore.activeNodeName = null;
|
||||
this.$props.eventBus.$emit('closing', this.destination.id);
|
||||
this.$props.eventBus.emit('closing', this.destination.id);
|
||||
this.uiStore.stateIsDirty = false;
|
||||
},
|
||||
async saveDestination() {
|
||||
@@ -473,7 +474,7 @@ export default mixins(showMessage).extend({
|
||||
this.hasOnceBeenSaved = true;
|
||||
this.testMessageSent = false;
|
||||
this.unchanged = true;
|
||||
this.$props.eventBus.$emit('destinationWasSaved', this.destination.id);
|
||||
this.$props.eventBus.emit('destinationWasSaved', this.destination.id);
|
||||
this.uiStore.stateIsDirty = false;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user