mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
fix(desktop): move overview language and repository totals into right rail
Place the aggregated Top Languages and Repositories sections under People in the overview's right rail, matching the single-project detail rail, instead of as standalone cards in the main column.
This commit is contained in:
@@ -291,65 +291,6 @@ export function ProjectsOverviewPanel({
|
||||
className="mt-3"
|
||||
/>
|
||||
</div>
|
||||
<div className="grid gap-4 sm:grid-cols-2">
|
||||
<div className="rounded-2xl border border-border/50 bg-muted/20 p-4">
|
||||
<h3 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">
|
||||
Top Languages
|
||||
</h3>
|
||||
<div className="mt-3">
|
||||
{languages.length > 0 ? (
|
||||
<LanguageChips languages={languages} />
|
||||
) : (
|
||||
<p className="text-sm text-muted-foreground">
|
||||
{scanning
|
||||
? "Scanning repositories..."
|
||||
: "No language data is available yet."}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="rounded-2xl border border-border/50 bg-muted/20 p-4">
|
||||
<h3 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">
|
||||
Repositories
|
||||
</h3>
|
||||
<dl className="mt-3 space-y-2 text-sm">
|
||||
<RepoTotalRow
|
||||
icon={FolderGit2}
|
||||
label="Repositories"
|
||||
value={projects.length}
|
||||
/>
|
||||
<RepoTotalRow
|
||||
icon={GitCommitHorizontal}
|
||||
label="Latest"
|
||||
mono
|
||||
value={
|
||||
repoTotals.latestCommit
|
||||
? repoTotals.latestCommit.shortHash
|
||||
: scanning
|
||||
? "..."
|
||||
: "None"
|
||||
}
|
||||
/>
|
||||
<RepoTotalRow
|
||||
icon={FileCode2}
|
||||
label="Files"
|
||||
value={
|
||||
scanning && repoTotals.files === 0 ? "..." : repoTotals.files
|
||||
}
|
||||
/>
|
||||
<RepoTotalRow
|
||||
icon={Users}
|
||||
label="Contributors"
|
||||
value={
|
||||
scanning && repoTotals.contributors === 0
|
||||
? "..."
|
||||
: repoTotals.contributors
|
||||
}
|
||||
/>
|
||||
<RepoTotalRow label="PRs" value={stats.prs} />
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<aside className="space-y-4 rounded-xl border border-border/50 bg-card/60 p-4">
|
||||
<OverviewRailSection title="People">
|
||||
@@ -375,6 +316,55 @@ export function ProjectsOverviewPanel({
|
||||
})}
|
||||
</div>
|
||||
</OverviewRailSection>
|
||||
<OverviewRailSection title="Top Languages">
|
||||
{languages.length > 0 ? (
|
||||
<LanguageChips languages={languages} />
|
||||
) : (
|
||||
<p className="text-sm text-muted-foreground">
|
||||
{scanning
|
||||
? "Scanning repositories..."
|
||||
: "No language data is available yet."}
|
||||
</p>
|
||||
)}
|
||||
</OverviewRailSection>
|
||||
<OverviewRailSection title="Repositories">
|
||||
<dl className="space-y-2 text-sm">
|
||||
<RepoTotalRow
|
||||
icon={FolderGit2}
|
||||
label="Repositories"
|
||||
value={projects.length}
|
||||
/>
|
||||
<RepoTotalRow
|
||||
icon={GitCommitHorizontal}
|
||||
label="Latest"
|
||||
mono
|
||||
value={
|
||||
repoTotals.latestCommit
|
||||
? repoTotals.latestCommit.shortHash
|
||||
: scanning
|
||||
? "..."
|
||||
: "None"
|
||||
}
|
||||
/>
|
||||
<RepoTotalRow
|
||||
icon={FileCode2}
|
||||
label="Files"
|
||||
value={
|
||||
scanning && repoTotals.files === 0 ? "..." : repoTotals.files
|
||||
}
|
||||
/>
|
||||
<RepoTotalRow
|
||||
icon={Users}
|
||||
label="Contributors"
|
||||
value={
|
||||
scanning && repoTotals.contributors === 0
|
||||
? "..."
|
||||
: repoTotals.contributors
|
||||
}
|
||||
/>
|
||||
<RepoTotalRow label="PRs" value={stats.prs} />
|
||||
</dl>
|
||||
</OverviewRailSection>
|
||||
</aside>
|
||||
</section>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user