diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f8039d..22c7541 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ No changes recorded yet. - **Race Day is where sessions are run.** Quick actions at the top: **Start practice** (continues today's Open Practice or creates and starts a new one), **New track layout** (only for practice; the running practice moves onto it) and **Create race**. A session picker switches session without going to Timing. Only the buttons that apply are shown (no greyed-out Pause before a start), with practice wording (Pause practice / Finish practice) and no start lights for practice. - **New practice day** on Race Day replaces "Reset data" on Timing: clears today's timing for the selected Open Practice while every lap stays in the training stats. - **Timing is for following.** Start, stop and reset moved to Race Day; Timing keeps the session picker, the leaderboard and lap clean-up, with a link to Race Day. Opening a session from Race Setup now goes to Race Day. +- Run buttons use traffic-light colours: green starts or resumes (also Go now and the count-down's Resume), amber pauses or holds, red finishes. The Start practice button turns green with a pulsing dot while the practice runs, and amber while it is paused. - The Dashboard shows the three common tasks first: Start practice, Create race and Series / cup. - The guide, both READMEs, the Race Day screenshot and the "Run a session" video follow the new flow (count-down, hold, To 10 s, pause, finish). diff --git a/docs/screenshots/race-day.jpg b/docs/screenshots/race-day.jpg index a35dd34..6229b63 100644 Binary files a/docs/screenshots/race-day.jpg and b/docs/screenshots/race-day.jpg differ diff --git a/src/core_views.js b/src/core_views.js index 913f65a..1de4adb 100644 --- a/src/core_views.js +++ b/src/core_views.js @@ -80,7 +80,7 @@ export function renderDashboardView(deps) { dom.view.innerHTML = ` ${renderTrackLayoutBar({ state, t, escapeHtml, showNewButton: !active || isPracticeSessionType(active.type) })}
- +
diff --git a/src/race_day_view.js b/src/race_day_view.js index dc323c4..7d283f5 100644 --- a/src/race_day_view.js +++ b/src/race_day_view.js @@ -78,17 +78,17 @@ function renderPrologueControls({ t, escapeHtml, getDefaultPrologueSec }, sessio - `; + `; } const held = prologue.heldRemainingMs !== null; return ` ${formatMmSs(check.remainingMs)} ${t(held ? "prologue.held" : "prologue.running")} - + - + `; } @@ -216,7 +216,7 @@ export function renderRaceDayView(deps) { const layoutAllowed = !session || isPracticeSessionType(session.type); dom.view.innerHTML = `
- + ${layoutAllowed ? `` : ""}
@@ -251,11 +251,11 @@ export function renderRaceDayView(deps) {
${usesPrologue ? renderPrologueControls({ t, escapeHtml, getDefaultPrologueSec }, session, warmupForChecks, canStart) - : isLiveSession ? "" : ``} + : isLiveSession ? "" : ``} ${prologue ? "" : ` - ${session?.status === "running" ? `` : ""} - ${session?.status === "paused" ? `` : ""} + ${session?.status === "running" ? `` : ""} + ${session?.status === "paused" ? `` : ""} ${isLiveSession ? `` : ""} ${isPracticeSession ? `` : ""}`}
diff --git a/src/styles.css b/src/styles.css index 07b224f..7e3dcfc 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1930,6 +1930,43 @@ body { ); } +/* Traffic-light run controls: green starts or resumes, amber holds, red (.btn-danger) finishes. */ +.btn-go { + color: #fff; + border-color: color-mix(in srgb, var(--ok) 62%, black 38%); + background: linear-gradient(180deg, color-mix(in srgb, var(--ok) 82%, white 18%), color-mix(in srgb, var(--ok) 70%, black 30%)); +} + +.btn-hold { + color: #1a1200; + border-color: color-mix(in srgb, var(--warn) 62%, black 38%); + background: linear-gradient(180deg, color-mix(in srgb, var(--warn) 85%, white 15%), color-mix(in srgb, var(--warn) 80%, black 20%)); +} + +.btn-go:disabled, +.btn-hold:disabled { + filter: grayscale(0.7); + opacity: 0.55; +} + +.live-dot { + display: inline-block; + width: 0.7em; + height: 0.7em; + border-radius: 50%; + background: #fff; + vertical-align: middle; + animation: live-dot-pulse 1.4s ease-in-out infinite; +} + +@keyframes live-dot-pulse { + 50% { opacity: 0.25; } +} + +@media (prefers-reduced-motion: reduce) { + .live-dot { animation: none; } +} + .btn-mini { padding: 3px 8px; font-size: 0.76rem;