UX: Mehr Offline-Seiten precachen + nur Strich grün, SW by-v1085

PRIORITY_PAGES erweitert auf 10 Seiten (war 8): zusätzlich
health.js, notes.js, expenses.js. admin.js raus — 233 KB, offline
irrelevant. Damit funktionieren offline ohne vorherigen Besuch:
Tagebuch · Gesundheit · Karte · Gassi · Erste Hilfe · Notizblock
Ausgaben · Routen · Giftköder · Vermisst.

Offline-Indikator Step 2 prüft jetzt alle 7 vom User genannten
Seiten (diary, map, walks, erste-hilfe, notes, expenses, routes) —
Pfote wird grün wenn alle im Static-Cache sind.

CSS-Färbung umgestellt: nur stroke (Linie) wird grün, kein fill
mehr. Pfote behält ihre offene Optik, nur die Outlines wechseln
von weiß zu Grün.
This commit is contained in:
rene 2026-05-26 15:14:07 +02:00
parent 95dccd03be
commit 94f02dbe3a
6 changed files with 22 additions and 20 deletions

View file

@ -31,11 +31,11 @@ window.OfflineIndicator = (() => {
} },
{ step: 2, title: 'Wichtige Seiten',
detail: 'Tagebuch, Karte, Gassi, Erste Hilfe',
detail: 'Tagebuch, Karte, Gassi, Erste Hilfe, Notizblock, Ausgaben, Routen',
probe: async () => {
const c = await _staticCache();
if (!c) return false;
const must = ['diary.js','map.js','walks.js','erste-hilfe.js'];
const must = ['diary.js','map.js','walks.js','erste-hilfe.js','notes.js','expenses.js','routes.js'];
const urls = (await c.keys()).map(r => r.url);
return must.every(name => urls.some(u => u.includes('/js/pages/' + name)));
} },
@ -141,7 +141,7 @@ window.OfflineIndicator = (() => {
const tasks = [];
for (const m of missing) {
if (m.step === 2) {
['diary.js','map.js','walks.js','erste-hilfe.js'].forEach(p =>
['diary.js','map.js','walks.js','erste-hilfe.js','notes.js','expenses.js','routes.js'].forEach(p =>
tasks.push(fetch(`/js/pages/${p}?v=${window.APP_VER}`).catch(() => {})));
} else if (m.step === 3) {
const dogId = window._appState?.activeDog?.id;