Skip to content

Commit

Permalink
Merge pull request #2646 from GreenAsJade/final_action_timing_to_the_top
Browse files Browse the repository at this point in the history
"Final action" to the top of game timings
  • Loading branch information
anoek authored Apr 1, 2024
2 parents e94db3c + bf6deaf commit 037a9cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/views/Game/GameTimings.styl
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,9 @@
.span-4 {
grid-column: span 4;
}

.final-action-row {
grid-row: 2; // final action time at the top for easy viewing in escape cases
padding-bottom: 0.2rem;
}
}
7 changes: 3 additions & 4 deletions src/views/Game/GameTimings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,16 @@ export function GameTimings(props: GameTimingProperties): JSX.Element {
<div>Totals:</div>
<div>{moment.duration(black_elapsed).format()}</div>
<div>{moment.duration(white_elapsed).format()}</div>
<div>{/* empty cell at end of row */}</div>
<div className="span-3">Final action:</div>
<div>
<div>{moment.duration(game_elapsed).format()}</div>
<div className="span-3 final-action-row">Final action:</div>
<div className="final-action-row">
{props.end_time &&
show_seconds_resolution(
moment
.duration(props.end_time - props.start_time, "seconds")
.subtract(game_elapsed),
)}
</div>
<div>{/* empty cell at end of row */}</div>
</div>
);
}
Expand Down

0 comments on commit 037a9cd

Please sign in to comment.