Feature: ORS Admin-Card — Wochensumme + 30-Tage-Gesamt im Header — SW by-v491, APP_VER 468
This commit is contained in:
parent
69cbf3c599
commit
fe2e718827
3 changed files with 16 additions and 6 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
Router, State-Management, Navigation, Initialisierung.
|
Router, State-Management, Navigation, Initialisierung.
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const APP_VER = '467'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
const APP_VER = '468'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||||
|
|
||||||
const App = (() => {
|
const App = (() => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1220,6 +1220,11 @@ window.Page_admin = (() => {
|
||||||
const pct = Math.min(Math.round(count / limit * 100), 100);
|
const pct = Math.min(Math.round(count / limit * 100), 100);
|
||||||
const barColor = pct < 50 ? '#4ade80' : pct <= 80 ? '#facc15' : '#f87171';
|
const barColor = pct < 50 ? '#4ade80' : pct <= 80 ? '#facc15' : '#f87171';
|
||||||
|
|
||||||
|
// Wochensumme + Gesamtsumme aus daily_history
|
||||||
|
const hist7 = (d.daily_history || []).slice(-7);
|
||||||
|
const weekTotal = hist7.reduce((s, h) => s + (h.count ?? 0), 0);
|
||||||
|
const totalAll = (d.daily_history || []).reduce((s, h) => s + (h.count ?? 0), 0);
|
||||||
|
|
||||||
// Sparkline aus daily_history (letzte 30 Tage)
|
// Sparkline aus daily_history (letzte 30 Tage)
|
||||||
const hist = Array.isArray(d.daily_history) ? d.daily_history : [];
|
const hist = Array.isArray(d.daily_history) ? d.daily_history : [];
|
||||||
const W = 400, H = 60, padY = 5;
|
const W = 400, H = 60, padY = 5;
|
||||||
|
|
@ -1262,10 +1267,15 @@ window.Page_admin = (() => {
|
||||||
<span style="font-size:var(--text-sm);font-weight:var(--weight-semibold);color:var(--c-text);flex:1">
|
<span style="font-size:var(--text-sm);font-weight:var(--weight-semibold);color:var(--c-text);flex:1">
|
||||||
OpenRouteService
|
OpenRouteService
|
||||||
</span>
|
</span>
|
||||||
<span style="font-size:var(--text-xs);font-weight:700;padding:3px 10px;border-radius:999px;
|
<div style="display:flex;gap:var(--space-2);align-items:center;flex-wrap:wrap">
|
||||||
background:${barColor}22;color:${barColor};border:1px solid ${barColor}44">
|
<span style="font-size:var(--text-xs);font-weight:700;padding:3px 10px;border-radius:999px;
|
||||||
${count.toLocaleString('de')} / ${limit.toLocaleString('de')} heute
|
background:${barColor}22;color:${barColor};border:1px solid ${barColor}44">
|
||||||
</span>
|
${count.toLocaleString('de')} / ${limit.toLocaleString('de')} heute
|
||||||
|
</span>
|
||||||
|
<span style="font-size:var(--text-xs);color:var(--c-text-muted);white-space:nowrap">
|
||||||
|
${weekTotal} diese Woche · ${totalAll} gesamt (30 Tage)
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Fortschrittsbalken -->
|
<!-- Fortschrittsbalken -->
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Offline-Cache + Push Notifications + Tile-Cache
|
Offline-Cache + Push Notifications + Tile-Cache
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const CACHE_VERSION = 'by-v490';
|
const CACHE_VERSION = 'by-v491';
|
||||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||||
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue