web/lib/device: fix ipad recognition
This commit is contained in:
parent
d1767c550c
commit
bc63b0c6b7
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue