diff --git a/backend/static/css/components.css b/backend/static/css/components.css index 9415702..fa7f4e7 100644 --- a/backend/static/css/components.css +++ b/backend/static/css/components.css @@ -7805,6 +7805,48 @@ svg.empty-state-icon { padding: 4px 2px 0; } +/* JETZT-Chip-Reihe: Streak | Gassirunde | Übung */ +.wj-chip-row { + display: flex; + gap: 8px; +} +.wj-chip { + flex: 1; + min-width: 0; + background: rgba(0, 0, 0, 0.32); + backdrop-filter: blur(12px); + -webkit-backdrop-filter: blur(12px); + border-radius: 14px; + padding: 10px 6px 9px; + display: flex; + flex-direction: column; + align-items: center; + gap: 4px; + cursor: pointer; + -webkit-tap-highlight-color: transparent; + transition: background 0.12s; +} +.wj-chip:active { background: rgba(0, 0, 0, 0.52); } +.wj-chip-label { + font-size: 8px; + font-weight: 700; + letter-spacing: .08em; + text-transform: uppercase; + color: rgba(255, 255, 255, 0.45); + line-height: 1; +} +.wj-chip-val { + font-size: 10px; + font-weight: 700; + color: white; + line-height: 1.25; + text-align: center; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 100%; +} + /* Footer-Links (Impressum / Die 100 / Datenschutz) */ .world-footer-links { text-align: center; diff --git a/backend/static/index.html b/backend/static/index.html index 9c8b3ae..5e77ed9 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -93,9 +93,9 @@ - - - + + + @@ -565,7 +565,7 @@ - + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 605d4cf..003f1b5 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 = '649'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '650'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.2.1'; // ← semantische Version, wird bei make release gesetzt const IS_STAGING = location.hostname === 'staging.banyaro.app'; diff --git a/backend/static/js/worlds.js b/backend/static/js/worlds.js index 9ef2e6a..0f404ef 100644 --- a/backend/static/js/worlds.js +++ b/backend/static/js/worlds.js @@ -647,25 +647,18 @@ window.Worlds = (() => { ? `${Math.round(w.temp_c)}° ${_esc(w.desc?.split(' ')[0] || '')} · ${Math.round(w.wind_kmh || 0)} km/h · ${w.precip_prob || 0}% Regen` : ''; - // Streak-Reminder - let streakHtml = ''; + // Streak für 3er-Chip-Zeile + let streakVal = '—', streakCol = 'rgba(255,255,255,0.4)'; if (user && dog) { try { const sr = await _cachedGet(`streak_${dog.id}`, `/streak/${dog.id}`); const s = sr.data; const streak = s?.current_streak || 0; const trainedToday = s?.last_training_date === new Date().toISOString().slice(0,10); - const col = trainedToday ? 'rgba(16,185,129,0.8)' : (streak > 0 ? 'rgba(245,158,11,0.8)' : 'rgba(255,255,255,0.4)'); - const label = streak > 0 - ? (trainedToday ? `✓ ${streak} Tage Streak` : `🔥 ${streak} Tage — heute noch trainieren!`) - : (trainedToday ? '✓ Heute trainiert' : 'Noch kein Training heute'); - streakHtml = ` -
- - - - ${label} -
`; + streakCol = trainedToday ? '#10B981' : (streak > 0 ? '#F59E0B' : 'rgba(255,255,255,0.4)'); + streakVal = streak > 0 + ? (trainedToday ? `✓ ${streak} Tage` : `🔥 ${streak} Tage`) + : (trainedToday ? '✓ Heute' : 'Heute starten'); } catch {} } @@ -716,32 +709,25 @@ window.Worlds = (() => { ${alertHtml} - ${streakHtml} ${user && dog ? ` -
-
- - -
-
Gassirunde
-
Berechne…
-
- - -
-
- +
+
+ -
-
Übung des Tages
-
Lade…
-
- - + Streak + ${streakVal} +
+
+ + + Gassirunde + +
+
+ + + Übung +
` : ''}
diff --git a/backend/static/sw.js b/backend/static/sw.js index d18bcc4..7cb83fc 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -3,7 +3,7 @@ Offline-Cache + Push Notifications + Tile-Cache ============================================================ */ -const CACHE_VERSION = 'by-v649'; +const CACHE_VERSION = 'by-v650'; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache