From ff78fb8b7948013968c1a8ca02e4398b57f5e4c9 Mon Sep 17 00:00:00 2001 From: Thomas Kemmer Date: Mon, 25 Mar 2024 00:07:36 +0100 Subject: [PATCH] Add faster/slower indicator to lap details. --- .../rms/leaderboard/leaderboard-head.component.html | 2 +- .../rms/leaderboard/leaderboard-head.component.ts | 1 + .../rms/leaderboard/leaderboard-lap.component.html | 12 ++++++++++++ src/app/rms/leaderboard/leaderboard-lap.component.ts | 1 + src/app/rms/leaderboard/leaderboard.component.html | 10 ++++++++-- src/app/rms/leaderboard/leaderboard.component.ts | 4 ++-- 6 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/app/rms/leaderboard/leaderboard-head.component.html b/src/app/rms/leaderboard/leaderboard-head.component.html index 328a26ae..2844693b 100644 --- a/src/app/rms/leaderboard/leaderboard-head.component.html +++ b/src/app/rms/leaderboard/leaderboard-head.component.html @@ -1,4 +1,4 @@ -
+
POS
diff --git a/src/app/rms/leaderboard/leaderboard-head.component.ts b/src/app/rms/leaderboard/leaderboard-head.component.ts index 89e55c28..46127ca9 100644 --- a/src/app/rms/leaderboard/leaderboard-head.component.ts +++ b/src/app/rms/leaderboard/leaderboard-head.component.ts @@ -8,4 +8,5 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; }) export class LeaderboardHeadComponent { @Input() fields: string[]; + @Input() pos: boolean; // FIXME: move to fields? } diff --git a/src/app/rms/leaderboard/leaderboard-lap.component.html b/src/app/rms/leaderboard/leaderboard-lap.component.html index baa292b6..bf8aaeb6 100644 --- a/src/app/rms/leaderboard/leaderboard-lap.component.html +++ b/src/app/rms/leaderboard/leaderboard-lap.component.html @@ -28,5 +28,17 @@ {{times[0] - times[3] | time:'s.sss'}} + + + + + +
diff --git a/src/app/rms/leaderboard/leaderboard-lap.component.ts b/src/app/rms/leaderboard/leaderboard-lap.component.ts index 9b37cdfa..58af17ac 100644 --- a/src/app/rms/leaderboard/leaderboard-lap.component.ts +++ b/src/app/rms/leaderboard/leaderboard-lap.component.ts @@ -13,6 +13,7 @@ export class LeaderboardLapComponent { @Input() item: LeaderboardItem; @Input() times: number[]; @Input() best: number[]; + @Input() last: number[]; @Input() intlap: number; @Input() fields: string[]; } diff --git a/src/app/rms/leaderboard/leaderboard.component.html b/src/app/rms/leaderboard/leaderboard.component.html index 949f783c..50e132db 100644 --- a/src/app/rms/leaderboard/leaderboard.component.html +++ b/src/app/rms/leaderboard/leaderboard.component.html @@ -1,4 +1,4 @@ - + + [lap]="n - i" + [item]="detail" + [times]="times" + [best]="best" + [last]="detail?.laptimes[i + 1]" + [intlap]="intlaps[detail?.id]" + [fields]="detailFields"> diff --git a/src/app/rms/leaderboard/leaderboard.component.ts b/src/app/rms/leaderboard/leaderboard.component.ts index f65a4d1e..8e0538e6 100644 --- a/src/app/rms/leaderboard/leaderboard.component.ts +++ b/src/app/rms/leaderboard/leaderboard.component.ts @@ -35,8 +35,8 @@ const FIELDS = [{ }]; const DETAIL_FIELDS = [ - 'lap laptime gap int', - 'lap laptime sector1 sector2 sector3' + 'lap laptime gap int status', + 'lap laptime sector1 sector2 sector3 status' ]; export class LeaderboardItem {