From 4d3a4d2c676c88efbfa2e75f02dfcd54475e1f00 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Sat, 23 May 2026 12:41:33 +0800 Subject: [PATCH] auto-sync: 2026-05-23 12:41:33 --- src/frontend/src/components/EdictBoard.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/frontend/src/components/EdictBoard.tsx b/src/frontend/src/components/EdictBoard.tsx index ca4e677..f08dded 100644 --- a/src/frontend/src/components/EdictBoard.tsx +++ b/src/frontend/src/components/EdictBoard.tsx @@ -425,6 +425,24 @@ export default function EdictBoard() { const reviewCount = topLevelTasks.filter(t => !t.archived && t.status === 'review').length; const archivedCount = topLevelTasks.filter(t => t.archived).length; + // 下拉菜单数字:从 v2tasks 聚合(单一数据源,与看板统计一致) + const topLevelAll = (v2tasks as any[]).filter(t => !t.parent_task); + const countByProjectAndFilter = (pid: string) => { + return topLevelAll.filter(t => { + if (t._projectId !== pid) return false; + if (archiveFilter === 'archived') return !!t.archived; + if (archiveFilter === 'active') return !t.archived; + return true; + }).length; + }; + const countAllByFilter = () => { + return topLevelAll.filter(t => { + if (archiveFilter === 'archived') return !!t.archived; + if (archiveFilter === 'active') return !t.archived; + return true; + }).length; + }; + if (v2tasksLoading && tasks.length === 0) return ; return (