Sprint 11: Freunde & Chat + Phosphor-Icon-Vollmigration

- Freundschaften (pending/accepted), Nutzersuche, Anfragen per Push
- Direktnachrichten mit Polling, iMessage-Stil, Deep-Links aus Push
- Alle Seiten (map, places, diary, health, dog-profile, sitting, knigge,
  forum, wiki, walks) vollständig auf Phosphor-Icons migriert
- Wikidata-Rassen-Scraper (~833 neue Rassen, lokal gespiegelte Fotos)
- TheDogAPI lokal gespiegelt (169 Rassen + Fotos)
- Quiz-Result-Cards horizontal (korrekte Bildproportionen)
- SW by-v89
This commit is contained in:
rene 2026-04-15 21:33:53 +02:00
parent 96bd57f0ad
commit 097295c628
44 changed files with 9980 additions and 300 deletions

View file

@ -3,7 +3,7 @@
Offline-Cache + Push Notifications + Tile-Cache
============================================================ */
const CACHE_VERSION = 'by-v62';
const CACHE_VERSION = 'by-v89';
const CACHE_STATIC = `${CACHE_VERSION}-static`;
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
@ -12,6 +12,7 @@ const STATIC_ASSETS = [
'/css/design-system.css',
'/css/layout.css',
'/css/components.css',
'/icons/phosphor.svg',
'/js/api.js',
'/js/ui.js',
'/js/app.js',
@ -192,6 +193,22 @@ self.addEventListener('push', event => {
requireInteraction: data.requireInteraction || false,
};
// Chat-Nachricht
if (data.type === 'chat_message') {
options.tag = data.tag || `chat-${data.data?.conversation_id}`;
options.renotify = true;
options.actions = [
{ action: 'reply', title: 'Antworten' },
{ action: 'dismiss', title: 'Schließen' },
];
}
// Freundschaftsanfrage
if (data.type === 'friend_request') {
options.tag = 'friend-request';
options.actions = [{ action: 'view', title: 'Anzeigen' }];
}
// Giftköder-Alarm: besondere Darstellung
if (data.type === 'poison_alert') {
options.tag = 'poison-alert';
@ -219,9 +236,10 @@ self.addEventListener('notificationclick', event => {
let url = '/';
if (action === 'view' || data?.page) {
if (action === 'view' || action === 'reply' || data?.page) {
url = `/#${data.page || 'poison'}`;
if (data.id) url += `?id=${data.id}`;
if (data.conversation_id) url += `?conversation_id=${data.conversation_id}`;
else if (data.id) url += `?id=${data.id}`;
}
event.waitUntil(