From 0651dee155aa422744f52c1dec5cf8b2a7035c51 Mon Sep 17 00:00:00 2001 From: librelad Date: Sun, 12 Jul 2026 22:28:18 +0100 Subject: [PATCH] fix(webui/overview): drop zero-count stats from health hero when nothing is tracked MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With no apps tracked the sub line read '0 apps tracked · 0/0 backed up · last scan …' — pure noise. Show only the scan time in that case. Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: librelad --- .../apps/overview/js/overview-manager.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/containers/libreportal/frontend/components/apps/overview/js/overview-manager.js b/containers/libreportal/frontend/components/apps/overview/js/overview-manager.js index a2f88da..e20e46b 100644 --- a/containers/libreportal/frontend/components/apps/overview/js/overview-manager.js +++ b/containers/libreportal/frontend/components/apps/overview/js/overview-manager.js @@ -342,10 +342,16 @@ class OverviewManager { let sub; if (scanned) { const checked = u.lastChecked ? this.updater.fmtRel(u.lastChecked) : 'never'; - const bits = [`${u.apps} app${u.apps === 1 ? '' : 's'} tracked`]; - if (this.backup) bits.push(`${b.protectedLabel} backed up`); - bits.push(`last scan ${checked}`); - sub = bits.join(' · '); + if (!u.apps) { + // Nothing tracked yet — the counts ("0 apps tracked · 0/0 backed up") + // are just noise, so show only the scan time. + sub = `last scan ${checked}`; + } else { + const bits = [`${u.apps} app${u.apps === 1 ? '' : 's'} tracked`]; + if (this.backup) bits.push(`${b.protectedLabel} backed up`); + bits.push(`last scan ${checked}`); + sub = bits.join(' · '); + } } else { sub = 'The first automatic scan runs within a couple of minutes — or hit Check now.'; }