From e2219fb8ba600f809beef03973683b876a53eccd Mon Sep 17 00:00:00 2001 From: rene Date: Thu, 18 Jun 2026 20:46:23 +0200 Subject: [PATCH] =?UTF-8?q?Admin-Panel:=20gro=C3=9Fe=20Stat-Zahlen=20passe?= =?UTF-8?q?n=20jetzt=20in=20die=20Chips=20(v1304)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stat-Zahlen wurden bei vielen Stellen (z.B. OSM-Marker '3.063.735') durch .card overflow:hidden abgeschnitten. _statCard() staffelt die Schriftgröße jetzt nach Zeichenlänge (>=9 -> text-lg, >=7 -> text-xl, sonst text-2xl) via neue .adm-stat-num-Klassen; white-space:nowrap gegen Umbruch. Volle Praezision bleibt erhalten. Nebenbei verwaisten LOST-DOG-Kommentar geschlossen. --- VERSION | 2 +- backend/static/css/components.css | 14 ++++++++++++++ backend/static/index.html | 26 +++++++++++++------------- backend/static/js/app.js | 2 +- backend/static/js/pages/admin.js | 10 +++++++--- backend/static/landing.html | 2 +- backend/static/sw.js | 2 +- 7 files changed, 38 insertions(+), 20 deletions(-) diff --git a/VERSION b/VERSION index 61a4199..b9f7ba3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1303 \ No newline at end of file +1304 \ No newline at end of file diff --git a/backend/static/css/components.css b/backend/static/css/components.css index f3e34e7..6f37a3e 100644 --- a/backend/static/css/components.css +++ b/backend/static/css/components.css @@ -6707,6 +6707,20 @@ html.modal-open { @media (min-width: 768px) { .adm-stats-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } } +/* Stat-Zahl in den Chips — Größe nach Zeichenlänge staffeln, damit auch + große Zahlen (z.B. "3.063.735") in die Karte passen statt abgeschnitten + zu werden. Klassen werden in _statCard() je nach Länge gesetzt. */ +.adm-stat-num { + font-size: var(--text-2xl); + font-weight: var(--weight-bold); + color: var(--c-text); + line-height: 1.15; + white-space: nowrap; +} +.adm-stat-num--sm { font-size: var(--text-xl); } /* 7–8 Zeichen, z.B. "139.0 MB" */ +.adm-stat-num--xs { font-size: var(--text-lg); } /* 9+ Zeichen, z.B. "3.063.735" */ + +/* ============================================================ LOST DOG ============================================================ */ diff --git a/backend/static/index.html b/backend/static/index.html index 5a9d95f..34168f4 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -86,14 +86,14 @@ Ban Yaro - + - - - - - + + + + + @@ -624,12 +624,12 @@ - - - - - - + + + + + + @@ -639,7 +639,7 @@ - + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 4cbbfb9..aa38bcc 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -3,7 +3,7 @@ Router, State-Management, Navigation, Initialisierung. ============================================================ */ -const APP_VER = '1303'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '1304'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.6.0'; // ← semantische Version, wird bei make release gesetzt window.APP_VER = APP_VER; // global verfügbar für andere Module (z.B. offline-indicator) window.APP_VERSION = APP_VERSION; diff --git a/backend/static/js/pages/admin.js b/backend/static/js/pages/admin.js index ae8d0db..463c230 100644 --- a/backend/static/js/pages/admin.js +++ b/backend/static/js/pages/admin.js @@ -767,15 +767,19 @@ window.Page_admin = (() => { function _statCard(icon, label, value, color, tab = null) { const clickable = tab ? `data-adm-tab="${tab}" style="padding:var(--space-4);text-align:center;cursor:pointer"` : `style="padding:var(--space-4);text-align:center"`; + // Lange Zahlen (z.B. "3.063.735") sprengen sonst die Chip-Breite und werden + // durch overflow:hidden abgeschnitten → Schriftgröße nach Länge staffeln. + const txt = (value ?? '—') + ''; + const sizeCls = txt.length >= 9 ? ' adm-stat-num--xs' + : txt.length >= 7 ? ' adm-stat-num--sm' + : ''; return `
-
- ${value ?? '—'} -
+
${value ?? '—'}
${label}
`; diff --git a/backend/static/landing.html b/backend/static/landing.html index f190627..92c19ef 100644 --- a/backend/static/landing.html +++ b/backend/static/landing.html @@ -4,7 +4,7 @@ - + Ban Yaro — Die Hunde-App für Deutschland, Österreich & Schweiz diff --git a/backend/static/sw.js b/backend/static/sw.js index 30f9606..c398305 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -4,7 +4,7 @@ ============================================================ */ // ← EINZIGE Stelle für die Version — STATIC_ASSETS und CACHE_VERSION leiten sich ab -const VER = '1303'; +const VER = '1304'; const CACHE_VERSION = `by-v${VER}`; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten