auto-sync: 2026-05-21 00:13:03

This commit is contained in:
cfdaily
2026-05-21 00:13:03 +08:00
parent f9c6ad76ee
commit 55a672d197
+5 -16
View File
@@ -472,22 +472,11 @@ export default function EdictBoard() {
}}
>
<option value="">📋 ({v2tasks.length})</option>
{(() => {
const counts: Record<string, number> = {};
(v2tasks || []).forEach((t: any) => {
const p = t._projectId || '_general';
counts[p] = (counts[p] || 0) + 1;
});
return (
<>
<option value="_general">📝 ({counts['_general'] || 0})</option>
<option disabled style={{ color: '#555' }}> </option>
{Object.entries(projects).filter(([pid]) => !pid.startsWith('_') && pid !== '__general__').map(([pid, info]: [string, any]) => (
<option key={pid} value={pid}>📁 {info.name || pid} ({counts[pid] || 0})</option>
))}
</>
);
})()}
<option value="_general">📝 ({(projects['_general'] as any)?.task_count ?? 0})</option>
<option disabled style={{ color: '#555' }}> </option>
{Object.entries(projects).filter(([pid]) => !pid.startsWith('_') && pid !== '__general__').map(([pid, info]: [string, any]) => (
<option key={pid} value={pid}>📁 {info.name || pid} ({info.task_count ?? 0})</option>
))}}
</select>
{selectedProjectId && !selectedProjectId.startsWith('_') && selectedProjectId !== '__general__' && (() => {
const pInfo = projects[selectedProjectId] as any;