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,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<circle cx="50" cy="50" r="45" fill="#059669"/>
<text x="50" y="65" font-size="50" text-anchor="middle" fill="white">🍽️</text>
</svg>

After

Width:  |  Height:  |  Size: 206 B

BIN
client/public/icon-192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B

BIN
client/public/icon-512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B

View File

@@ -0,0 +1,10 @@
{
"name": "Meal Tracker",
"short_name": "Meals",
"description": "Track your daily food intake and macros",
"start_url": "/",
"display": "standalone",
"background_color": "#111827",
"theme_color": "#059669",
"icons": []
}

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))
);
});