mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 15:50:36 -05:00
Make the app an installable PWA with an offline page
Manifest, service worker (offline fallback, cached static assets only, no aircraft pages), new plane icon in all PWA/Apple sizes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0767545143
commit
21ef577653
13 files changed
+158
-47
No files matched your search
@@ -19,3 +19,8 @@ styleCharts()
|
||||
// Charts can be created before this module runs, so restyle after each page load too.
|
||||
document.addEventListener("turbo:load", restyleCharts)
|
||||
window.addEventListener("theme:change", restyleCharts)
|
||||
|
||||
// Installable app (PWA): the service worker adds an offline page and caches static assets.
|
||||
if ("serviceWorker" in navigator) {
|
||||
window.addEventListener("load", () => navigator.serviceWorker.register("/service-worker.js", { scope: "/" }).catch(() => {}))
|
||||
}
|
||||
Reference in new issue
Block a user