diff --git a/dashboard/src/components/Headerbar.vue b/dashboard/src/components/Headerbar.vue index f5d7c2bbe..d253626a4 100644 --- a/dashboard/src/components/Headerbar.vue +++ b/dashboard/src/components/Headerbar.vue @@ -44,6 +44,9 @@ async function onMarkNotificationRead(notification) { if (error) return console.error(error); await refresh(); + + // close after 2 seconds if there is nothing to show + if (notifications.value.length === 0) setTimeout(notificationPopover.value.close, 2000); } async function onMarkAllNotificationRead() { @@ -59,7 +62,7 @@ async function onMarkAllNotificationRead() { notificationsAllBusy.value = false; - if (notifications.value.length === 0) setTimeout(helpPopover.value.close, 2000); + if (notifications.value.length === 0) setTimeout(notificationPopover.value.close, 2000); } async function refresh() {