Add PocketBase login, first-sign-in password changes, account settings, and user activation, reactivation and deletion with self-removal guards. Protect application pages and APIs and keep private pages out of PWA caches. Resolve plant locations from site assignments and improve map controls, profit chart views, navigation and mobile table layouts. Validation: production build and TypeScript passed; 28 unit tests passed. Backend access integration tests and mobile verification are documented.
6 lines
290 B
JavaScript
6 lines
290 B
JavaScript
// Remove runtime caches left by the pre-login app. Keep the current static precache.
|
|
self.addEventListener("activate", (event) => {
|
|
event.waitUntil(caches.keys().then((keys) => Promise.all(
|
|
keys.filter((key) => !key.includes("precache")).map((key) => caches.delete(key)),
|
|
)));
|
|
});
|