Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion web/src/features/activity/RecentRunTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ export function RecentRunTable({
<span
className={classNames(
"mr-2 text-xs",
run.gap < 0 ? "text-success" : "text-text-subtle",
run.gap < 0
? "text-success"
: run.gap > 0
? "text-danger"
: "text-text-subtle",
)}
>
{run.gap < 0
Expand Down
2 changes: 1 addition & 1 deletion web/src/features/legacy/LegacyRunDetailList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function LegacyRunDetailList({
<LegacyBadge />
{/* Behind the pre-2.0 record, put before the time as for 2.0 runs. */}
{gap > 0 && (
<span className="text-text-subtle text-xs font-normal">
<span className="text-danger text-xs font-normal">
{formatGap(gap)}
</span>
)}
Expand Down
4 changes: 3 additions & 1 deletion web/src/features/maps/Leaderboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ export function Leaderboard({
{!entry.legacy && entry.time === record ? (
<Badge tone="accent">WR</Badge>
) : entry.time === fastest || fastest == null ? null : (
formatGap(entry.time - fastest)
<span className="text-danger">
{formatGap(entry.time - fastest)}
</span>
)}
</TableCell>
<TableCell numeric className="text-text-muted">
Expand Down
2 changes: 1 addition & 1 deletion web/src/features/runs/RunDetailList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function RunDetailList({
{run.rank === 1 && <Badge tone="accent">WR</Badge>}
{/* Behind the record, put before the time as the Activity page does. */}
{gap > 0 && (
<span className="text-text-subtle text-xs font-normal">
<span className="text-danger text-xs font-normal">
{formatGap(gap)}
</span>
)}
Expand Down
4 changes: 1 addition & 3 deletions web/src/features/runs/RunDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,7 @@ function RunTime({ run, board }: { run: Schemas["RunDetail"]; board: string }) {
{formatTime(run.time)}
</span>
{gap > 0 && (
<span className="text-text-subtle tabular-nums">
{formatGap(gap)}
</span>
<span className="text-danger tabular-nums">{formatGap(gap)}</span>
)}
{/* Badges sit centred on the time; the gap above stays on its baseline, read as part of the time. */}
{run.rank === 1 && (
Expand Down