fix: purge stale 1-tap mobile pins, make remove pin button bold and prominent, and bust service worker cache

This commit is contained in:
2026-09-12 09:18:33 -07:00
parent 872be94476
commit 2bd6ebe302
4 changed files with 69 additions and 25 deletions
+14 -2
View File
@@ -124,7 +124,13 @@
communityReports = JSON.parse(stored);
// Automatically prune any unverified test marks or pins without photo proof
const beforeCount = communityReports.length;
communityReports = communityReports.filter(r => r && r.photoUrl && !r.id.startsWith('usr-pin-'));
communityReports = communityReports.filter(r =>
r &&
r.photoUrl &&
!r.id.startsWith('usr-pin-') &&
r.notes !== '1-Tap Mobile Driver Pin' &&
r.type !== 'Fixed ALPR Camera'
);
if (communityReports.length !== beforeCount) {
localStorage.setItem(STORAGE_KEY_REPORTS, JSON.stringify(communityReports));
}
@@ -138,7 +144,13 @@
function clearUnverifiedReports() {
try {
communityReports = communityReports.filter(r => r && r.photoUrl && !r.id.startsWith('usr-pin-'));
communityReports = communityReports.filter(r =>
r &&
r.photoUrl &&
!r.id.startsWith('usr-pin-') &&
r.notes !== '1-Tap Mobile Driver Pin' &&
r.type !== 'Fixed ALPR Camera'
);
localStorage.setItem(STORAGE_KEY_REPORTS, JSON.stringify(communityReports));
Object.keys(cameraMetadata).forEach(id => {
if (id.startsWith('usr-pin-') || !cameraMetadata[id].photoUrl) {