| |
let searchInput = $state("");
|
| |
let showSearch = $state(false);
|
| |
|
| + |
const delegateDids = $derived(repo.delegates.map(d => d.did));
|
| + |
|
| + |
// A redaction is "trusted" when its peer is the artifact author or a
|
| + |
// repo delegate. The detail view already blurs the artifact in that
|
| + |
// case; here we hide the whole release if every artifact has been
|
| + |
// redacted that way so the list isn't cluttered with withdrawn rows.
|
| + |
function isFullyRedacted(release: (typeof releases)[number]): boolean {
|
| + |
if (release.artifacts.length === 0) return false;
|
| + |
return release.artifacts.every(a =>
|
| + |
a.redactions.some(
|
| + |
r => r.peer.did === a.author.did || delegateDids.includes(r.peer.did),
|
| + |
),
|
| + |
);
|
| + |
}
|
| + |
|
| |
// Releases without artifacts are placeholders the user hasn't published
|
| |
// anything to yet — keep them off the list so it shows actual deliverables.
|
| |
const visibleReleases = $derived(
|
| - |
releases.filter(r => r.artifacts.length > 0),
|
| + |
releases.filter(r => r.artifacts.length > 0 && !isFullyRedacted(r)),
|
| |
);
|
| |
|
| |
const searchable = $derived(
|