feat: initial release of FlockRadar driving app and national transparency directory for flockradar.org

This commit is contained in:
2026-09-12 08:50:24 -07:00
commit b000c7dda6
12 changed files with 5563 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
// Service Worker for FlockRadar Offline Driving & Caching
const CACHE_NAME = 'flockradar-v2';
const ASSETS_TO_CACHE = [
'./',
'./index.html',
'./css/styles.css',
'./js/app.js',
'./js/auth.js',
'./js/radar.js',
'./data/portals.js',
'./manifest.json'
];
self.addEventListener('install', event => {
event.waitUntil(
caches.open(CACHE_NAME).then(cache => cache.addAll(ASSETS_TO_CACHE))
);
self.skipWaiting();
});
self.addEventListener('activate', event => {
event.waitUntil(
caches.keys().then(keys => Promise.all(
keys.filter(key => key !== CACHE_NAME).map(key => caches.delete(key))
))
);
self.clients.claim();
});
self.addEventListener('fetch', event => {
// Network first, fallback to cache
event.respondWith(
fetch(event.request).catch(() => caches.match(event.request))
);
});