diff --git a/webapp/packages/core-events/src/INotification.ts b/webapp/packages/core-events/src/INotification.ts index b25bf6ac7f..12d4e8b5ce 100644 --- a/webapp/packages/core-events/src/INotification.ts +++ b/webapp/packages/core-events/src/INotification.ts @@ -54,6 +54,7 @@ export interface INotification = INo message?: string; timestamp: number; details?: string | Error | null; + autoClose?: boolean; persistent?: boolean; state: { deleteDelay: number }; isSilent: boolean; @@ -69,6 +70,7 @@ export interface INotificationOptions; - constructor(private commonDialogService: CommonDialogService) { + constructor(private readonly commonDialogService: CommonDialogService) { makeObservable(this, { isDetailsDialogOpen: observable, }); @@ -35,7 +35,11 @@ export class NotificationItemController implements IInitializableController { this.handleShowDetails = this.showDetails.bind(this); } - if (notification.type !== ENotificationType.Error && !notification.persistent) { + if ( + notification.type !== ENotificationType.Error + && !notification.persistent + && notification.autoClose !== false + ) { this.closeAfter = FadeTimeout; } } diff --git a/webapp/packages/plugin-sql-editor-navigation-tab-resource/src/PluginBootstrap.ts b/webapp/packages/plugin-sql-editor-navigation-tab-resource/src/PluginBootstrap.ts index ad452d3422..faa055529a 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab-resource/src/PluginBootstrap.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab-resource/src/PluginBootstrap.ts @@ -204,7 +204,7 @@ export class PluginBootstrap extends Bootstrap { this.notificationService.logInfo({ title: 'sql_editor_upload_script_max_size_title', message: `Max size: ${maxSize}KB\nFile size: ${size}KB`, - persistent: true, + autoClose: false, }); return; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/useTools.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditor/useTools.tsx index 9640f2b9a4..0c4b6f8c61 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/useTools.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/useTools.tsx @@ -82,6 +82,7 @@ export function useTools(state: ISqlEditorTabState): Readonly { this.notificationService.logInfo({ title: 'sql_editor_upload_script_max_size_title', message: `Max size: ${maxSize}KB\nFile size: ${size}KB`, + autoClose: false, }); return false;