Fix: Landing-Page — Sitting kostenlos, Phosphor-Icons, KI-Datenschutz korrekt, Pro-Features ausgeblendet (SW by-v753)

This commit is contained in:
rene 2026-05-07 17:05:56 +02:00
parent cf2191efeb
commit 1fe878924a
5 changed files with 22 additions and 39 deletions

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung.
============================================================ */
const APP_VER = '752'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VER = '753'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VERSION = '1.5.0'; // ← semantische Version, wird bei make release gesetzt
const IS_STAGING = location.hostname === 'staging.banyaro.app';
@ -555,20 +555,15 @@ const App = (() => {
}
async function _checkNearbyAlerts() {
const nav = document.getElementById('bottom-nav');
if (!nav) return;
try {
const pos = await new Promise((resolve, reject) =>
navigator.geolocation.getCurrentPosition(resolve, reject, { timeout: 5000, maximumAge: 120_000 })
);
const { latitude: lat, longitude: lon } = pos.coords;
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);
await API.get(`/alerts?lat=${lat}&lon=${lon}`);
// Standort-Update für Push-Subscriptions (serverseitig in /alerts gespeichert)
} catch {
// Kein Standort verfügbar — kein Alert anzeigen
// Kein Standort verfügbar — ignorieren
}
}