Add 10-second auto PWA install prompt
- New users now see install prompt automatically after 10 seconds - Smart cancellation prevents duplicate prompts - Added PWAUtils methods for delayed prompt management - Enhanced user onboarding experience - Respects installation status and user preferences
This commit is contained in:
15
index.html
15
index.html
@@ -4206,6 +4206,21 @@ window.PWAUtils = {
|
||||
window.pwaInstallPrompt.checkInstallationStatus();
|
||||
console.log('🔄 PWA Installation status reset');
|
||||
}
|
||||
},
|
||||
|
||||
// Метод для отмены отложенного промпта
|
||||
cancelDelayedPrompt: () => {
|
||||
if (window.pwaInstallPrompt) {
|
||||
return window.pwaInstallPrompt.cancelDelayedPrompt();
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
// Метод для перезапуска отложенного промпта
|
||||
rescheduleDelayedPrompt: () => {
|
||||
if (window.pwaInstallPrompt) {
|
||||
window.pwaInstallPrompt.rescheduleDelayedPrompt();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user