From c111de15b1f54d7d0e4d147afe12186e13628411 Mon Sep 17 00:00:00 2001 From: Spedon Date: Thu, 11 Jul 2024 13:36:15 +0800 Subject: [PATCH] feat: enhance mobile detection logic (#358) --- assets/ts/main.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/ts/main.tsx b/assets/ts/main.tsx index 16e06d7..cf49e01 100644 --- a/assets/ts/main.tsx +++ b/assets/ts/main.tsx @@ -38,7 +38,9 @@ const Mobile = lazy(async () => await import('./mobile/layout')) function Main(): JSX.Element { // variables const [ijs] = createResource(getImageJSON) - const isMobile = window.matchMedia('(hover: none)').matches + const isMobile = + window.matchMedia('(hover: none)').matches && + !window.navigator.userAgent.includes('Win') // states const [scrollable, setScollable] = createSignal(true)