fix: 服务器数据纪元保护(空快照不清空本地,自动全量重推自救) / 详情页导出指定日 / 全局计时时钟面板
This commit is contained in:
@@ -379,6 +379,12 @@ export async function listPlansByDate(date: string): Promise<PlanItem[]> {
|
||||
return rows.sort((a, b) => (a.start_time < b.start_time ? -1 : 1))
|
||||
}
|
||||
|
||||
// 全局计时时钟面板:查找正在进行中的计时任务(跨日期,任意一天开始的都算)
|
||||
export async function listRunningPlan(): Promise<PlanItem | null> {
|
||||
const rows = await db.plan.filter(p => !!p.timer_started_at).toArray()
|
||||
return rows.length ? rows[0] : null
|
||||
}
|
||||
|
||||
export async function addPlan(input: PlanInput): Promise<void> {
|
||||
const now = nowLocalISO()
|
||||
await db.plan.add({
|
||||
|
||||
Reference in New Issue
Block a user