summaryrefslogtreecommitdiff
path: root/packages/client/src/components/ui
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-02-08 18:46:39 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-02-08 18:46:39 +0900
commit190b47aad28c2d6e740953ffd7f987225c67f0a3 (patch)
treebda0ce27a77dcabf991317f07faf654c6509ec7a /packages/client/src/components/ui
parentUpdate CHANGELOG.md (diff)
downloadmisskey-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.vue3
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';