diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-02-08 18:46:39 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-02-08 18:46:39 +0900 |
| commit | 190b47aad28c2d6e740953ffd7f987225c67f0a3 (patch) | |
| tree | bda0ce27a77dcabf991317f07faf654c6509ec7a /packages/client/src/components/ui | |
| parent | Update CHANGELOG.md (diff) | |
| download | misskey-190b47aad28c2d6e740953ffd7f987225c67f0a3.tar.gz misskey-190b47aad28c2d6e740953ffd7f987225c67f0a3.tar.bz2 misskey-190b47aad28c2d6e740953ffd7f987225c67f0a3.zip | |
feat(client): デバイスの種類を手動指定できるように
Diffstat (limited to 'packages/client/src/components/ui')
| -rw-r--r-- | packages/client/src/components/ui/modal.vue | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/client/src/components/ui/modal.vue b/packages/client/src/components/ui/modal.vue index 3c3bb5c226..b42c0e4d42 100644 --- a/packages/client/src/components/ui/modal.vue +++ b/packages/client/src/components/ui/modal.vue @@ -14,6 +14,7 @@ import { nextTick, onMounted, computed, ref, watch, provide } from 'vue'; import * as os from '@/os'; import { isTouchUsing } from '@/scripts/touch'; import { defaultStore } from '@/store'; +import { deviceKind } from '@/scripts/device-kind'; function getFixedContainer(el: Element | null): Element | null { if (el == null || el.tagName === 'BODY') return null; @@ -62,7 +63,7 @@ const content = ref<HTMLElement>(); const zIndex = os.claimZIndex(props.zPriority); const type = computed(() => { if (props.preferType === 'auto') { - if (!defaultStore.state.disableDrawer && isTouchUsing && window.innerWidth < 500 && window.innerHeight < 1000) { + if (!defaultStore.state.disableDrawer && isTouchUsing && deviceKind === 'smartphone') { return 'drawer'; } else { return props.src != null ? 'popup' : 'dialog'; |