Skip to content

Commit b91b989

Browse files
JJ-8XeR
authored andcommitted
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.
1 parent 34b3045 commit b91b989

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

front/src/ctfnote/ui.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export function useNotify() {
2727
position: 'top-right',
2828
color: 'positive',
2929
timeout: 2500,
30+
actions: [{ icon: 'close', color: 'white', dense: true, round: true }],
3031
...opts,
3132
});
3233
return true;
@@ -36,7 +37,7 @@ export function useNotify() {
3637
$q.notify({
3738
position: 'top',
3839
color: 'negative',
39-
actions: [{ icon: 'close', color: 'white', dense: true }],
40+
actions: [{ icon: 'close', color: 'white', dense: true, round: true }],
4041
icon: 'error',
4142
timeout: 2500,
4243
message,
@@ -66,7 +67,7 @@ export function useNotify() {
6667
try {
6768
new Notification(opts.message, {
6869
icon: `${document.location.origin}/favicon.ico`,
69-
});
70+
});
7071
return;
7172
} catch {
7273
disableSystemNotification();

0 commit comments

Comments
 (0)