This commit is contained in:
Julian Freeman
2026-03-23 09:43:27 -04:00
parent e6b21d5acd
commit 45bbb593c9

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, onMounted, onUnmounted, computed, nextTick } from "vue";
import { ref, onMounted, onUnmounted, computed, nextTick, watch } from "vue";
import { load } from "@tauri-apps/plugin-store";
import { open, save } from "@tauri-apps/plugin-dialog";
import { invoke } from "@tauri-apps/api/core";
@@ -80,6 +80,16 @@ const handleEventMouseMove = (e: MouseEvent) => {
const handleEventMouseLeave = () => {
hoveredEventDetails.value = null;
};
watch(dayEvents, (newEvents) => {
if (hoveredEventDetails.value) {
const exists = newEvents.some(ev => ev.id === hoveredEventDetails.value?.event.id);
if (!exists) {
hoveredEventDetails.value = null;
}
}
});
const timelineRef = ref<HTMLElement | null>(null);
const rulerHeight = computed(() => TOTAL_MINUTES * timelineZoom.value);
@@ -167,6 +177,9 @@ const selectCalendarDate = (date: Date) => {
lockedImage.value = null;
previewSrc.value = "";
hoveredTime.value = null;
hoveredEventDetails.value = null;
dayEvents.value = [];
timelineImages.value = [];
updateCurrentMinute();
loadTimeline(true); loadEvents();
};