feat: Add PWA support (manifest, service worker) and Companies tab to project edit
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 70 B |
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "ConstruProgress",
|
||||
"short_name": "ConstruProg",
|
||||
"description": "App para gestión de proyectos de construcción",
|
||||
"start_url": "/",
|
||||
"display": "standalone",
|
||||
"background_color": "#ffffff",
|
||||
"theme_color": "#000000",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/icons/icon-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/icon-128x128.png",
|
||||
"sizes": "128x128",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/icon-152x152.png",
|
||||
"sizes": "152x152",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/icon-384x384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
const CACHE_NAME = 'construprogress-cache-v1';
|
||||
const urlsToCache = [
|
||||
'/',
|
||||
'/dashboard',
|
||||
'/projects',
|
||||
'/projects-list',
|
||||
'/projects/templates',
|
||||
'/css/app.css',
|
||||
'/js/app.js',
|
||||
// Add other assets as needed
|
||||
];
|
||||
|
||||
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) => {
|
||||
if (response) {
|
||||
return response;
|
||||
}
|
||||
return fetch(event.request);
|
||||
})
|
||||
);
|
||||
});
|
||||