diff --git a/backend/static/index.html b/backend/static/index.html index 97ba52b..5f755d4 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -93,9 +93,9 @@ - - - + + + @@ -562,7 +562,7 @@ - + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 9de544d..a7da38d 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 = '661'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '662'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.3.0'; // ← semantische Version, wird bei make release gesetzt const IS_STAGING = location.hostname === 'staging.banyaro.app'; diff --git a/backend/static/js/pages/moderation.js b/backend/static/js/pages/moderation.js index 18bdaac..031fc11 100644 --- a/backend/static/js/pages/moderation.js +++ b/backend/static/js/pages/moderation.js @@ -88,45 +88,35 @@ window.Page_moderation = (() => { // ------------------------------------------------------------------ // TAB: ÜBERSICHT // ------------------------------------------------------------------ + function _switchTab(tabId) { + _tab = tabId; + _container.querySelectorAll('#mod-tabs .by-tab').forEach(b => + b.classList.toggle('active', b.dataset.tab === _tab) + ); + _renderTab(); + } + async function _renderStats(el) { const s = await API.get('/moderation/stats'); el.innerHTML = `
- ${_statCard('warning', - 'Offene Meldungen', - s.open_reports, - s.open_reports > 0 ? 'var(--c-danger)' : 'var(--c-text-muted)')} - ${_statCard('image', - 'Fotos ausstehend', - s.pending_fotos, - s.pending_fotos > 0 ? 'var(--c-warning)' : 'var(--c-text-muted)')} - ${_statCard('skull', - 'Gesperrte User', - s.banned_users, - s.banned_users > 0 ? '#f59e0b' : 'var(--c-text-muted)')} - ${_statCard('storefront', - 'Züchter ausstehend', - s.pending_zuchter, - s.pending_zuchter > 0 ? 'var(--c-warning)' : 'var(--c-text-muted)')} - ${_statCard('clock', - 'POI-Korrekturen', - s.pending_poi_edits ?? 0, - (s.pending_poi_edits ?? 0) > 0 ? 'var(--c-warning)' : 'var(--c-text-muted)')} + ${_statCard('warning', 'Offene Meldungen', s.open_reports, s.open_reports > 0 ? 'var(--c-danger)' : 'var(--c-text-muted)', 'forum')} + ${_statCard('image', 'Fotos ausstehend', s.pending_fotos, s.pending_fotos > 0 ? 'var(--c-warning)' : 'var(--c-text-muted)', 'fotos')} + ${_statCard('skull', 'Gesperrte User', s.banned_users, s.banned_users > 0 ? '#f59e0b' : 'var(--c-text-muted)', 'user')} + ${_statCard('storefront','Züchter ausstehend',s.pending_zuchter, s.pending_zuchter > 0 ? 'var(--c-warning)' : 'var(--c-text-muted)', 'user')} + ${_statCard('clock', 'POI-Korrekturen', s.pending_poi_edits ?? 0,(s.pending_poi_edits ?? 0) > 0 ? 'var(--c-warning)' : 'var(--c-text-muted)', 'poi-edits')}
-
-

- ${UI.icon('info')} - Das Moderations-Panel zeigt dir alle ausstehenden Aufgaben auf einen Blick. - Verwende die Tabs oben für Details zu Fotos, Usern und Forum-Meldungen. -

-
`; + el.querySelectorAll('.mod-stat-card[data-tab]').forEach(card => { + card.addEventListener('click', () => _switchTab(card.dataset.tab)); + }); } - function _statCard(icon, label, value, color) { + function _statCard(icon, label, value, color, tab) { + const clickable = tab ? `data-tab="${tab}" style="padding:var(--space-4);text-align:center;cursor:pointer;transition:box-shadow .15s,transform .15s" onmouseenter="this.style.boxShadow='var(--shadow-md)';this.style.transform='translateY(-2px)'" onmouseleave="this.style.boxShadow='';this.style.transform=''"` : `style="padding:var(--space-4);text-align:center"`; return ` -
+
${label}
+ ${tab ? `
${UI.icon('arrow-right')} öffnen
` : ''}
`; } diff --git a/backend/static/sw.js b/backend/static/sw.js index 3ce0837..eb7074f 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-v661'; +const CACHE_VERSION = 'by-v662'; 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