remove required pwa in pos

This commit is contained in:
2026-05-11 20:44:42 +03:30
parent d513ea381e
commit dba6162427
2 changed files with 23 additions and 25 deletions
@@ -1,9 +1,7 @@
<div class="h-svh w-svw flex flex-col items-center justify-center">
{{ requireInstall }}
{{ pwaInstalled() }}
{{ canInstall() }}
<img [src]="logo" class="w-32 animate-pulse" />
@if (requireInstall && !pwaInstalled()) {
<span class="text-xl font-medium text-center text-muted-color mt-4"> در حال بارگذاری ... </span>
<!-- @if (requireInstall && !pwaInstalled()) {
<div class="mt-6 flex flex-col items-center gap-3">
<span class="text-base font-medium text-center text-muted-color">برای ادامه، نصب برنامه الزامی است.</span>
@if (canInstall()) {
@@ -15,5 +13,5 @@
</div>
} @else {
<span class="text-xl font-medium text-center text-muted-color mt-4"> در حال بارگذاری ... </span>
}
} -->
</div>
@@ -1,6 +1,6 @@
import { brandingConfig } from '@/branding/branding.config';
import { PwaInstallService } from '@/core/services';
import { Component, effect, EventEmitter, inject, Output } from '@angular/core';
import { Component, EventEmitter, inject, Output } from '@angular/core';
import { ButtonDirective } from 'primeng/button';
import { finalize, forkJoin } from 'rxjs';
import images from 'src/assets/images';
@@ -27,31 +27,31 @@ export class PosSplashComponent {
canInstall = this.pwaInstallService.canInstall;
private installPromptShown = false;
constructor() {
effect(() => {
if (!this.requireInstall || this.pwaInstalled() || this.installPromptShown) {
// this.getData();
return;
}
// constructor() {
// effect(() => {
// if (!this.requireInstall || this.pwaInstalled() || this.installPromptShown) {
// // this.getData();
// return;
// }
if (this.canInstall()) {
this.installPromptShown = true;
this.pwaInstallService.openInstallConfirm();
}
});
}
// if (this.canInstall()) {
// this.installPromptShown = true;
// this.pwaInstallService.openInstallConfirm();
// }
// });
// }
async ngOnInit() {
const data = await this.deviceInfoStore.getData();
if (!this.requireInstall || this.pwaInstalled()) {
this.getData();
}
this.getData();
// if (!this.requireInstall || this.pwaInstalled()) {
// }
if (this.canInstall()) {
this.pwaInstallService.openInstallConfirm();
this.installPromptShown = true;
}
// if (this.canInstall()) {
// this.pwaInstallService.openInstallConfirm();
// this.installPromptShown = true;
// }
}
async getData() {