From bc63b0c6b75b2e06ada5790ee3a25f6b91a34142 Mon Sep 17 00:00:00 2001 From: wukko Date: Wed, 10 Jul 2024 23:28:23 +0600 Subject: [PATCH] web/lib/device: fix ipad recognition --- web/src/lib/device.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/lib/device.ts b/web/src/lib/device.ts index 71f6bea5..ecb99849 100644 --- a/web/src/lib/device.ts +++ b/web/src/lib/device.ts @@ -1,7 +1,7 @@ const ua = navigator.userAgent.toLowerCase(); -const iPad = ua.includes("mac os") && navigator.maxTouchPoints > 0; const iPhone = ua.includes("iphone os"); +const iPad = !iPhone && ua.includes("mac os") && navigator.maxTouchPoints > 0; const iOS = iPhone || iPad; const android = ua.includes("android") || ua.includes("diordna"); @@ -14,8 +14,8 @@ const installed = window.matchMedia('(display-mode: standalone)').matches; const device = { is: { - iPad, iPhone, + iPad, iOS, android, mobile,