Profiles in a dialog, the chip in the map's bottom-left corner picks one (the Design canvas' Vehicle): a car gains fuel, Euro class, stickers and vignettes / toll units with dates; drive mode's Menu steps through them. Speed limits by country for cars and over 3.5 t (public/js/speed_limits.js, sources in it): the route's roads (km, road class, country), the limit shown the lower of the sign and the profile's; the Route panel's countries with their limits and how the motorways are paid; past a border a card in drive mode (GridBorder). The itinerary in the Route panel (Itinerary): the trip's name, leave time, days start; per stop a night, stay and note, planned times, day headers; another screen's change shown where it happened with Undo
CI / check (push) Successful in 24s
CI / deploy (push) Successful in 17s

This commit is contained in:
randy committed 2026-12-03 19:00:09 +01:00
1 parent a6158f4083
commit 5e31dfaba9
15 files changed
+733 -169

No files matched your search

+14
View File
@@ -123,6 +123,20 @@ export function notifyRouteChanged(route) {
document.dispatchEvent(new CustomEvent(ROUTE_CHANGED_EVENT, { detail: route }));
}
// The profile in use (route.js; its /api/vehicles entry): the dashboard's
// and the driving grid's limits for it, the border card's "how it pays".
const VEHICLE_EVENT = "vehicle-changed";
export let currentVehicle = null;
export function notifyVehicle(vehicle) {
currentVehicle = vehicle;
document.dispatchEvent(new CustomEvent(VEHICLE_EVENT, { detail: vehicle }));
}
export function onVehicle(callback) {
document.addEventListener(VEHICLE_EVENT, (event) => callback(event.detail));
}
// How far along the route the position is, while the dashboard follows it
// (km, or null once it's off it / not navigating): the route panel draws
// the driven part dimmed and the rest as the active route.