From 572eb05b678e32557dfddd44796086ea631119b7 Mon Sep 17 00:00:00 2001 From: zasbu <136494048+zasbu@users.noreply.github.com> Date: Fri, 6 Nov 2026 19:49:15 +1100 Subject: [PATCH] Show time gaps behind a record in red --- web/src/features/activity/RecentRunTable.tsx | 6 +++++- web/src/features/legacy/LegacyRunDetailList.tsx | 2 +- web/src/features/maps/Leaderboard.tsx | 4 +++- web/src/features/runs/RunDetailList.tsx | 2 +- web/src/features/runs/RunDetails.tsx | 4 +--- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/web/src/features/activity/RecentRunTable.tsx b/web/src/features/activity/RecentRunTable.tsx index e89520c..94358af 100644 --- a/web/src/features/activity/RecentRunTable.tsx +++ b/web/src/features/activity/RecentRunTable.tsx @@ -155,7 +155,11 @@ export function RecentRunTable({ 0 + ? "text-danger" + : "text-text-subtle", )} > {run.gap < 0 diff --git a/web/src/features/legacy/LegacyRunDetailList.tsx b/web/src/features/legacy/LegacyRunDetailList.tsx index 5d79f26..51ea88a 100644 --- a/web/src/features/legacy/LegacyRunDetailList.tsx +++ b/web/src/features/legacy/LegacyRunDetailList.tsx @@ -37,7 +37,7 @@ export function LegacyRunDetailList({ {/* Behind the pre-2.0 record, put before the time as for 2.0 runs. */} {gap > 0 && ( - + {formatGap(gap)} )} diff --git a/web/src/features/maps/Leaderboard.tsx b/web/src/features/maps/Leaderboard.tsx index aea520d..42c3fc6 100644 --- a/web/src/features/maps/Leaderboard.tsx +++ b/web/src/features/maps/Leaderboard.tsx @@ -168,7 +168,9 @@ export function Leaderboard({ {!entry.legacy && entry.time === record ? ( WR ) : entry.time === fastest || fastest == null ? null : ( - formatGap(entry.time - fastest) + + {formatGap(entry.time - fastest)} + )} diff --git a/web/src/features/runs/RunDetailList.tsx b/web/src/features/runs/RunDetailList.tsx index 4ab4a21..0e9d2fc 100644 --- a/web/src/features/runs/RunDetailList.tsx +++ b/web/src/features/runs/RunDetailList.tsx @@ -42,7 +42,7 @@ export function RunDetailList({ {run.rank === 1 && WR} {/* Behind the record, put before the time as the Activity page does. */} {gap > 0 && ( - + {formatGap(gap)} )} diff --git a/web/src/features/runs/RunDetails.tsx b/web/src/features/runs/RunDetails.tsx index 34db013..facb2b6 100644 --- a/web/src/features/runs/RunDetails.tsx +++ b/web/src/features/runs/RunDetails.tsx @@ -130,9 +130,7 @@ function RunTime({ run, board }: { run: Schemas["RunDetail"]; board: string }) { {formatTime(run.time)} {gap > 0 && ( - - {formatGap(gap)} - + {formatGap(gap)} )} {/* Badges sit centred on the time; the gap above stays on its baseline, read as part of the time. */} {run.rank === 1 && (