From cce2f9fbb0215a2c46b45b22850d84ce190b81ac Mon Sep 17 00:00:00 2001 From: nessi Date: Thu, 13 Aug 2026 16:43:30 +0200 Subject: [PATCH] feat: add decorative icons to dashboard metrics with color-coded backgrounds for CPU, RAM, and disk usage indicators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add ::before pseudo-elements with inline-grid centering to meter and disk-name elements. Style CPU meter with blue circular icon (◔), RAM meter with purple stacked icon (▤), and disk labels with yellow bar icon (▰). Each icon has matching semi-transparent background and colored text. Update dashboard view display to flex and align icon containers. --- templates/index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index 8feb740..9bc6f68 100644 --- a/templates/index.html +++ b/templates/index.html @@ -36,7 +36,10 @@ document.querySelectorAll('.nav button').forEach(b=>b.onclick=()=>{document.quer function statusText(s){if(s.state==='running')return `Scan: ${s.done}/${s.total||'?'} Dateien`;if(s.state==='done')return 'Scan abgeschlossen';if(s.state==='error')return 'Scanfehler: '+s.error;return 'Scan wird vorbereitet …'} const seenRunning={radarr:false,sonarr:false};async function poll(){try{const data=await (await fetch('/api/scan-status')).json();document.querySelector('#radarrStatus').textContent=statusText(data.radarr);const sonarr=document.querySelector('#sonarrStatus');if(sonarr)sonarr.textContent=statusText(data.sonarr);['radarr','sonarr'].forEach(source=>{if(data[source].state==='running')seenRunning[source]=true;if(seenRunning[source]&&['done','error'].includes(data[source].state)){seenRunning[source]=false;setTimeout(()=>location.reload(),700)}})}catch(e){} };setInterval(poll,1200);poll(); document.querySelector('#rescan').onclick=async()=>{const b=document.querySelector('#rescan');b.disabled=true;b.textContent='Scanne …';await fetch('/api/rescan?source='+(b.dataset.source||'radarr'),{method:'POST'});b.disabled=false;b.textContent='↻ Neu scannen';poll()}; - + +