bug fixes, and performance improvements, and drawer

This commit is contained in:
Zoe
2026-09-27 18:44:51 -05:00
parent d48d8163a7
commit 2b9f8d64d7
52 changed files with 4913 additions and 778 deletions
+8 -6
View File
@@ -7,14 +7,16 @@ const props = defineProps<{
const { show, hide } = useTooltip();
const triggerRef = ref<HTMLElement | null>(null);
const hasCursor = ref(false);
onMounted(() => {
hasCursor.value = window.matchMedia('(hover: hover) and (pointer: fine)').matches;
});
let hasCursor: boolean | null = null;
const checkHasCursor = () => {
if (hasCursor === null && typeof window !== 'undefined') {
hasCursor = window.matchMedia('(hover: hover) and (pointer: fine)').matches;
}
return hasCursor ?? false;
};
const onMouseEnter = () => {
if (triggerRef.value && hasCursor.value) {
if (triggerRef.value && checkHasCursor()) {
show(triggerRef.value, props.hotkey, props.text);
}
};