fix(overlay): show every driver, compact rows beyond 12 (1.42.6)
The overlay page cut the leaderboard at 12 drivers. It now shows all of them, with compact rows when there are more than 12 so they fit on a TV.
This commit is contained in:
1 parent
2c2b16537e
commit
0cabe1f96f
6 files changed
+29
-5
No files matched your search
+4
-1
@@ -66,8 +66,11 @@ export function renderOverlayLeaderboard(rows, { t, escapeHtml, formatTeamActive
|
||||
const sortAttrs = sortable
|
||||
? ` data-sort-id="overlay-leaderboard" data-sort-text-columns="1" data-sort-labels="${sortValuesAttribute([t("table.pos"), t("table.driver"), t("table.laps"), t("table.result"), t("table.gap"), t("table.ahead_gap"), t("table.own_delta"), t("table.best_lap")])}"`
|
||||
: "";
|
||||
// More than 12 cars (a busy Open Practice): compact rows so all of them fit on a TV that
|
||||
// can't scroll - no per-cell labels (the header names the columns), sub-line or prediction bar.
|
||||
const compact = rows.length > 12;
|
||||
return `
|
||||
<div class="overlay-race-list"${sortAttrs}>
|
||||
<div class="overlay-race-list ${compact ? "overlay-race-list-compact" : ""}"${sortAttrs}>
|
||||
${rows
|
||||
.map((row, idx) => {
|
||||
const posClass = idx === 0 ? "pos-1" : idx === 1 ? "pos-2" : idx === 2 ? "pos-3" : "";
|
||||
|
||||
Reference in new issue
Block a user