diff --git a/README.md b/README.md index e23d90b..e11aa1a 100644 --- a/README.md +++ b/README.md @@ -243,6 +243,7 @@ Rookie gets its own standings with the series' points table, count rule and club - personal best, averages and consistency; - best 3 consecutive laps and the best 5-minute result; - stint analysis, 30-minute pace blocks and setup markers with before/after comparison; + - **practice stints that fold out** to every lap time: laps, best, average, total time and spread per stint; the stint's fastest lap green, the day's fastest purple, slow laps red and the out lap after a break marked; - daily history and achievements; - goals with rewards, daily challenges and a shared club goal. - **Based on: Practice** (default), **Races** or **All.** Race laps are kept separate and marked 🏁 with race, session and series. Under Races they are listed per race session; a race never forms stints. @@ -250,6 +251,7 @@ Rookie gets its own standings with the series' points table, count rule and club **Mobile profile:** - Each driver can get a personal link with a QR code. It shows their own statistics, a practice timer, setup markers and exercises (even laps, step training), and has a choice of practice or race laps. +- A **Standard / Pro** switch at the top. **Pro** is a clean practice view without goals or settings: today's laps, stints, driving time, best, average and personal best, then the stint cards that fold out to every lap. The choice is remembered on the phone and can be linked with `?mode=pro`. - The link uses a random token; no transponders or other drivers are shown. - For use over the internet, set the **public address** once for everyone under Settings → System & backup → Public address (domain / DynDNS), e.g. `https://club.dyndns.org:8443`. Left empty, links use the local network address. - Proxy only these paths to the internet: `/public-training/*`, `/src/public_training.js` and `/src/public_training.css`. Ready-made Teltonika files are in `scripts/teltonika/`. @@ -277,6 +279,8 @@ Settings → Audio: The **Overlay** menu has leaderboard, speaker, results, TV and team modes, plus an OBS mode with layout (leaderboard, TV graphics, grid, lower third), theme (panel, transparent, chroma), rows and columns: - Columns: laps, result, best, gap, and **places since the start** (â–Č/â–Œ in heats and finals). - **TV graphics:** a title plate top left (event and heat) and a timing tower top right with the clock on top and real columns: place / **start position** (e.g. "2 / 3"), driver, laps, time, best and gap, in large bold type with podium colours for the top three. No backdrop of its own, so the camera image shows through. The start position can be turned off and is not shown in practice. +- **Live marks** in the leaderboard and the TV tower: a driver's row flashes briefly on a new time, a fuel pump badge with a ticking clock shows while the car is in the pits (then the stop time for 5 s), and a new split shows for 4 s with ± against the previous one. They run on the overlay computer's clock, and a freshly opened overlay never flashes every row. +- The TV title plate has the RaceCore look: the club logo or a red RC mark, the event in small capitals and the heat in Orbitron. - **Click a driver** in RaceCore's own overlay to open that driver's training stats (the stand-alone overlay window opens them in a new tab). The public overlay has no such links. - **Copy OBS URL** gives a browser-source link; the chosen columns are part of the link. - **Overlay windows are read-only:** they do not connect to the decoder and never save, so an overlay on another computer (or in OBS) cannot disturb the race run from Race Day. No admin PIN is needed for that. Run Race Day in one browser at a time. diff --git a/README.sv.md b/README.sv.md index 04f126a..f5a0b5b 100644 --- a/README.sv.md +++ b/README.sv.md @@ -256,6 +256,7 @@ Rookie fĂ„r en egen stĂ€llning med seriens poĂ€ngtabell, rĂ€kneregel och klubbre - personbĂ€sta, snittider och jĂ€mnhet; - bĂ€sta 3 varv i följd och bĂ€sta 5-minutersresultat; - stintanalys, 30-minuters tempoblock och setup-markeringar med före/efter-jĂ€mförelse; + - **trĂ€ningsstintar som fĂ€lls ut** till alla varvtider: varv, bĂ€sta, snitt, totaltid och spridning per stint; stintens snabbaste varv grönt, dagens snabbaste lila, lĂ„ngsamma varv röda och utvarvet efter en paus markerat; - dagshistorik och utmĂ€rkelser; - mĂ„l med belöningar, dagliga utmaningar och ett gemensamt klubbmĂ„l. - **Underlag: TrĂ€ning** (standard), **Race** eller **Alla.** Racevarv hĂ„lls separat och mĂ€rks 🏁 med tĂ€vling, pass och serie. Under Race visas de per racepass; ett race delas aldrig upp i stints. @@ -263,6 +264,7 @@ Rookie fĂ„r en egen stĂ€llning med seriens poĂ€ngtabell, rĂ€kneregel och klubbre **Mobilprofil:** - Varje förare kan fĂ„ en personlig lĂ€nk med QR-kod. Den visar förarens egen statistik, en trĂ€ningstimer, setup-markeringar och övningar (jĂ€mna varv, stegtrĂ€ning), och har val för trĂ€nings- eller racevarv. +- Ett reglage **Standard / Pro** högst upp. **Pro** Ă€r en ren trĂ€ningsvy utan mĂ„l och instĂ€llningar: dagens varv, stintar, körtid, bĂ€sta, snitt och personbĂ€sta, sedan stintkorten som fĂ€lls ut till alla varv. Valet sparas i telefonen och kan lĂ€nkas med `?mode=pro`. - LĂ€nken anvĂ€nder en slumpad nyckel; inga transpondrar eller andra förare visas. - För anvĂ€ndning via internet, ange **den publika adressen** en gĂ„ng för alla under InstĂ€llningar → System & backup → Publik adress (domĂ€n / DynDNS), till exempel `https://klubben.dyndns.org:8443`. LĂ€mnas den tom anvĂ€nds den lokala nĂ€tverksadressen. - Publicera bara de hĂ€r sökvĂ€garna mot internet: `/public-training/*`, `/src/public_training.js` och `/src/public_training.css`. FĂ€rdiga Teltonika-filer finns i `scripts/teltonika/`. @@ -290,6 +292,8 @@ InstĂ€llningar → Ljud: Menyn **Overlay** har lĂ€gena leaderboard, speaker, resultat, TV och lag, plus ett OBS-lĂ€ge med layout (leaderboard, TV-grafik, grid, lower third), tema (panel, transparent, chroma), rader och kolumner: - Kolumner: varv, resultat, bĂ€sta, gap och **placering sedan start** (â–Č/â–Œ i heat och finaler). - **TV-grafik:** rubrikskylt uppe till vĂ€nster (event och heat) och en topplista uppe till höger med klockan överst och raka kolumner: placering / **startplats** (t.ex. "2 / 3"), förare, varv, tid, bĂ€sta och gap, i stor fet text och medaljfĂ€rger för topp 3. Ingen egen bakgrund, sĂ„ kamerabilden syns igenom. Startplatsen kan stĂ€ngas av och visas inte i trĂ€ning. +- **Livemarkeringar** i leaderboard och TV-topplistan: förarens rad blinkar kort vid en ny tid, en brĂ€nslepump med tickande klocka visas medan bilen Ă€r i depĂ„ (sedan stopptiden i 5 s), och en ny mellantid visas i 4 s med ± mot förra. De gĂ„r pĂ„ overlay-datorns klocka, och en nyöppnad overlay blinkar aldrig alla rader. +- TV-rubrikskylten har RaceCore-utseende: klubbens logga eller ett rött RC-mĂ€rke, eventet i smĂ„ versaler och heatet i Orbitron. - **Klicka pĂ„ en förare** i RaceCores egen overlay för att öppna förarens trĂ€ningsstatistik (det fristĂ„ende overlay-fönstret öppnar den i en ny flik). Den publika overlayn har inga sĂ„dana lĂ€nkar. - **Kopiera OBS-URL** ger en lĂ€nk för browser source; valda kolumner ingĂ„r i lĂ€nken. - **Overlay-fönster Ă€r skrivskyddade:** de kopplar inte upp sig mot decodern och sparar aldrig, sĂ„ en overlay pĂ„ en annan dator (eller i OBS) kan inte störa racet som körs frĂ„n Race Day. Ingen admin-PIN behövs för det. Kör bara Race Day i en webblĂ€sare Ă„t gĂ„ngen. diff --git a/docs/javascript-architecture.md b/docs/javascript-architecture.md index b8e11cb..b84c192 100644 --- a/docs/javascript-architecture.md +++ b/docs/javascript-architecture.md @@ -488,6 +488,28 @@ Owns: - side panels - overlay leaderboard rows +### `src/overlay_live_marks.js` +Type: +- pure overlay live-mark state and markup + +Owns: +- detecting a new passing, split, pit entry and pit exit per row between renders, on the client clock +- passing flash class with a negative animation delay so re-renders continue the animation +- pit badge (fuel icon, ticking clock, then stop time for 5 s) and split chip (4 s, ± delta) +- `refreshLiveMarkNodes()` for the 250 ms overlay tick: updates pit clocks and removes expired marks without a re-render +- the shared `overlayLiveMarks` instance used by `src/overlays.js` + +### `src/stint_laps_view.js` +Type: +- pure stint lap-card renderer + +Owns: +- per-lap rows: stint best (green), day best (purple), slow (>115% of median), out lap after a break +- fold-out `
` cards with laps, best, average, total time and spread +- keeping open cards open across re-renders (`openStintLapCardIds`) + +Used by `src/training_views.js`. `src/public_training.js` holds an inlined copy (the public page must load as one file through the router allowlist); `tests/stint_laps_view.test.js` checks that the two render identically. + ### `src/session_replay.js` Type: - pure transient replay logic @@ -747,11 +769,13 @@ Type: Owns: - fetching profile data from `GET /public-training/api/:shareToken` - posting only class-scoped setup markers to `POST /public-training/api/:shareToken/markers` -- rendering one person's sanitized statistics, pace chart, recent stints, goals, rewards, and daily history with a class selector +- rendering one person's sanitized statistics, pace chart, recent stints with per-lap times, goals, rewards, and daily history with a class selector - hiding optional sections according to the server-provided share visibility map - switching between class-specific statistics without combining lap performance across classes - local 20-minute practice timer with 10-minute push/control phases - token-scoped start-age and bounded-window polling for aggregate lap count, best lap, and average during the personal timer; using an age avoids mobile/server clock-skew errors and the bounded window freezes results after the timer finishes +- Standard / Pro mode (`?mode=pro`, remembered in `localStorage` key `rcPublicTrainingMode`); Pro shows only today's practice numbers and the fold-out stint cards +- an inlined copy of `src/stint_laps_view.js` between the marked copy comments; the file must have no imports - Swedish/English copy selected by `lang` query or browser locale Important isolation: