Skip to content

Commit

Permalink
fix: Toast not aligned to the bottom when AI assistant disable (#11549)
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoE105 authored Nov 5, 2024
1 parent 38da319 commit e80f7e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/editor-ui/src/composables/useToast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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<Omit<NotificationOptions, 'message'>> = {
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',
};
Expand Down

0 comments on commit e80f7e0

Please sign in to comment.