feat(results): qualifying place (TQ) next to final results and podium bands for the top three (1.74.0)
This commit is contained in:
1 parent
41043a990d
commit
fee9f8073d
12 files changed
+149
-38
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { medal } from "./medal.js";
|
||||
import { medal, qualCell } from "./medal.js";
|
||||
export function renderRaceFormatField(labelKey, hintKey, controlHtml, options = {}, { t }) {
|
||||
const extraClass = options.checkbox ? " field-card-checkbox" : "";
|
||||
return `
|
||||
@@ -211,12 +211,14 @@ export function renderRaceStandingsTable(rows, emptyLabel, { t, renderTable, esc
|
||||
return `<p>${emptyLabel}</p>`;
|
||||
}
|
||||
|
||||
const withQual = rows.some((row) => row.qual);
|
||||
return renderTable(
|
||||
[t("table.pos"), t("table.driver"), t("table.score")],
|
||||
[t("table.pos"), ...(withQual ? [t("table.qual")] : []), t("table.driver"), t("table.score")],
|
||||
rows.map(
|
||||
(row) => `
|
||||
<tr>
|
||||
<td>${medal(row.rank)}</td>
|
||||
${withQual ? qualCell(row.qual, escapeHtml) : ""}
|
||||
<td>${escapeHtml(row.driverName || t("common.unknown_driver"))}</td>
|
||||
<td>
|
||||
<div class="table-primary">${escapeHtml(row.score || "-")}</div>
|
||||
|
||||
Reference in new issue
Block a user