feat(ux): run sessions from Race Day with quick actions
Race Day gets Start practice, New track layout and Create race, a session picker, only the buttons that apply, and New practice day (replaces Reset data on Timing; laps stay in the training stats). Timing is for following and links to Race Day. The Dashboard shows the three common tasks first. Guide, READMEs, screenshot and the "Run a session" video follow the flow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3a6789f42f
commit
c4df90706a
23 files changed
+344
-111
No files matched your search
@@ -66,6 +66,7 @@ export function renderDashboardView(deps) {
|
||||
playFinishSiren,
|
||||
escapeHtml,
|
||||
addTrackLayout,
|
||||
startPracticeNow = async () => false,
|
||||
} = deps;
|
||||
|
||||
const active = getActiveSession();
|
||||
@@ -78,6 +79,11 @@ export function renderDashboardView(deps) {
|
||||
|
||||
dom.view.innerHTML = `
|
||||
${renderTrackLayoutBar({ state, t, escapeHtml, showNewButton: !active || isPracticeSessionType(active.type) })}
|
||||
<section class="dashboard-quick mt-16" aria-label="${escapeHtml(t("dashboard.quick_title"))}">
|
||||
<button class="btn btn-primary dashboard-quick-btn" type="button" id="dashboardQuickPractice"><strong>▶ ${t("dashboard.quick_practice")}</strong><small>${t("dashboard.quick_practice_hint")}</small></button>
|
||||
<button class="btn dashboard-quick-btn" type="button" id="dashboardQuickRace"><strong>🏁 ${t("dashboard.quick_race")}</strong><small>${t("dashboard.quick_race_hint")}</small></button>
|
||||
<button class="btn dashboard-quick-btn" type="button" id="dashboardQuickSeries"><strong>🏆 ${t("dashboard.quick_series")}</strong><small>${t("dashboard.quick_series_hint")}</small></button>
|
||||
</section>
|
||||
<section class="panel dashboard-workflow mt-16">
|
||||
<div class="panel-header">
|
||||
<div>
|
||||
@@ -210,6 +216,13 @@ export function renderDashboardView(deps) {
|
||||
document.getElementById("workflowDrivers")?.addEventListener("click", () => navigateTo("drivers"));
|
||||
document.getElementById("workflowRaceSetup")?.addEventListener("click", () => navigateTo("race_setup"));
|
||||
document.getElementById("workflowRaceDay")?.addEventListener("click", () => navigateTo("race_day"));
|
||||
// The three things a club evening usually starts with.
|
||||
document.getElementById("dashboardQuickPractice")?.addEventListener("click", async () => {
|
||||
navigateTo("race_day");
|
||||
await startPracticeNow();
|
||||
});
|
||||
document.getElementById("dashboardQuickRace")?.addEventListener("click", () => navigateTo("race_setup"));
|
||||
document.getElementById("dashboardQuickSeries")?.addEventListener("click", () => navigateTo("series"));
|
||||
document.getElementById("workflowTiming")?.addEventListener("click", () => navigateTo("timing"));
|
||||
document.getElementById("workflowOverlay")?.addEventListener("click", () => navigateTo("overlay"));
|
||||
|
||||
|
||||
Reference in new issue
Block a user