From a2157571920600ea3778eeea3e4d18eebf7ead73 Mon Sep 17 00:00:00 2001 From: LeoTiTo Date: Thu, 22 May 2025 17:31:00 +0200 Subject: [PATCH 1/2] fix: correct notification duration from 50000 to 5000 milliseconds --- stores/notification.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stores/notification.ts b/stores/notification.ts index c3a0f96..da62886 100644 --- a/stores/notification.ts +++ b/stores/notification.ts @@ -7,7 +7,7 @@ import { useColor } from "./color"; const getNotyf = (): Notyf => { if ((window as any).notyf === undefined) { (window as any).notyf = new Notyf({ - duration: 50000, + duration: 5000, dismissible: true, position: { x: "right", From 3cb16c06ad4a8ed13e5459af4735545c7a0aeace Mon Sep 17 00:00:00 2001 From: LeoTiTo Date: Mon, 26 May 2025 17:30:56 +0200 Subject: [PATCH 2/2] fix: ensure default notification duration is set to 5000 milliseconds if not specified --- stores/notification.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stores/notification.ts b/stores/notification.ts index da62886..077efd5 100644 --- a/stores/notification.ts +++ b/stores/notification.ts @@ -56,6 +56,11 @@ export const useNotification = createGlobalState(() => { payloadValue = { message: payloadValue }; } + // Set default duration if not specified + if (payloadValue.duration === undefined) { + payloadValue.duration = 5000; + } + // payloadValue.type = type; payloadValue.className = `notyf__toast--${type}`; payloadValue.background = colors[type].value;