From 8bbfc49a96947878eaf56980e7b9af04b03fa862 Mon Sep 17 00:00:00 2001 From: JJ-8 <34778827+JJ-8@users.noreply.github.com> Date: Mon, 5 Dec 2022 10:43:56 +0100 Subject: [PATCH] Make success notifications dismissible Success notifications are blocking the dropdown in the upper right corner, but there is no way to dismiss them. Now it is possible to dismiss them, just like the error notifications. --- front/src/ctfnote/ui.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/front/src/ctfnote/ui.ts b/front/src/ctfnote/ui.ts index 856fdf88a..75638cfb7 100644 --- a/front/src/ctfnote/ui.ts +++ b/front/src/ctfnote/ui.ts @@ -27,6 +27,7 @@ export function useNotify() { position: 'top-right', color: 'positive', timeout: 2500, + actions: [{ icon: 'close', color: 'white', dense: true, round: true }], ...opts, }); return true; @@ -36,7 +37,7 @@ export function useNotify() { $q.notify({ position: 'top', color: 'negative', - actions: [{ icon: 'close', color: 'white', dense: true }], + actions: [{ icon: 'close', color: 'white', dense: true, round: true }], icon: 'error', timeout: 2500, message, @@ -66,7 +67,7 @@ export function useNotify() { try { new Notification(opts.message, { icon: `${document.location.origin}/favicon.ico`, - }); + }); return; } catch { disableSystemNotification();