Navigation, Karten-FABs, Nearby-Alerts
- Bottom-Nav neu: Karte | Routen | + | Tagebuch | Forum - + reduziert auf: Giftköder, Gassi-Treffen, Verlorener Hund - Notification-Badge auf User-Avatar (Header) - Nearby-Alerts: Nav-Leiste pulsiert rot/orange bei Giftköder/vermisstm Hund in 20km - SW postMessage bei poison/lost_alert → sofortiger Alert-Check - Karten-FABs: nur Marker setzen + Standort (Route aufzeichnen + Offline entfernt) - SW by-v272, APP_VER 262
This commit is contained in:
parent
5141ba9969
commit
65d1cf6c7f
7 changed files with 105 additions and 27 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Offline-Cache + Push Notifications + Tile-Cache
|
||||
============================================================ */
|
||||
|
||||
const CACHE_VERSION = 'by-v271';
|
||||
const CACHE_VERSION = 'by-v272';
|
||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
||||
|
||||
|
|
@ -223,6 +223,13 @@ self.addEventListener('push', event => {
|
|||
event.waitUntil(
|
||||
self.registration.showNotification(data.title || 'Ban Yaro', options)
|
||||
);
|
||||
|
||||
// App informieren damit sie Nearby-Alerts neu prüft
|
||||
if (data.type === 'poison_alert' || data.type === 'lost_dog_alert') {
|
||||
self.clients.matchAll({ type: 'window' }).then(clients => {
|
||||
clients.forEach(c => c.postMessage({ type: 'CHECK_NEARBY_ALERTS' }));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// ----------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue