feat: update PWA installation logic, enhance app versioning, and streamline environment configurations

This commit is contained in:
2026-05-11 20:26:02 +03:30
parent ff9bbad336
commit d513ea381e
8 changed files with 9 additions and 17 deletions
+1 -6
View File
@@ -20,9 +20,6 @@ export class PwaInstallService {
window.matchMedia('(display-mode: standalone)').matches ||
(window.navigator as any).standalone === true;
console.log(window.matchMedia('(display-mode: standalone)').matches);
console.log(window.navigator);
this.isInstalled.set(standalone);
window.addEventListener('beforeinstallprompt', (event: any) => {
@@ -30,7 +27,6 @@ export class PwaInstallService {
this.deferredInstallPrompt = event;
this.canInstall.set(true);
console.log(this.deferredInstallPrompt);
});
window.addEventListener('appinstalled', () => {
@@ -45,8 +41,6 @@ export class PwaInstallService {
return;
}
console.log('openInstallConfirm');
this.confirmationService.confirm({
header: 'نصب اپلیکیشن',
message: 'برای ادامه می‌بایست نیازمندی‌های نرم‌افزار را نصب کنید',
@@ -59,6 +53,7 @@ export class PwaInstallService {
this.deferredInstallPrompt.userChoice.finally(() => {
this.deferredInstallPrompt = null;
this.canInstall.set(false);
window.location.reload();
});
},
});