From f4052fbb7d907c46110b0f8a358ee3d6f8abc9d1 Mon Sep 17 00:00:00 2001 From: rene Date: Sun, 3 May 2026 11:09:14 +0200 Subject: [PATCH] Feature: Welten-Labels klickbar (JETZT|HUND|WELT), aktives Label hervorgehoben, Desktop-Tab-Optik, SW by-v651 --- backend/static/css/components.css | 11 ++++++++++- backend/static/index.html | 8 ++++---- backend/static/js/app.js | 2 +- backend/static/js/worlds.js | 9 +++++++++ backend/static/sw.js | 2 +- 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/backend/static/css/components.css b/backend/static/css/components.css index fa7f4e7..27cf0d9 100644 --- a/backend/static/css/components.css +++ b/backend/static/css/components.css @@ -7592,9 +7592,18 @@ svg.empty-state-icon { font-size: 9px; font-weight: 800; letter-spacing: 0.12em; - color: var(--c-text-secondary); + color: white; opacity: 0.4; text-transform: uppercase; + transition: opacity 0.18s; +} +.wlabel.active { opacity: 1; } + +@media (min-width: 768px) { + #world-labels { gap: 48px; font-size: 11px; } + .wlabel { opacity: 0.5; padding: 4px 10px; border-radius: 8px; } + .wlabel:hover { opacity: 0.8; background: rgba(255,255,255,0.08); } + .wlabel.active { opacity: 1; background: rgba(255,255,255,0.12); } } /* Settings-Button */ diff --git a/backend/static/index.html b/backend/static/index.html index 5e77ed9..cb75a8f 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 003f1b5..5c94475 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 = '650'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '651'; // ← 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 0f404ef..0fc7723 100644 --- a/backend/static/js/worlds.js +++ b/backend/static/js/worlds.js @@ -145,6 +145,7 @@ window.Worlds = (() => { function _updateDots() { document.querySelectorAll('.wdot').forEach((d, i) => d.classList.toggle('active', i === _cur)); + document.querySelectorAll('.wlabel').forEach((l, i) => l.classList.toggle('active', i === _cur)); } function _updateFab() { @@ -167,6 +168,14 @@ window.Worlds = (() => { if (i === 2 && !_weltInited) { _weltInited = true; _renderWelt(); } }); }); + document.querySelectorAll('.wlabel').forEach((lbl, i) => { + lbl.style.pointerEvents = 'auto'; + lbl.style.cursor = 'pointer'; + lbl.addEventListener('click', () => { + _goTo(i, true); + if (i === 2 && !_weltInited) { _weltInited = true; _renderWelt(); } + }); + }); } function _openFab() { diff --git a/backend/static/sw.js b/backend/static/sw.js index 7cb83fc..e786916 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-v650'; +const CACHE_VERSION = 'by-v651'; 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