diff --git a/src/locales/ar.json b/src/locales/ar.json index 974d57e..674e439 100644 --- a/src/locales/ar.json +++ b/src/locales/ar.json @@ -1015,6 +1015,7 @@ "nativeAppDesc": "بالفعل أحدث إصدار", "notSupportedTitle": "المتصفح غير مدعوم", "notSupportedDesc": "يرجى استخدام Chrome أو Safari أو Edge", + "loading": "جاري التحميل...", "iosInstallHeader": "دليل التثبيت على iOS", "iosInstallMessage": "اضغط على زر المشاركة في الأسفل واختر 'إضافة إلى الشاشة الرئيسية'", "iosInstallButton": "حسناً", diff --git a/src/locales/en-US.json b/src/locales/en-US.json index affd23a..a07c3ff 100644 --- a/src/locales/en-US.json +++ b/src/locales/en-US.json @@ -1015,6 +1015,7 @@ "nativeAppDesc": "Already latest version", "notSupportedTitle": "Browser not supported", "notSupportedDesc": "Please use Chrome, Safari, or Edge", + "loading": "Loading...", "iosInstallHeader": "iOS Installation Guide", "iosInstallMessage": "Tap the share button at the bottom and select 'Add to Home Screen'", "iosInstallButton": "Got it", diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json index 94ed5a2..a15a1b5 100644 --- a/src/locales/zh-CN.json +++ b/src/locales/zh-CN.json @@ -1015,6 +1015,7 @@ "nativeAppDesc": "已经是最新版本,无需下载", "notSupportedTitle": "当前浏览器暂不支持应用安装", "notSupportedDesc": "建议使用 Chrome、Safari 或 Edge 浏览器", + "loading": "加载中...", "iosInstallHeader": "iOS 安装指引", "iosInstallMessage": "请点击浏览器底部的分享按钮,然后选择\"添加到主屏幕\"", "iosInstallButton": "知道了", diff --git a/src/locales/zh-HK.json b/src/locales/zh-HK.json index f251380..c2b0339 100644 --- a/src/locales/zh-HK.json +++ b/src/locales/zh-HK.json @@ -1015,6 +1015,7 @@ "nativeAppDesc": "已經是最新版本,無需下載", "notSupportedTitle": "當前瀏覽器暫不支持應用安裝", "notSupportedDesc": "建議使用 Chrome、Safari 或 Edge 瀏覽器", + "loading": "加載中...", "iosInstallHeader": "iOS 安裝指引", "iosInstallMessage": "請點擊瀏覽器底部的分享按鈕,然後選擇\"添加到主屏幕\"", "iosInstallButton": "知道了", diff --git a/src/views/pwa/download.vue b/src/views/pwa/download.vue index c65d4b0..b4daa02 100644 --- a/src/views/pwa/download.vue +++ b/src/views/pwa/download.vue @@ -29,13 +29,20 @@ const wasUninstalled = computed(() => { return wasInstalled === "true" && !isInstalled.value; }); -// 显示下载按钮的条件 +// 显示下载按钮的条件:浏览器环境 + 未安装 + (能安装 或 非iOS) const shouldShowDownloadButton = computed(() => { - const result = platform === "browser" && !isInstalled.value; + const result = platform === "browser" && !isInstalled.value && (canInstall.value || !isIOS); console.log("[Download Page] shouldShowDownloadButton:", result); return result; }); +// 是否显示不支持提示:浏览器环境 + 不能安装 + 非iOS +const shouldShowNotSupported = computed(() => { + const result = platform === "browser" && !canInstall.value && !isIOS && !isInstalled.value; + console.log("[Download Page] shouldShowNotSupported:", result); + return result; +}); + // 处理安装 async function handleInstall() { if (isIOSSafari) { @@ -243,7 +250,7 @@ watch(isInstalled, (installed) => { -
+

{{ t("pwa.download.notSupportedTitle") }} @@ -253,6 +260,16 @@ watch(isInstalled, (installed) => {

+ + +
+
+ +

+ {{ t("pwa.download.loading") }} +

+
+