pwa compatible
BIN
frontend/public/icons/icon-192-black.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
frontend/public/icons/icon-192-maskable.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
frontend/public/icons/icon-192.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
frontend/public/icons/icon-512-black.png
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
frontend/public/icons/icon-512-maskable.png
Normal file
|
After Width: | Height: | Size: 106 KiB |
BIN
frontend/public/icons/icon-512.png
Normal file
|
After Width: | Height: | Size: 106 KiB |
57
frontend/public/manifest.json
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "RADIUS Nucleo",
|
||||
"short_name": "RADIUS",
|
||||
"description": "Aplicación PWA para administrar usuarios y dispositivos usando FreeRADIUS.",
|
||||
"start_url": "/index.html",
|
||||
"display": "standalone",
|
||||
"background_color": "#000000",
|
||||
"theme_color": "#000000",
|
||||
"icons": [
|
||||
{
|
||||
"src": "icons/icon-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/icon-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/icon-192-maskable.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "icons/icon-512-maskable.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "icons/icon-192-black.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/icon-512-black.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"screenshots": [
|
||||
{
|
||||
"src": "screenshots/screenshot-desktop.png",
|
||||
"sizes": "2048x1229",
|
||||
"type": "image/png",
|
||||
"form_factor": "wide"
|
||||
},
|
||||
{
|
||||
"src": "screenshots/screenshot-mobile.png",
|
||||
"sizes": "797x1220",
|
||||
"type": "image/png",
|
||||
"form_factor": "narrow"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
frontend/public/screenshots/screenshot-desktop.png
Normal file
|
After Width: | Height: | Size: 394 KiB |
BIN
frontend/public/screenshots/screenshot-mobile.png
Normal file
|
After Width: | Height: | Size: 155 KiB |
39
frontend/public/sw.js
Normal file
@@ -0,0 +1,39 @@
|
||||
// Nombre del caché para la aplicación
|
||||
const CACHE_NAME = 'radius-nucleo-cache-v1';
|
||||
|
||||
// Archivos que se almacenarán en caché durante la instalación
|
||||
const URLS_TO_CACHE = [
|
||||
'/',
|
||||
'/index.html',
|
||||
'/manifest.json',
|
||||
'/sw.js',
|
||||
// Iconos
|
||||
'/icons/icon-192.png',
|
||||
'/icons/icon-512.png',
|
||||
'/icons/icon-192-maskable.png',
|
||||
'/icons/icon-512-maskable.png',
|
||||
'/icons/icon-192-black.png',
|
||||
'/icons/icon-512-black.png',
|
||||
// Capturas de pantalla
|
||||
'/screenshots/screenshot-desktop.png',
|
||||
'/screenshots/screenshot-mobile.png'
|
||||
];
|
||||
|
||||
// Evento de instalación: almacena los archivos definidos en la caché
|
||||
self.addEventListener('install', (event) => {
|
||||
event.waitUntil(
|
||||
caches.open(CACHE_NAME)
|
||||
.then((cache) => cache.addAll(URLS_TO_CACHE))
|
||||
);
|
||||
});
|
||||
|
||||
// Evento de recuperación (fetch): responde desde la caché si existe, si no, recupera de la red
|
||||
self.addEventListener('fetch', (event) => {
|
||||
event.respondWith(
|
||||
caches.match(event.request)
|
||||
.then((response) => {
|
||||
// Devuelve la respuesta en caché o realiza la solicitud a la red
|
||||
return response || fetch(event.request);
|
||||
})
|
||||
);
|
||||
});
|
||||