Initial commit - Meal Tracker app
This commit is contained in:
BIN
client/public/icon-192.png
Normal file
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
BIN
client/public/icon-512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 859 B |
10
client/public/manifest.json
Normal file
10
client/public/manifest.json
Normal 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": []
|
||||
}
|
||||
14
client/public/service-worker.js
Normal file
14
client/public/service-worker.js
Normal 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))
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user