fix(ui): Toast 撤销可暂停,存储告警提升为全局

- Toast 自动关闭支持悬停/聚焦暂停,移开后按剩余时间继续
- 存储异常提示移到 App 级,看板与今日视图都能看到
- 归档隐藏与筛选隐藏分开说明,并提示列内排序暂停原因
This commit is contained in:
chenshoulin
2026-10-19 17:21:05 +08:00
parent f69a24de94
commit 4aba003a9e
8 changed files with 198 additions and 25 deletions
+17
View File
@@ -5,6 +5,7 @@ import { createMemoryHistory } from 'vue-router'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { SCHEMA_VERSION } from '@/data/schema'
import { useTaskStore } from '@/stores/tasks'
import App from './App.vue'
import { createAppRouter } from './router'
@@ -98,6 +99,22 @@ describe('App 端到端(真实 localStorage)', () => {
expect(wrapper.findComponent({ name: 'PwaUpdatePrompt' }).exists()).toBe(true)
wrapper.unmount()
})
it('存储异常提示在应用级可见,切换视图也不消失', async () => {
const { wrapper, router } = await mountApp('/today')
const store = useTaskStore()
store.notice = '本地存储不可用'
await nextTick()
expect(wrapper.find('[role="alert"]').text()).toContain('本地存储不可用')
await router.push('/')
await nextTick()
expect(wrapper.find('[role="alert"]').text()).toContain('本地存储不可用')
wrapper.unmount()
})
})
describe('App 路由', () => {