feat(race-day): fold run heats in today's schedule and mark the next heat (1.54.0)

This commit is contained in:
larssand committed 2026-11-02 08:30:01 +01:00
1 parent 73e3d1ff75
commit d0248b1960
9 files changed
+44 -12

No files matched your search

+9 -1
View File
@@ -375,6 +375,7 @@ const AUTOPILOT_STORAGE_KEY = "rc_day_autopilot";
let autopilotDate = (() => { try { return sessionStorage.getItem(AUTOPILOT_STORAGE_KEY) || ""; } catch { return ""; } })();
let autopilotStatus = "";
let autopilotLaunchingId = null;
let dayShowDone = false;
const todayKey = () => { const d = new Date(); return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`; };
const getDayPlan = (date) => getRaceDay(state.raceDays, date);
const saveDayPlan = (day) => { state.raceDays = upsertRaceDay(state.raceDays, day); saveState(); };
@@ -499,7 +500,7 @@ function moveDaySession(date, sessionId, step) {
const formatDayClock = (ts) => formatClockTime(ts);
const renderDaySchedule = () => {
const date = getRaceDayDate();
return renderDaySchedulePanel({ t, escapeHtml, date, day: getDayPlan(date), rows: buildDayRows(date), autopilotHere: autopilotDate === date, autopilotStatus: autopilotDate === date ? autopilotStatus : "", getClassLabel: getDayClassLabel });
return renderDaySchedulePanel({ t, escapeHtml, date, day: getDayPlan(date), rows: buildDayRows(date), autopilotHere: autopilotDate === date, autopilotStatus: autopilotDate === date ? autopilotStatus : "", getClassLabel: getDayClassLabel, showDone: dayShowDone });
};
const bindDaySchedule = (root) => {
const date = getRaceDayDate();
@@ -514,6 +515,7 @@ const bindDaySchedule = (root) => {
setAutopilot(date, on);
},
onPause: () => pauseRaceDay(date),
onToggleDone: () => { dayShowDone = !dayShowDone; renderView(); },
onResume: () => resumeRaceDay(date),
});
};
@@ -2871,6 +2873,9 @@ const TRANSLATIONS = {
"day.board": "Förarvy",
"day.start_time": "Första start",
"day.gap": "Paus mellan heat (min)",
"day.show_done": "✓ {count} heat körda – visa",
"day.hide_done": "Dölj körda heat ({count})",
"day.next": "Nästa",
"day.call_min": "Upprop (min innan)",
"day.call_title": "{name} startar {time} (om {min} min) – dags att ropa upp",
"day.call_now": "Ropa ut",
@@ -4825,6 +4830,9 @@ const TRANSLATIONS = {
"day.board": "Drivers' board",
"day.start_time": "First start",
"day.gap": "Break between heats (min)",
"day.show_done": "✓ {count} heats run – show",
"day.hide_done": "Hide run heats ({count})",
"day.next": "Next",
"day.call_min": "Call (min before)",
"day.call_title": "{name} starts at {time} (in {min} min) – time to call it",
"day.call_now": "Call now",