Add secure public driver training profiles
This commit is contained in:
43
src/app.js
43
src/app.js
@@ -334,6 +334,20 @@ const TRANSLATIONS = {
|
||||
"training.date": "Datum",
|
||||
"training.laps": "Varv",
|
||||
"training.pb_improvement": "Senaste 30: {lap} snabbare",
|
||||
"training.public_profile": "Mobilprofil för förare",
|
||||
"training.public_profile_active": "Aktiv",
|
||||
"training.public_profile_off": "Avstängd",
|
||||
"training.public_profile_help": "Skapa en skrivskyddad mobilvy med den här förarens träningsstatistik, mål, belöningar och 20-minuterstimer.",
|
||||
"training.public_profile_private": "Länken innehåller en unik hemlig nyckel. Den visar inte transponder-ID, övriga förare eller adminfunktioner.",
|
||||
"training.public_profile_link": "Personlig delningslänk",
|
||||
"training.copy_link": "Kopiera länk",
|
||||
"training.open_profile": "Öppna profil",
|
||||
"training.replace_link": "Skapa ny länk",
|
||||
"training.disable_profile": "Stäng av profil",
|
||||
"training.enable_profile": "Aktivera mobilprofil",
|
||||
"training.replace_link_confirm": "Den gamla länken slutar fungera direkt. Vill du skapa en ny?",
|
||||
"training.club_progress": "Klubbens träningsöversikt",
|
||||
"training.next_target": "Nästa mål",
|
||||
"mode.track": "Sponsor Event",
|
||||
"mode.race": "Race",
|
||||
"dashboard.events": "Event",
|
||||
@@ -952,7 +966,7 @@ const TRANSLATIONS = {
|
||||
"edit.event_name": "Redigera eventnamn",
|
||||
"edit.event_date": "Redigera eventdatum (YYYY-MM-DD)",
|
||||
"guide.title": "Guide och dokumentation",
|
||||
"guide.intro": "Här finns steg-för-steg för sponsor-event, vanligt race och nya Create Race Wizard i Race Setup. Guiden beskriver också hur Hantera-flödet är uppdelat samt var AMMC faktiskt körs i Managed AMMC-läget.",
|
||||
"guide.intro": "Här finns steg-för-steg för sponsor-event, vanligt race, träningsstatistik och Create Race Wizard i Race Setup. Guiden beskriver också hur Hantera-flödet är uppdelat samt var AMMC faktiskt körs i Managed AMMC-läget.",
|
||||
"guide.card_sponsor_blurb": "Delade bilar, roterande förare och heat/finaler för sponsor- och prova-på-event.",
|
||||
"guide.card_race_blurb": "Personliga transpondrar, kval/finaler, raceformat och seedning för riktiga tävlingsrace.",
|
||||
"guide.card_team_blurb": "Lagrace och endurance med team, stintlogg och summerade varv över lång tid.",
|
||||
@@ -1035,6 +1049,9 @@ const TRANSLATIONS = {
|
||||
"guide.training_4": "4. Nästa automatiska nivå räknas utan konfiguration. Skapa egna delmål om klubben eller en förälder vill koppla en fysisk belöning till exempelvis 500, 1000 eller 1500 varv.",
|
||||
"guide.training_5": "5. När målet nåtts kan belöningen markeras som utdelad. Direktlänken `/?view=training&driver=<id>` kan bokmärkas på förarens mobil.",
|
||||
"guide.training_6": "6. Träningsloggen uppdateras av domarkorrigeringar medan sessionen finns, men behålls när sessionen senare raderas. Full dataexport i Inställningar inkluderar både logg och mål.",
|
||||
"guide.training_7": "7. Under Mobilprofil för förare klickar du Aktivera mobilprofil. Kopiera den personliga länken och öppna den på förarens eller förälderns mobil.",
|
||||
"guide.training_8": "8. Mobilprofilen är skrivskyddad och visar bara vald förares statistik. Där finns också en lokal 20-minuterstimer som växlar från 10 minuter maxfokus till 10 minuter kontrollerad körning.",
|
||||
"guide.training_9": "9. Klicka Skapa ny länk eller Stäng av profil om länken spridits fel. Publicera bara `/public-training/*`, `/src/public_training.js` och `/src/public_training.css` externt, aldrig hela admin-sidan eller `/api/state`.",
|
||||
"overlay.title": "Overlay",
|
||||
"overlay.subtitle": "Extern leaderboard-skärm",
|
||||
"overlay.no_active": "Ingen aktiv session vald.",
|
||||
@@ -1082,7 +1099,7 @@ const TRANSLATIONS = {
|
||||
"guide.host_3": "3. Kör backend på Linux-servern -> Linux-binären används: `AMMC/linux_x86-64/ammc-amb`.",
|
||||
"guide.host_4": "4. Kör backend på Windows-burken -> Windows-binären används: `AMMC/windows64/ammc-amb.exe`.",
|
||||
"guide.host_5": "5. Fältet `AMMC binär` i Settings är sökvägen på hosten där backend kör, inte på klient-laptopen.",
|
||||
"guide.host_6": "6. Publicera helst bara `/public-overlay/*` externt via reverse proxy, inte hela admin-UI:t.",
|
||||
"guide.host_6": "6. Publicera helst bara `/public-overlay/*` och valda `/public-training/*`-routes externt via reverse proxy, inte hela admin-UI:t eller `/api/state`.",
|
||||
"guide.host_7": "7. OBS overlay finns nu som publik URL: `/public-overlay/obs` och kan konfigureras från Overlay-menyn.",
|
||||
"guide.host_8": "8. Sätt `PUBLIC_OVERLAY_TOKEN` på servern om du vill kräva `?token=...` för publika overlay-länkar.",
|
||||
"guide.windows_title": "Windows + AMMC + npm",
|
||||
@@ -1206,6 +1223,20 @@ const TRANSLATIONS = {
|
||||
"training.date": "Date",
|
||||
"training.laps": "Laps",
|
||||
"training.pb_improvement": "Latest 30: {lap} faster",
|
||||
"training.public_profile": "Driver mobile profile",
|
||||
"training.public_profile_active": "Active",
|
||||
"training.public_profile_off": "Disabled",
|
||||
"training.public_profile_help": "Create a read-only mobile view with this driver's practice statistics, goals, rewards and 20-minute timer.",
|
||||
"training.public_profile_private": "The link contains a unique secret key. It does not show transponder IDs, other drivers or admin controls.",
|
||||
"training.public_profile_link": "Personal share link",
|
||||
"training.copy_link": "Copy link",
|
||||
"training.open_profile": "Open profile",
|
||||
"training.replace_link": "Create new link",
|
||||
"training.disable_profile": "Disable profile",
|
||||
"training.enable_profile": "Enable mobile profile",
|
||||
"training.replace_link_confirm": "The old link will stop working immediately. Create a new one?",
|
||||
"training.club_progress": "Club practice overview",
|
||||
"training.next_target": "Next target",
|
||||
"mode.track": "Track Event",
|
||||
"mode.race": "Race",
|
||||
"dashboard.events": "Events",
|
||||
@@ -1824,7 +1855,7 @@ const TRANSLATIONS = {
|
||||
"edit.event_name": "Edit event name",
|
||||
"edit.event_date": "Edit event date (YYYY-MM-DD)",
|
||||
"guide.title": "Guide and Documentation",
|
||||
"guide.intro": "Step-by-step setup for sponsor events, regular race mode and the new Create Race Wizard in Race Setup. The guide also explains how the Manage flow is split up and where Managed AMMC actually runs.",
|
||||
"guide.intro": "Step-by-step setup for sponsor events, regular race mode, training statistics and the Create Race Wizard in Race Setup. The guide also explains how the Manage flow is split up and where Managed AMMC actually runs.",
|
||||
"guide.card_sponsor_blurb": "Shared cars, rotating drivers and heat/final flow for sponsor or try-out events.",
|
||||
"guide.card_race_blurb": "Personal transponders, qualifying/finals, race format and seeding for competition racing.",
|
||||
"guide.card_team_blurb": "Team race and endurance with teams, stint logs and total laps over long sessions.",
|
||||
@@ -1907,6 +1938,9 @@ const TRANSLATIONS = {
|
||||
"guide.training_4": "4. The next automatic level needs no configuration. Add custom milestones when the club or a parent wants to attach a physical reward to targets such as 500, 1000 or 1500 laps.",
|
||||
"guide.training_5": "5. When a target is reached, mark its reward as delivered. Bookmark `/?view=training&driver=<id>` on the driver's phone for direct access.",
|
||||
"guide.training_6": "6. The training ledger follows judging corrections while the source session exists, but remains when that session is later deleted. Full data export in Settings includes both ledger and goals.",
|
||||
"guide.training_7": "7. Under Driver mobile profile, click Enable mobile profile. Copy the personal link and open it on the driver's or parent's phone.",
|
||||
"guide.training_8": "8. The mobile profile is read-only and only shows the selected driver's statistics. It also includes a local 20-minute timer that changes from 10 minutes maximum focus to 10 minutes controlled driving.",
|
||||
"guide.training_9": "9. Click Create new link or Disable profile if the link is shared incorrectly. Expose only `/public-training/*`, `/src/public_training.js` and `/src/public_training.css` externally, never the full admin site or `/api/state`.",
|
||||
"overlay.title": "Overlay",
|
||||
"overlay.subtitle": "External leaderboard screen",
|
||||
"overlay.no_active": "No active session selected.",
|
||||
@@ -1954,6 +1988,9 @@ const TRANSLATIONS = {
|
||||
"guide.host_3": "3. Run the backend on Linux -> the Linux binary is used: `AMMC/linux_x86-64/ammc-amb`.",
|
||||
"guide.host_4": "4. Run the backend on Windows -> the Windows binary is used: `AMMC/windows64/ammc-amb.exe`.",
|
||||
"guide.host_5": "5. The `AMMC executable` field in Settings is a path on the backend host, not on the client laptop.",
|
||||
"guide.host_6": "6. Prefer publishing only `/public-overlay/*` and selected `/public-training/*` routes through a reverse proxy, not the full admin UI or `/api/state`.",
|
||||
"guide.host_7": "7. The OBS overlay is available at `/public-overlay/obs` and can be configured from the Overlay menu.",
|
||||
"guide.host_8": "8. Set `PUBLIC_OVERLAY_TOKEN` on the server if public overlay links should require `?token=...`.",
|
||||
"guide.windows_title": "Windows + AMMC + npm",
|
||||
"guide.windows_1": "1. Use 64-bit Windows 11. Double-click `windows/install.bat`; it installs Node.js LTS with winget when needed and runs `npm ci`.",
|
||||
"guide.windows_2": "2. Setup requires Node 22 or 24 LTS and automatically verifies Express, SQLite, and `AMMC/windows64`.",
|
||||
|
||||
Reference in New Issue
Block a user