Burger-Badge via Alerts-Check, Alert-Linie stärker, Linie weg nach Erledigen, SW by-v329

This commit is contained in:
rene 2026-04-24 09:17:15 +02:00
parent fc7d743153
commit 5a755e4922
4 changed files with 14 additions and 12 deletions

View file

@ -180,18 +180,18 @@
}
@keyframes nav-alert-pulse {
0%, 100% { box-shadow: 0 -2px 12px rgba(42,31,20,0.08); }
50% { box-shadow: 0 -4px 20px var(--nav-alert-color, rgba(220,38,38,0.4)); }
0%, 100% { box-shadow: 0 -2px 8px rgba(42,31,20,0.06); }
50% { box-shadow: 0 -6px 28px var(--nav-alert-color, rgba(220,38,38,0.65)); }
}
#bottom-nav.alert-poison {
border-top: 3px solid var(--c-danger);
--nav-alert-color: rgba(220, 38, 38, 0.4);
animation: nav-alert-pulse 2s ease-in-out infinite;
border-top: 4px solid var(--c-danger);
--nav-alert-color: rgba(220, 38, 38, 0.65);
animation: nav-alert-pulse 1.6s ease-in-out infinite;
}
#bottom-nav.alert-lost {
border-top: 3px solid #f59e0b;
--nav-alert-color: rgba(245, 158, 11, 0.4);
animation: nav-alert-pulse 2s ease-in-out infinite;
border-top: 4px solid #f59e0b;
--nav-alert-color: rgba(245, 158, 11, 0.65);
animation: nav-alert-pulse 1.6s ease-in-out infinite;
}
.nav-item {

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung.
============================================================ */
const APP_VER = '316'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VER = '317'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const App = (() => {
@ -462,6 +462,8 @@ const App = (() => {
const data = await API.get(`/alerts?lat=${lat}&lon=${lon}`);
nav.classList.toggle('alert-poison', !!data.poison);
nav.classList.toggle('alert-lost', !data.poison && !!data.lost);
// Burger-Badge: Giftköder/Verlorener Hund in der Nähe
document.getElementById('notif-nav-badge')?.classList.toggle('hidden', !data.poison && !data.lost);
} catch {
// Kein Standort verfügbar — kein Alert anzeigen
}
@ -471,8 +473,7 @@ const App = (() => {
if (!state.user) return;
try {
const b = await API.notifications.badge();
document.getElementById('notif-nav-badge')?.classList.toggle('hidden', !b.general);
document.getElementById('chat-nav-badge')?.classList.toggle('hidden', !b.personal);
document.getElementById('chat-nav-badge')?.classList.toggle('hidden', !b.personal);
} catch { /* ignorieren */ }
}

View file

@ -409,6 +409,7 @@ window.Page_poison = (() => {
_renderMarkers();
_renderList();
_updateBadge(_reports.length);
App.checkNearbyAlerts();
UI.modal.close();
UI.toast.success('Meldung als erledigt markiert.');
});

View file

@ -3,7 +3,7 @@
Offline-Cache + Push Notifications + Tile-Cache
============================================================ */
const CACHE_VERSION = 'by-v328';
const CACHE_VERSION = 'by-v329';
const CACHE_STATIC = `${CACHE_VERSION}-static`;
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten