mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +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:
@@ -48,8 +48,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
|
||||
import { ONBOARDING_CALL_SIGNUP_MODAL_KEY, VALID_EMAIL_REGEX } from '@/constants';
|
||||
import Modal from './Modal.vue';
|
||||
|
||||
@@ -57,6 +55,7 @@ import mixins from 'vue-typed-mixins';
|
||||
import { showMessage } from '@/mixins/showMessage';
|
||||
import { mapStores } from 'pinia';
|
||||
import { useUIStore } from '@/stores/ui';
|
||||
import { createEventBus } from '@/event-bus';
|
||||
|
||||
export default mixins(showMessage).extend({
|
||||
components: {
|
||||
@@ -67,7 +66,7 @@ export default mixins(showMessage).extend({
|
||||
data() {
|
||||
return {
|
||||
email: '',
|
||||
modalBus: new Vue(),
|
||||
modalBus: createEventBus(),
|
||||
ONBOARDING_CALL_SIGNUP_MODAL_KEY,
|
||||
showError: false,
|
||||
okToClose: false,
|
||||
@@ -98,7 +97,7 @@ export default mixins(showMessage).extend({
|
||||
message: this.$locale.baseText('onboardingCallSignupSucess.message'),
|
||||
});
|
||||
this.okToClose = true;
|
||||
this.modalBus.$emit('close');
|
||||
this.modalBus.emit('close');
|
||||
} catch (e) {
|
||||
this.$showError(
|
||||
e,
|
||||
@@ -111,7 +110,7 @@ export default mixins(showMessage).extend({
|
||||
},
|
||||
async onCancel() {
|
||||
this.okToClose = true;
|
||||
this.modalBus.$emit('close');
|
||||
this.modalBus.emit('close');
|
||||
},
|
||||
onModalClose() {
|
||||
return this.okToClose;
|
||||
|
||||
Reference in New Issue
Block a user