From c94a914e9917b2e1ed595743fea7f2656dcc6035 Mon Sep 17 00:00:00 2001 From: bboysoul Date: Mon, 7 Sep 2026 16:07:38 +0800 Subject: [PATCH] fix: smooth habit row edge and add hide completed --- frontend/src/MvpPanel.vue | 12 ++++++++---- frontend/src/style.css | 4 ++-- frontend/src/style.test.ts | 22 ++++++++++++++++++++-- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/frontend/src/MvpPanel.vue b/frontend/src/MvpPanel.vue index 6cfb60c..5b0bd15 100644 --- a/frontend/src/MvpPanel.vue +++ b/frontend/src/MvpPanel.vue @@ -28,7 +28,10 @@ const todayKey = ref(dateKey(new Date())) const habitSwipeStart = ref<{ id: string; x: number; y: number } | null>(null) const habitPointerStart = ref<{ id: string; x: number; y: number } | null>(null) const habitSwipeOffsets = ref>({}) +const hideCompletedHabits = ref(false) const todayHabits = computed(() => habits.value.filter((item) => isHabitScheduledToday(item, todayKey.value))) +const visibleTodayHabits = computed(() => hideCompletedHabits.value ? todayHabits.value.filter((item) => !isDone(item, todayKey.value)) : todayHabits.value) +const visibleHabits = computed(() => hideCompletedHabits.value ? habits.value.filter((item) => !isDone(item, todayKey.value)) : habits.value) let dayRolloverTimer: ReturnType | undefined function formatErrorMessage(detail: unknown): string { @@ -297,18 +300,19 @@ onBeforeUnmount(() => {