mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
refactor(editor): Use form event bus everywhere (no-changelog) (#10394)
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
This commit is contained in:
parent
bae0116d78
commit
e4c88e75f9
|
@ -34,12 +34,12 @@ import { useToast } from '@/composables/useToast';
|
|||
import { CHANGE_PASSWORD_MODAL_KEY } from '../constants';
|
||||
import Modal from '@/components/Modal.vue';
|
||||
import { useUsersStore } from '@/stores/users.store';
|
||||
import { createEventBus } from 'n8n-design-system/utils';
|
||||
import { createFormEventBus, createEventBus } from 'n8n-design-system/utils';
|
||||
import type { IFormInputs, IFormInput } from '@/Interface';
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
|
||||
const config = ref<IFormInputs | null>(null);
|
||||
const formBus = createEventBus();
|
||||
const formBus = createFormEventBus();
|
||||
const modalBus = createEventBus();
|
||||
const password = ref('');
|
||||
const loading = ref(false);
|
||||
|
|
|
@ -75,7 +75,7 @@ import {
|
|||
import { useUsersStore } from '@/stores/users.store';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { createEventBus } from 'n8n-design-system/utils';
|
||||
import { createFormEventBus, createEventBus } from 'n8n-design-system/utils';
|
||||
import { useClipboard } from '@/composables/useClipboard';
|
||||
|
||||
const NAME_EMAIL_FORMAT_REGEX = /^.* <(.*)>$/;
|
||||
|
@ -110,7 +110,7 @@ export default defineComponent({
|
|||
data() {
|
||||
return {
|
||||
config: null as IFormInputs | null,
|
||||
formBus: createEventBus(),
|
||||
formBus: createFormEventBus(),
|
||||
modalBus: createEventBus(),
|
||||
emails: '',
|
||||
role: ROLE.Member as InvitableRoleName,
|
||||
|
|
|
@ -144,7 +144,7 @@ import { useUIStore } from '@/stores/ui.store';
|
|||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useRootStore } from '@/stores/root.store';
|
||||
import { useUsersStore } from '@/stores/users.store';
|
||||
import { createEventBus } from 'n8n-design-system/utils';
|
||||
import { createEventBus, createFormEventBus } from 'n8n-design-system/utils';
|
||||
import { usePostHog } from '@/stores/posthog.store';
|
||||
import { useExternalHooks } from '@/composables/useExternalHooks';
|
||||
import { useUsageStore } from '@/stores/usage.store';
|
||||
|
@ -180,7 +180,7 @@ export default defineComponent({
|
|||
showAllIndustryQuestions: true,
|
||||
registerForEnterpriseTrial: false,
|
||||
modalBus: createEventBus(),
|
||||
formBus: createEventBus(),
|
||||
formBus: createFormEventBus(),
|
||||
domainBlocklist: [] as string[],
|
||||
};
|
||||
},
|
||||
|
|
|
@ -45,7 +45,7 @@ import { createFormEventBus } from 'n8n-design-system';
|
|||
|
||||
const i18n = useI18n();
|
||||
|
||||
const formBus = ref(createFormEventBus());
|
||||
const formBus = createFormEventBus();
|
||||
const readyToSubmit = ref(false);
|
||||
|
||||
const formFields: IFormInputs = [
|
||||
|
@ -69,7 +69,7 @@ function onSubmit(values: { mfaCode: string }) {
|
|||
}
|
||||
|
||||
function onClickSave() {
|
||||
formBus.value.emit('submit');
|
||||
formBus.emit('submit');
|
||||
}
|
||||
|
||||
function onFormReady(isReady: boolean) {
|
||||
|
|
|
@ -157,7 +157,7 @@ import { mapStores } from 'pinia';
|
|||
import { useUsersStore } from '@/stores/users.store';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { createEventBus } from 'n8n-design-system/utils';
|
||||
import { createFormEventBus } from 'n8n-design-system/utils';
|
||||
import type { TableColumnCtx } from 'element-plus';
|
||||
|
||||
type TableRow = {
|
||||
|
@ -222,7 +222,7 @@ export default defineComponent({
|
|||
loadingTable: false,
|
||||
hasAnyChanges: false,
|
||||
formInputs: null as null | IFormInputs,
|
||||
formBus: createEventBus(),
|
||||
formBus: createFormEventBus(),
|
||||
readyToSubmit: false,
|
||||
page: 0,
|
||||
loginEnabled: false,
|
||||
|
|
|
@ -21,7 +21,7 @@ const { showToast, showError } = useToast();
|
|||
|
||||
const hasAnyBasicInfoChanges = ref<boolean>(false);
|
||||
const formInputs = ref<null | IFormInputs>(null);
|
||||
const formBus = ref(createFormEventBus());
|
||||
const formBus = createFormEventBus();
|
||||
const readyToSubmit = ref(false);
|
||||
const currentSelectedTheme = ref(useUIStore().theme);
|
||||
const themeOptions = ref<Array<{ name: ThemeOption; label: string }>>([
|
||||
|
@ -151,7 +151,7 @@ async function updatePersonalisationSettings() {
|
|||
uiStore.setTheme(currentSelectedTheme.value);
|
||||
}
|
||||
function onSaveClick() {
|
||||
formBus.value.emit('submit');
|
||||
formBus.emit('submit');
|
||||
}
|
||||
function openPasswordModal() {
|
||||
uiStore.openModal(CHANGE_PASSWORD_MODAL_KEY);
|
||||
|
|
Loading…
Reference in a new issue