Hide Tags and Latest columns for system projects in package table

This commit is contained in:
Mondo Diaz
2026-01-30 12:55:28 -06:00
parent 924826f07a
commit 7b5b0c78d8

View File

@@ -348,14 +348,14 @@ function ProjectPage() {
header: 'Format', header: 'Format',
render: (pkg: Package) => <Badge variant="default">{pkg.format}</Badge>, render: (pkg: Package) => <Badge variant="default">{pkg.format}</Badge>,
}] : []), }] : []),
{ ...(!project?.is_system ? [{
key: 'tag_count', key: 'tag_count',
header: 'Tags', header: 'Tags',
render: (pkg) => pkg.tag_count ?? '—', render: (pkg: Package) => pkg.tag_count ?? '—',
}, }] : []),
{ {
key: 'artifact_count', key: 'artifact_count',
header: 'Artifacts', header: project?.is_system ? 'Versions' : 'Artifacts',
render: (pkg) => pkg.artifact_count ?? '—', render: (pkg) => pkg.artifact_count ?? '—',
}, },
{ {
@@ -364,12 +364,12 @@ function ProjectPage() {
render: (pkg) => render: (pkg) =>
pkg.total_size !== undefined && pkg.total_size > 0 ? formatBytes(pkg.total_size) : '—', pkg.total_size !== undefined && pkg.total_size > 0 ? formatBytes(pkg.total_size) : '—',
}, },
{ ...(!project?.is_system ? [{
key: 'latest_tag', key: 'latest_tag',
header: 'Latest', header: 'Latest',
render: (pkg) => render: (pkg: Package) =>
pkg.latest_tag ? <strong style={{ color: 'var(--accent-primary)' }}>{pkg.latest_tag}</strong> : '—', pkg.latest_tag ? <strong style={{ color: 'var(--accent-primary)' }}>{pkg.latest_tag}</strong> : '—',
}, }] : []),
{ {
key: 'created_at', key: 'created_at',
header: 'Created', header: 'Created',