This commit is contained in:
th committed 2026-04-07 08:20:48 +02:00
1 parent 69a3a27348
commit 03f57cbaee
8 files changed
+136 -46

No files matched your search

+16 -1
View File
@@ -51,7 +51,16 @@ export function renderBoard() {
cards = parent ? [parent, ...getChildren(parent.id)] : [];
} else {
cards = state.cards.filter(c => !c.parent_id);
if (state.activeBucket === 'none') cards = cards.filter(c => !c.bucket_id);
if (state.activeBucket === 'current') {
const recent = getRecent();
const now = Date.now();
const freshMs = 48 * 60 * 60 * 1000; // 48h
cards = cards.filter(c => {
if (recent.includes(String(c.id))) return true;
const updated = new Date(c.updated_at || c.created_at || 0).getTime();
return (now - updated) < freshMs;
});
} else if (state.activeBucket === 'none') cards = cards.filter(c => !c.bucket_id);
else if (state.activeBucket !== 'all') cards = cards.filter(c => c.bucket_id == state.activeBucket);
}
cards = sortedCards(cards);
@@ -64,6 +73,8 @@ export function renderBoard() {
board.innerHTML = `<div class="col-span-full text-center py-20">
<i class="ph ph-cards text-4xl text-t-dim mb-4 block"></i>
<p class="font-pixel text-sm text-t-dim cursor-blink">no cards found</p></div>`;
const fc = $('footer-count');
if (fc) fc.textContent = `0 cards · ${state.cards.length} total`;
return;
}
@@ -105,6 +116,10 @@ export function renderBoard() {
}).join('');
bindCardEvents();
// Footer count
const fc = $('footer-count');
if (fc) fc.textContent = `${cards.length} card${cards.length !== 1 ? 's' : ''} · ${state.cards.length} total`;
}
// ── Group bar ──