mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 13:27:31 -08:00
fix: Toast not aligned to the bottom when AI assistant disable (#11549)
This commit is contained in:
parent
38da319507
commit
e80f7e0a02
|
@ -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<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',
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue