feat: notifications fade out after first health check

This commit is contained in:
2025-06-23 02:51:35 -07:00
parent 2d24d8e379
commit c59de1fcf9

View File

@@ -263,6 +263,26 @@
});
})
/*
Helper > Get Multiple Elements by ID
*/
function getElementsById( ids )
{
const idList = ids.split(" ");
let results = [], item;
for ( let i = 0; i < idList.length; i++ )
{
item = document.getElementById( idList[ i ] );
if (item)
{
results.push( item );
}
}
return( results );
}
/*
Document Ready
*/
@@ -400,6 +420,16 @@
$('.toast #toast-title').html(`<%= appName %> is ${ status }`);
$('.toast #toast-message').html(`Health check returned ${ status } (${ code })`);
$('#tvapp2Toast').toast('show');
const elementsList = document.querySelectorAll( '#ntfy-firewall, #ntfy-localhost, #ntfy-restart' );
const elementsArray = [...elementsList];
elementsArray.forEach(element =>
{
element.style.transition = '1s';
element.style.opacity = '0';
element.style.visibility = 'hidden';
});
}
},