feat: add collapsible series styling and auto-collapse on load

Add CSS styling for series details elements with border, rounded corners, and dark background. Initialize all series as collapsed by default on page load to improve UI organization for large series lists.
This commit is contained in:
2026-08-13 10:57:24 +02:00
parent acbf3215bb
commit c43f938afe
+5
View File
@@ -25,3 +25,8 @@ function statusText(s){if(s.state==='running')return `Scan: ${s.done}/${s.total|
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()};
</script></body></html>
<style>
details.series{margin-bottom:8px;border:1px solid var(--line);border-radius:6px;overflow:hidden;background:#222}
details.series:last-child{margin-bottom:0}
</style>
<script>document.querySelectorAll('details.series').forEach(series => { series.open = false; });</script>