This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
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 { dateKey, habitButtonValue, isHabitComplete, isHabitScheduledToday, mergePage, nextHabitSwipeValue, previousHabitSwipeValue, readHabitGridCache, shouldToggleRowSwipe, writeHabitGridCache } from './lib/mvp-utils'
|
||||
import { csrfHeader } from './lib/csrf'
|
||||
@@ -385,7 +385,7 @@ onBeforeUnmount(() => {
|
||||
<template v-if="view === 'habits' || view === 'today-habits'">
|
||||
<header v-if="view === 'habits'" class="view-intro">
|
||||
<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>
|
||||
|
||||
<!-- 今日习惯:只展示“今天该做”的习惯,复用正式习惯行样式 -->
|
||||
|
||||
@@ -31,6 +31,11 @@ describe('mobile navigation styles', () => {
|
||||
})
|
||||
|
||||
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', () => {
|
||||
expect(app.match(/class="drag-handle task-drag-handle"/g)?.length).toBe(2)
|
||||
expect(app).toContain('@pointerdown.stop="startTaskReorder')
|
||||
|
||||
Reference in New Issue
Block a user