Skip to content

Node.js based forum software built for the modern web

simple toaster popup on new notification

psychobunny5ab1758d28d7
diff --git a/public/src/forum/footer.js b/public/src/forum/footer.js
index a40670d4e8..762562978d 100644
--- a/public/src/forum/footer.js
+++ b/public/src/forum/footer.js
@@ -140,6 +140,12 @@
});
socket.on('event:new_notification', function() {
document.querySelector('.notifications a i').className = 'icon-circle active';
+ app.alert({
+ title: 'New notification',
+ message: 'You have unread notifications.',
+ type: 'notify',
+ timeout: 2000
+ });
utils.refreshTitle();
});