fix(pwa): show install prompt only once

This commit is contained in:
2026-07-03 18:29:58 +08:00
parent 7e559ac098
commit 27cb2e2c33
4 changed files with 46 additions and 25 deletions
+12
View File
@@ -0,0 +1,12 @@
"use client";
import { AppStorage } from "@/data/storage/app/app_storage";
export async function canShowPwaInstallPromptOnce(): Promise<boolean> {
const result = await AppStorage.canShowPwaDialog();
return result.success && result.data;
}
export function recordPwaInstallPromptShown(): Promise<unknown> {
return AppStorage.recordPwaDialogShown();
}