forked from jsnbuchanan/crowd-funder-for-time-pwa
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user