feat: onboarding wizard, PWA support, Oracle Cloud free tier deploy, mode nav update

This commit is contained in:
2026-08-03 23:56:42 +01:00
parent 0c0daf947e
commit ffc9ccd77e
8 changed files with 303 additions and 3 deletions

BIN
public/icon-192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
public/icon-512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

13
public/manifest.json Normal file
View File

@@ -0,0 +1,13 @@
{
"name": "StackPilot",
"short_name": "StackPilot",
"description": "Build your self-hosted Docker stack in minutes",
"start_url": "/",
"display": "standalone",
"background_color": "#09090b",
"theme_color": "#6366f1",
"icons": [
{ "src": "/icon-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "/icon-512.png", "sizes": "512x512", "type": "image/png" }
]
}

40
public/sw.js Normal file
View File

@@ -0,0 +1,40 @@
const CACHE_NAME = 'stackpilot-v1';
const STATIC_ASSETS = ['/', '/index.html'];
self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(CACHE_NAME).then((cache) => cache.addAll(STATIC_ASSETS))
);
self.skipWaiting();
});
self.addEventListener('activate', (event) => {
event.waitUntil(
caches.keys().then((keys) =>
Promise.all(keys.filter((k) => k !== CACHE_NAME).map((k) => caches.delete(k)))
)
);
self.clients.claim();
});
self.addEventListener('fetch', (event) => {
const { request } = event;
// Don't cache API calls
if (request.url.includes('/api/')) {
event.respondWith(fetch(request));
return;
}
// Cache-first for static assets
event.respondWith(
caches.match(request).then((cached) => {
const fetched = fetch(request).then((response) => {
if (response.ok) {
const clone = response.clone();
caches.open(CACHE_NAME).then((cache) => cache.put(request, clone));
}
return response;
}).catch(() => cached);
return cached || fetched;
})
);
});