This commit is contained in:
null 2026-05-26 17:08:59 -05:00
parent b92726df66
commit 8af11125cc
2 changed files with 9 additions and 2 deletions

View File

@ -1482,6 +1482,7 @@ export default function DashboardPage() {
hasLineStats={forgejoHeatmapQuery.data?.has_line_stats ?? false}
lastPush={forgejoLastPushQuery.data ?? null}
isLoading={forgejoHeatmapQuery.isLoading}
selectedRepositoryName={selectedForgejoRepository?.display_name ?? null}
/>
</div>

View File

@ -18,6 +18,7 @@ interface ForgejoHeatmapProps {
hasLineStats?: boolean;
lastPush?: ForgejoLastPush | null;
isLoading?: boolean;
selectedRepositoryName?: string | null;
}
// ── Line chart layout ──────────────────────────────────────────────────────
@ -496,10 +497,12 @@ function HeatmapGrid({
days,
range,
onRangeChange,
repositoryName,
}: {
days: ForgejoHeatmapDay[];
range: RangeKey;
onRangeChange: (r: RangeKey) => void;
repositoryName?: string | null;
}) {
const [hoveredDay, setHoveredDay] = useState<ActivityDatum | null>(null);
const heatmap = useMemo(() => {
@ -807,8 +810,9 @@ function HeatmapGrid({
{heatmap.totalEvents.toLocaleString()}
</span>
<span className="ml-1.5 text-sm" style={{ color: W70 }}>
commits across all tracked repositories in the last{" "}
{RANGE_SUMMARY[range]}
{repositoryName
? `commits across the ${repositoryName} repository in the last ${RANGE_SUMMARY[range]}`
: `commits across all tracked repositories in the last ${RANGE_SUMMARY[range]}`}
</span>
</p>
</div>
@ -823,6 +827,7 @@ export function ForgejoHeatmap({
hasLineStats = false,
lastPush = null,
isLoading = false,
selectedRepositoryName = null,
}: ForgejoHeatmapProps) {
const [lineRange, setLineRange] = useState<RangeKey>("14d");
const [heatRange, setHeatRange] = useState<RangeKey>("14d");
@ -872,6 +877,7 @@ export function ForgejoHeatmap({
days={days}
range={heatRange}
onRangeChange={setHeatRange}
repositoryName={selectedRepositoryName}
/>
</section>
</div>