Remove manual service worker registration; rely on VitePWA auto-registration

- Deleted src/registerServiceWorker.ts and all related imports
- Cleaned up WebPlatformService and main.web.ts to remove manual SW logic
- Updated VitePWA config for correct dev/prod SW handling
- Fixed missing FontAwesome download icon in PWA prompt
- Updated docs to reflect new PWA registration approach

PWA now works reliably in all web environments with zero manual SW code.
This commit is contained in:
Matthew Raymer
2025-07-15 06:13:33 +00:00
parent 6dea12bbaf
commit 6d4fb4f57a
23 changed files with 328 additions and 126 deletions

View File

@@ -79,12 +79,6 @@ export default class PWAInstallPrompt extends Vue {
}
private setupInstallPrompt() {
// Only show install prompt if PWA is enabled
if (process.env.VITE_PWA_ENABLED !== "true") {
logger.debug("[PWA] Install prompt disabled - PWA not enabled");
return;
}
// Check if already installed
if (this.isPWAInstalled()) {
logger.debug("[PWA] Install prompt disabled - PWA already installed");
@@ -95,9 +89,6 @@ export default class PWAInstallPrompt extends Vue {
window.addEventListener('beforeinstallprompt', (e) => {
logger.debug("[PWA] beforeinstallprompt event fired");
// Prevent the mini-infobar from appearing on mobile
e.preventDefault();
// Stash the event so it can be triggered later
this.deferredPrompt = e as BeforeInstallPromptEvent;