Offline-Karten Runde 5: Geraetetest-Feedback (Indikator, Flugmodus-Signal, Ent-Funklochen, Warnungs-Aktualitaet, Routen-Start-Check)
- Indikator links unter die Zoom-Regler (rechts verdeckte Legenden-Chips) - Flugmodus bei offener App -> Position raw als Funkloch-Zone (offline-Event) - Ent-Funklochen: Zonen-Liste im Offline-Modal mit X (removeDeadZone) - Warnungs-Aktualitaet: _mergeStore Bbox-Replace (aufgehobene Giftkoeder/ gefundene Hunde verschwinden; Fetch-Kreis deckt Bbox via sqrt2 ab; fresh=null merged nie) + 24h-Refresh im 50km-Umkreis beim Start - Routen offline nutzbar halten: ensureRouteCorridors beim Start-Check (Stichproben-Verify, Re-Download aus preview_track, Region-Dedupe) - Stub-Tests ins Repo: tests/js/ (r1/r3/r4/r5, alle gruen) Bump v1231
This commit is contained in:
parent
53bc27faa3
commit
6c313aca05
15 changed files with 606 additions and 52 deletions
|
|
@ -2276,11 +2276,30 @@ window.Page_map = (() => {
|
|||
</p>
|
||||
${regions.length ? `<button class="btn btn-secondary" id="off-clear" style="color:var(--c-danger)">${UI.icon('trash')} Alles löschen</button>` : ''}
|
||||
</div>
|
||||
${(s.deadzones || []).length ? `
|
||||
<div style="margin-top:var(--space-3)">
|
||||
<div style="font-size:var(--text-xs);font-weight:600;color:var(--c-text-secondary);margin-bottom:2px">
|
||||
Funkloch-Gebiete (${s.deadzones.length}) — werden automatisch aktuell gehalten</div>
|
||||
${s.deadzones.map(z => `
|
||||
<div class="off-zone-row" style="display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:var(--text-xs);padding:4px 0;border-top:1px solid var(--c-border)">
|
||||
<span style="color:var(--c-text-secondary)">📡 ${new Date(z.ts).toLocaleDateString('de-DE')} · ${z.lat.toFixed(3)}, ${z.lon.toFixed(3)} · ${z.filled ? 'geladen' : 'ausstehend'}</span>
|
||||
<button type="button" class="btn btn-secondary off-zone-del" data-ts="${z.ts}"
|
||||
title="Nicht mehr automatisch laden" style="padding:1px 8px;font-size:var(--text-xs)">✕</button>
|
||||
</div>`).join('')}
|
||||
</div>` : ''}
|
||||
`,
|
||||
footer: `<button class="btn btn-secondary" data-modal-close style="width:100%">Schließen</button>`,
|
||||
});
|
||||
document.getElementById('off-dl')?.addEventListener('click', () => { UI.modal.close(); _downloadVectorRegion(); });
|
||||
document.getElementById('off-bbox')?.addEventListener('click', () => { UI.modal.close(); _downloadViewport(); });
|
||||
// Ent-Funklochen: Zone aus dem Gedächtnis nehmen (✕) — lädt nicht mehr automatisch.
|
||||
document.querySelectorAll('.off-zone-del').forEach(b => b.addEventListener('click', async e => {
|
||||
const ts = Number(e.currentTarget.dataset.ts);
|
||||
e.currentTarget.closest('.off-zone-row')?.remove();
|
||||
await MapOffline.removeDeadZone(ts).catch(() => {});
|
||||
UI.toast.success('Funkloch-Gebiet entfernt — wird nicht mehr automatisch geladen.');
|
||||
window.OfflineIndicator?.refresh();
|
||||
}));
|
||||
document.getElementById('off-cov')?.addEventListener('click', async () => { UI.modal.close(); await _setCoverage(!_covOn); });
|
||||
document.getElementById('off-clear')?.addEventListener('click', async e => {
|
||||
const btn = e.currentTarget;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue