From e80f7e0a02a972379f73af6a44de11768081086e Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Tue, 5 Nov 2024 06:52:52 -0500 Subject: [PATCH] fix: Toast not aligned to the bottom when AI assistant disable (#11549) --- packages/editor-ui/src/composables/useToast.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/composables/useToast.ts b/packages/editor-ui/src/composables/useToast.ts index 7d07cdf249294..04bf24700c0b2 100644 --- a/packages/editor-ui/src/composables/useToast.ts +++ b/packages/editor-ui/src/composables/useToast.ts @@ -10,6 +10,7 @@ import { useExternalHooks } from './useExternalHooks'; import { VIEWS } from '@/constants'; import type { ApplicationError } from 'n8n-workflow'; import { useStyles } from './useStyles'; +import { useSettingsStore } from '@/stores/settings.store'; export interface NotificationErrorWithNodeAndDescription extends ApplicationError { node: { @@ -26,13 +27,14 @@ export function useToast() { const uiStore = useUIStore(); const externalHooks = useExternalHooks(); const i18n = useI18n(); + const settingsStore = useSettingsStore(); const { APP_Z_INDEXES } = useStyles(); const messageDefaults: Partial> = { dangerouslyUseHTMLString: false, position: 'bottom-right', zIndex: APP_Z_INDEXES.TOASTS, // above NDV and modal overlays - offset: 64, + offset: settingsStore.isAiAssistantEnabled ? 64 : 0, appendTo: '#app-grid', customClass: 'content-toast', };