先看全貌再收窄更顺;Web 默认仍停在「今天」,安卓默认仍是「进行中」,都不靠下标取默认值。 两端一起改,免得同一页两个顺序。
This commit is contained in:
@@ -42,12 +42,13 @@ import com.dadao.task.data.Item
|
|||||||
import com.dadao.task.data.Workspace
|
import com.dadao.task.data.Workspace
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
// 「全部」放第一个,与 Web 任务页保持一致;默认选中的视图在下面单独定,不靠顺序。
|
||||||
private val views = listOf(
|
private val views = listOf(
|
||||||
|
"all" to "全部",
|
||||||
"today" to "今天",
|
"today" to "今天",
|
||||||
"active" to "进行中",
|
"active" to "进行中",
|
||||||
"inbox" to "收件箱",
|
"inbox" to "收件箱",
|
||||||
"done" to "已完成",
|
"done" to "已完成",
|
||||||
"all" to "全部",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
|||||||
@@ -16,12 +16,14 @@ import { ApiError, api } from "../lib/client";
|
|||||||
import { PRIORITY_LABEL, STATUS_LABEL, parseQuickAdd } from "../lib/parse";
|
import { PRIORITY_LABEL, STATUS_LABEL, parseQuickAdd } from "../lib/parse";
|
||||||
import type { Item, ItemStatus, Page } from "../lib/types";
|
import type { Item, ItemStatus, Page } from "../lib/types";
|
||||||
|
|
||||||
|
// 「全部」放第一个:它是这一页的总览入口,先看全貌再收窄到某个视图更顺;
|
||||||
|
// 默认仍停在「今天」,因为日常打开最关心的是今天要做完的。
|
||||||
const VIEWS: { key: string; label: string; hint: string; createAs: ItemStatus }[] = [
|
const VIEWS: { key: string; label: string; hint: string; createAs: ItemStatus }[] = [
|
||||||
|
{ key: "all", label: "全部", hint: "含已取消", createAs: "todo" },
|
||||||
{ key: "today", label: "今天", hint: "今天之前到期、还没做完的", createAs: "todo" },
|
{ key: "today", label: "今天", hint: "今天之前到期、还没做完的", createAs: "todo" },
|
||||||
{ key: "active", label: "进行中", hint: "待办 + 进行中 + 被阻塞", createAs: "todo" },
|
{ key: "active", label: "进行中", hint: "待办 + 进行中 + 被阻塞", createAs: "todo" },
|
||||||
{ key: "inbox", label: "收件箱", hint: "想到还没归类的事", createAs: "inbox" },
|
{ key: "inbox", label: "收件箱", hint: "想到还没归类的事", createAs: "inbox" },
|
||||||
{ key: "done", label: "已完成", hint: "最近完成的", createAs: "todo" },
|
{ key: "done", label: "已完成", hint: "最近完成的", createAs: "todo" },
|
||||||
{ key: "all", label: "全部", hint: "含已取消", createAs: "todo" },
|
|
||||||
];
|
];
|
||||||
|
|
||||||
function dueLabel(iso: string | null): { text: string; overdue: boolean } | null {
|
function dueLabel(iso: string | null): { text: string; overdue: boolean } | null {
|
||||||
|
|||||||
Reference in New Issue
Block a user