auto-sync: 2026-05-20 14:01:42

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