Add favorites feature - toggle, list, and pre-fill on add

This commit is contained in:
Otto
2026-03-30 17:00:21 -04:00
parent 45e988cbe5
commit 3ac828bea3
16 changed files with 3174 additions and 32 deletions

View File

@@ -0,0 +1,14 @@
const CACHE_NAME = 'meal-tracker-v1';
const urlsToCache = ['/', '/index.html', '/assets/'];
self.addEventListener('install', event => {
event.waitUntil(
caches.open(CACHE_NAME).then(cache => cache.addAll(urlsToCache))
);
});
self.addEventListener('fetch', event => {
event.respondWith(
caches.match(event.request).then(response => response || fetch(event.request))
);
});