From c59de1fcf9e3de091b2d44e68d2556f6a00ad96f Mon Sep 17 00:00:00 2001 From: Aetherinox Date: Mon, 23 Jun 2025 02:51:35 -0700 Subject: [PATCH] feat: notifications fade out after first health check --- tvapp2/www/index.html | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tvapp2/www/index.html b/tvapp2/www/index.html index 3b8da4a9..d30443aa 100644 --- a/tvapp2/www/index.html +++ b/tvapp2/www/index.html @@ -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'; + }); } },