diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-01-27 11:16:22 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-01-27 11:16:22 +0900 |
| commit | 67d64c936506aa43760fe696d78d5cb60d17a61c (patch) | |
| tree | 9ab60f3198d16e9a4ae0b4909b172c963bba3db0 /packages/frontend/src/scripts | |
| parent | fix(client): ダッシュボードでオンラインユーザー数が表示... (diff) | |
| download | sharkey-67d64c936506aa43760fe696d78d5cb60d17a61c.tar.gz sharkey-67d64c936506aa43760fe696d78d5cb60d17a61c.tar.bz2 sharkey-67d64c936506aa43760fe696d78d5cb60d17a61c.zip | |
refactor
Diffstat (limited to 'packages/frontend/src/scripts')
| -rw-r--r-- | packages/frontend/src/scripts/device-kind.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/frontend/src/scripts/device-kind.ts b/packages/frontend/src/scripts/device-kind.ts index 544cac0604..6bb349c554 100644 --- a/packages/frontend/src/scripts/device-kind.ts +++ b/packages/frontend/src/scripts/device-kind.ts @@ -4,7 +4,7 @@ const ua = navigator.userAgent.toLowerCase(); const isTablet = /ipad/.test(ua) || (/mobile|iphone|android/.test(ua) && window.innerWidth > 700); const isSmartphone = !isTablet && /mobile|iphone|android/.test(ua); -export const deviceKind = defaultStore.state.overridedDeviceKind ? defaultStore.state.overridedDeviceKind +export const deviceKind: 'smartphone' | 'tablet' | 'desktop' = defaultStore.state.overridedDeviceKind ? defaultStore.state.overridedDeviceKind : isSmartphone ? 'smartphone' : isTablet ? 'tablet' : 'desktop'; |