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"> <div class="h-svh w-svw flex flex-col items-center justify-center">
{{ requireInstall }}
{{ pwaInstalled() }}
{{ canInstall() }}
<img [src]="logo" class="w-32 animate-pulse" /> <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"> <div class="mt-6 flex flex-col items-center gap-3">
<span class="text-base font-medium text-center text-muted-color">برای ادامه، نصب برنامه الزامی است.</span> <span class="text-base font-medium text-center text-muted-color">برای ادامه، نصب برنامه الزامی است.</span>
@if (canInstall()) { @if (canInstall()) {
@@ -15,5 +13,5 @@
</div> </div>
} @else { } @else {
<span class="text-xl font-medium text-center text-muted-color mt-4"> در حال بارگذاری ... </span> <span class="text-xl font-medium text-center text-muted-color mt-4"> در حال بارگذاری ... </span>
} } -->
</div> </div>
@@ -1,6 +1,6 @@
import { brandingConfig } from '@/branding/branding.config'; import { brandingConfig } from '@/branding/branding.config';
import { PwaInstallService } from '@/core/services'; 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 { ButtonDirective } from 'primeng/button';
import { finalize, forkJoin } from 'rxjs'; import { finalize, forkJoin } from 'rxjs';
import images from 'src/assets/images'; import images from 'src/assets/images';
@@ -27,31 +27,31 @@ export class PosSplashComponent {
canInstall = this.pwaInstallService.canInstall; canInstall = this.pwaInstallService.canInstall;
private installPromptShown = false; private installPromptShown = false;
constructor() { // constructor() {
effect(() => { // effect(() => {
if (!this.requireInstall || this.pwaInstalled() || this.installPromptShown) { // if (!this.requireInstall || this.pwaInstalled() || this.installPromptShown) {
// this.getData(); // // this.getData();
return; // return;
} // }
if (this.canInstall()) { // if (this.canInstall()) {
this.installPromptShown = true; // this.installPromptShown = true;
this.pwaInstallService.openInstallConfirm(); // this.pwaInstallService.openInstallConfirm();
} // }
}); // });
} // }
async ngOnInit() { async ngOnInit() {
const data = await this.deviceInfoStore.getData(); const data = await this.deviceInfoStore.getData();
if (!this.requireInstall || this.pwaInstalled()) {
this.getData(); this.getData();
} // if (!this.requireInstall || this.pwaInstalled()) {
// }
if (this.canInstall()) { // if (this.canInstall()) {
this.pwaInstallService.openInstallConfirm(); // this.pwaInstallService.openInstallConfirm();
this.installPromptShown = true; // this.installPromptShown = true;
} // }
} }
async getData() { async getData() {