mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-07-30 20:38:22 +00:00
Update 1.2.2.2 beta
This commit is contained in:
BIN
AppImage/public/icons/icon-192.png
Normal file
BIN
AppImage/public/icons/icon-192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.3 KiB |
BIN
AppImage/public/icons/icon-512.png
Normal file
BIN
AppImage/public/icons/icon-512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
AppImage/public/icons/icon-maskable-512.png
Normal file
BIN
AppImage/public/icons/icon-maskable-512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
BIN
AppImage/public/logo.png
Normal file
BIN
AppImage/public/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -3,14 +3,29 @@
|
||||
"short_name": "ProxMenux",
|
||||
"description": "Proxmox System Dashboard and Monitor",
|
||||
"start_url": "/",
|
||||
"scope": "/",
|
||||
"display": "standalone",
|
||||
"orientation": "any",
|
||||
"background_color": "#2b2f36",
|
||||
"theme_color": "#2b2f36",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/images/proxmenux-logo.png",
|
||||
"sizes": "256x256",
|
||||
"type": "image/png"
|
||||
"src": "/icons/icon-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/icons/icon-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/icons/icon-maskable-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
40
AppImage/public/sw.js
Normal file
40
AppImage/public/sw.js
Normal file
@@ -0,0 +1,40 @@
|
||||
// ==========================================================
|
||||
// ProxMenux Monitor — Service Worker
|
||||
// ==========================================================
|
||||
// Minimal SW whose only job is to make Chrome (Android) treat
|
||||
// the Monitor as an installable PWA. The Monitor lives on the
|
||||
// operator's LAN, hits a self-signed HTTPS endpoint and has
|
||||
// ZERO offline value (every page calls /api/* over the wire),
|
||||
// so we do NOT cache pages or API responses — caching them
|
||||
// would only cause stale-data bugs after an AppImage update.
|
||||
//
|
||||
// The install / activate handlers clean up old SW caches from
|
||||
// previous Monitor versions so a beta-to-stable upgrade never
|
||||
// strands the browser on a cached old shell.
|
||||
// ==========================================================
|
||||
|
||||
const SW_VERSION = 'proxmenux-monitor-v1';
|
||||
|
||||
self.addEventListener('install', (event) => {
|
||||
// Take over as soon as installed; no skipWaiting handshake.
|
||||
self.skipWaiting();
|
||||
});
|
||||
|
||||
self.addEventListener('activate', (event) => {
|
||||
event.waitUntil((async () => {
|
||||
// Wipe any cache name that isn't ours — survives renames /
|
||||
// version bumps without piling up stale entries.
|
||||
const names = await caches.keys();
|
||||
await Promise.all(
|
||||
names.filter((n) => n !== SW_VERSION).map((n) => caches.delete(n))
|
||||
);
|
||||
await self.clients.claim();
|
||||
})());
|
||||
});
|
||||
|
||||
// Network-only fetch. The SW exists so Chrome marks the site as
|
||||
// installable; we deliberately do not serve cached responses.
|
||||
self.addEventListener('fetch', (event) => {
|
||||
// Let the browser handle it normally — no respondWith → no cache.
|
||||
return;
|
||||
});
|
||||
Reference in New Issue
Block a user