fix(tasks): 任务页「全部」挪到第一个 tab
CI / backend (push) Canceled after 0s

先看全貌再收窄更顺;Web 默认仍停在「今天」,安卓默认仍是「进行中」,都不靠下标取默认值。
两端一起改,免得同一页两个顺序。
This commit is contained in:
2026-11-05 18:54:59 +08:00
parent 2a9d72a974
commit 33a3fc03e0
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -16,12 +16,14 @@ import { ApiError, api } from "../lib/client";
import { PRIORITY_LABEL, STATUS_LABEL, parseQuickAdd } from "../lib/parse";
import type { Item, ItemStatus, Page } from "../lib/types";
// 「全部」放第一个:它是这一页的总览入口,先看全貌再收窄到某个视图更顺;
// 默认仍停在「今天」,因为日常打开最关心的是今天要做完的。
const VIEWS: { key: string; label: string; hint: string; createAs: ItemStatus }[] = [
{ key: "all", label: "全部", hint: "含已取消", createAs: "todo" },
{ key: "today", label: "今天", hint: "今天之前到期、还没做完的", createAs: "todo" },
{ key: "active", label: "进行中", hint: "待办 + 进行中 + 被阻塞", createAs: "todo" },
{ key: "inbox", label: "收件箱", hint: "想到还没归类的事", createAs: "inbox" },
{ key: "done", label: "已完成", hint: "最近完成的", createAs: "todo" },
{ key: "all", label: "全部", hint: "含已取消", createAs: "todo" },
];
function dueLabel(iso: string | null): { text: string; overdue: boolean } | null {