fix: remove habit refresh action
ci / docker (push) Successful in 6m56s

This commit is contained in:
2026-09-08 09:46:54 +08:00
parent 35cc309bd0
commit 7ec480914a
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue' import { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue'
import { Activity, ArchiveRestore, Check, Download, FileJson, GripVertical, LogOut, RefreshCw, Trash2, Upload, X } from 'lucide-vue-next' import { Activity, ArchiveRestore, Check, Download, FileJson, GripVertical, LogOut, Trash2, Upload, X } from 'lucide-vue-next'
import { moveItemWithinScope } from './lib/task-utils' import { moveItemWithinScope } from './lib/task-utils'
import { dateKey, habitButtonValue, isHabitComplete, isHabitScheduledToday, mergePage, nextHabitSwipeValue, previousHabitSwipeValue, readHabitGridCache, shouldToggleRowSwipe, writeHabitGridCache } from './lib/mvp-utils' import { dateKey, habitButtonValue, isHabitComplete, isHabitScheduledToday, mergePage, nextHabitSwipeValue, previousHabitSwipeValue, readHabitGridCache, shouldToggleRowSwipe, writeHabitGridCache } from './lib/mvp-utils'
import { csrfHeader } from './lib/csrf' import { csrfHeader } from './lib/csrf'
@@ -385,7 +385,7 @@ onBeforeUnmount(() => {
<template v-if="view === 'habits' || view === 'today-habits'"> <template v-if="view === 'habits' || view === 'today-habits'">
<header v-if="view === 'habits'" class="view-intro"> <header v-if="view === 'habits'" class="view-intro">
<div><small>把想坚持的事变成每天的日常</small><h2>习惯</h2></div> <div><small>把想坚持的事变成每天的日常</small><h2>习惯</h2></div>
<div class="habit-toolbar"><label><input v-model="hideCompletedHabits" type="checkbox"> 隐藏已完成</label><button class="soft-button" @click="loadHabits"><RefreshCw />刷新</button></div> <div class="habit-toolbar"><label><input v-model="hideCompletedHabits" type="checkbox"> 隐藏已完成</label></div>
</header> </header>
<!-- 今日习惯只展示今天该做的习惯复用正式习惯行样式 --> <!-- 今日习惯只展示今天该做的习惯复用正式习惯行样式 -->
+5
View File
@@ -31,6 +31,11 @@ describe('mobile navigation styles', () => {
}) })
describe('task and habit row decoration', () => { describe('task and habit row decoration', () => {
it('removes the redundant habit refresh action', () => {
expect(mvpPanel).not.toContain('<RefreshCw />刷新')
expect(mvpPanel).not.toContain('RefreshCw,')
})
it('supports vertical drag handles for reordering tasks and habits', () => { it('supports vertical drag handles for reordering tasks and habits', () => {
expect(app.match(/class="drag-handle task-drag-handle"/g)?.length).toBe(2) expect(app.match(/class="drag-handle task-drag-handle"/g)?.length).toBe(2)
expect(app).toContain('@pointerdown.stop="startTaskReorder') expect(app).toContain('@pointerdown.stop="startTaskReorder')