client: tweak ui

This commit is contained in:
syuilo
2021-12-02 20:09:12 +09:00
parent 4cc2a561d5
commit f38b6a1806
33 changed files with 199 additions and 185 deletions

View File

@ -1,5 +1,6 @@
import { isScreenTouching } from '@/os';
import { Ref, ref } from 'vue';
import { isDeviceTouch } from './is-device-touch';
export function useTooltip(onShow: (showing: Ref<boolean>) => void) {
let isHovering = false;
@ -13,7 +14,7 @@ export function useTooltip(onShow: (showing: Ref<boolean>) => void) {
// iOS(Androidも)では、要素をタップした直後に(おせっかいで)mouseoverイベントを発火させたりするため、その対策
// これが無いと、画面に触れてないのにツールチップが出たりしてしまう
if (!isScreenTouching) return;
if (isDeviceTouch && !isScreenTouching) return;
const showing = ref(true);
onShow(showing);