fix(ui): repair PWA install, credit footer, and boursecu copy
Make install guide and BasicButton clicks reliable, align montzar credit bar, remove calculator quick action, and use مس in about-software default text. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { message } from 'ant-design-vue'
|
||||
import type { PwaPlatform } from '@/modules/pwa/pwaInstallGuideSteps'
|
||||
import {
|
||||
getDefaultPwaPlatform,
|
||||
@@ -77,7 +78,10 @@ export function usePwaInstall() {
|
||||
// فقط وقتی واقعاً داخل PWA/TWA هستیم راهنما را نشان نده
|
||||
if (isStandalonePwa() || isTWA()) return
|
||||
consumeInstallBanner()
|
||||
platform.value = nextPlatform ?? getDefaultPwaPlatform()
|
||||
const next = nextPlatform === 'ios' || nextPlatform === 'android'
|
||||
? nextPlatform
|
||||
: getDefaultPwaPlatform()
|
||||
platform.value = next
|
||||
guideOpen.value = true
|
||||
}
|
||||
|
||||
@@ -108,16 +112,24 @@ export function usePwaInstall() {
|
||||
|
||||
/** نصب مستقیم مرورگر؛ اگر ممکن نبود مدال آموزش. */
|
||||
async function tryInstallOrOpenGuide(nextPlatform?: PwaPlatform) {
|
||||
ensureListener()
|
||||
refreshOfferInstall()
|
||||
if (isStandalonePwa() || isTWA()) return false
|
||||
|
||||
if (isStandalonePwa() || isTWA()) {
|
||||
message.info('نسخه وباپ از قبل نصب شده است')
|
||||
offerInstall.value = false
|
||||
return false
|
||||
}
|
||||
|
||||
const installed = await triggerNativePwaInstall()
|
||||
if (installed) {
|
||||
offerInstall.value = false
|
||||
consumeInstallBanner()
|
||||
message.success('نصب وباپ آغاز شد')
|
||||
return true
|
||||
}
|
||||
|
||||
// Chrome روی HTTP/IP یا Safari معمولاً prompt بومی ندارد — راهنما را باز کن
|
||||
openGuide(nextPlatform)
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user