auto-sync: 2026-05-20 13:21:58

This commit is contained in:
cfdaily
2026-05-20 13:21:58 +08:00
parent 3c71bf898d
commit ec3ea9a36d
+5 -3
View File
@@ -414,12 +414,14 @@ export const useStore = create<AppStore>((set, get) => ({
const pid = get().selectedProjectId;
set({ v2tasksLoading: true });
try {
if (!pid) {
// 全部任务模式:聚合所有项目
if (!pid || pid === '__general__') {
// 全部/一般任务模式:聚合项目
const isGeneral = pid === '__general__';
const projRes = await fetch('/api/projects');
if (!projRes.ok) { set({ v2tasks: [], v2tasksLoading: false }); return; }
const projData = await projRes.json();
const allPids = Object.keys(projData.projects || {});
let allPids = Object.keys(projData.projects || {});
if (isGeneral) allPids = allPids.filter(p => !p.startsWith('e2e-'));
const allTasks: any[] = [];
for (const p of allPids) {
try {