mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-26 01:51:41 +08:00
Merge pull request #368 from jxxghp/cursor/fix-ios-detection-inconsistency-in-pwa-2971
Fix iOS detection inconsistency in PWA
This commit is contained in:
@@ -86,7 +86,7 @@ export function usePWAInstall() {
|
||||
const isPWASupported = computed(() => {
|
||||
const hasServiceWorker = 'serviceWorker' in navigator
|
||||
const supportsInstallPromptEvent = 'onbeforeinstallprompt' in window
|
||||
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent)
|
||||
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !(window as any).MSStream
|
||||
|
||||
return hasServiceWorker && (supportsInstallPromptEvent || isIOS)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user