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(() => {