Notifications use the PNG logo
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
b86dfe7351
commit
bfd1a76a2d
|
@ -18,10 +18,10 @@ let selected_channel_id = null
|
||||||
* @return Notification
|
* @return Notification
|
||||||
*/
|
*/
|
||||||
function showNotification(title, body, timeout = 5000) {
|
function showNotification(title, body, timeout = 5000) {
|
||||||
let notif = new Notification(title, {'body': body, 'icon': "/static/tfjm.svg"})
|
Notification.requestPermission().then((status) => {
|
||||||
if (timeout)
|
if (status === 'granted')
|
||||||
setTimeout(() => notif.close(), timeout)
|
new Notification(title, {'body': body, 'icon': "/static/tfjm-192.png"})
|
||||||
return notif
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectChannel(channel_id) {
|
function selectChannel(channel_id) {
|
||||||
|
|
Loading…
Reference in New Issue