mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 10:22:11 +01:00 
			
		
		
		
	Notifications use the PNG logo
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
		@@ -18,10 +18,10 @@ let selected_channel_id = null
 | 
			
		||||
 * @return Notification
 | 
			
		||||
 */
 | 
			
		||||
function showNotification(title, body, timeout = 5000) {
 | 
			
		||||
    let notif = new Notification(title, {'body': body, 'icon': "/static/tfjm.svg"})
 | 
			
		||||
    if (timeout)
 | 
			
		||||
        setTimeout(() => notif.close(), timeout)
 | 
			
		||||
    return notif
 | 
			
		||||
    Notification.requestPermission().then((status) => {
 | 
			
		||||
        if (status === 'granted')
 | 
			
		||||
            new Notification(title, {'body': body, 'icon': "/static/tfjm-192.png"})
 | 
			
		||||
    })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function selectChannel(channel_id) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user