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

+1
View File
@@ -40,6 +40,7 @@
"/js/share_import.js": "/js/share_import.js?v=<%= ASSET_VERSION %>",
"/js/search.js": "/js/search.js?v=<%= ASSET_VERSION %>",
"/js/shadow.js": "/js/shadow.js?v=<%= ASSET_VERSION %>",
"/js/speed_limits.js": "/js/speed_limits.js?v=<%= ASSET_VERSION %>",
"/js/sun.js": "/js/sun.js?v=<%= ASSET_VERSION %>",
"/js/track_profile.js": "/js/track_profile.js?v=<%= ASSET_VERSION %>",
"/vendor/maplibre-gl/maplibre-gl.mjs": "/vendor/maplibre-gl/maplibre-gl.mjs?v=<%= ASSET_VERSION %>",
+86 -50
View File
@@ -166,6 +166,13 @@
saving at the bottom. -->
<div class="route-panel__body">
<p class="route-panel__editing" hidden></p>
<!-- the itinerary (the Design canvas' Itinerary): the shared trip's name,
when it leaves; a day after a night stop starts at "Days start" -->
<div class="route-panel__trip">
<input type="text" name="name" maxlength="80" placeholder="Trip name" aria-label="Trip name">
<label>Leave <input type="datetime-local" name="start"></label>
<label>Days start <input type="time" name="day_start" placeholder="09:00"></label>
</div>
<ol class="route-panel__points"></ol>
<div class="route-panel__add">
<button type="button" class="route-panel__chip route-panel__chip--add" data-action="search">+ Search</button>
@@ -180,61 +187,11 @@
<div class="route-panel__totals" hidden></div>
<p class="route-panel__summary"></p>
<ul class="route-panel__countries" hidden></ul>
<div class="route-panel__row route-panel__vehicle-row">
<span class="route-panel__label">Vehicle</span>
<select class="route-panel__vehicle-select route-panel__chip" aria-label="Vehicle"></select>
<button type="button" class="route-panel__chip" data-action="vehicle-edit" hidden>Edit</button>
</div>
<div class="route-panel__row route-panel__avoid">
<span class="route-panel__label">Avoid</span>
<label class="route-panel__chip"><input type="checkbox" name="tolls"> Tolls</label>
<label class="route-panel__chip"><input type="checkbox" name="highways"> Motorways</label>
</div>
<fieldset class="route-panel__vehicle" hidden>
<label class="route-panel__vehicle-name">Name <input type="text" name="name" maxlength="40"></label>
<label>Type
<select name="type">
<option value="car">Car</option>
<option value="bicycle">Bicycle</option>
<option value="foot">On foot</option>
</select>
</label>
<!-- data-for: the types a field applies to, the rest are hidden. -->
<label data-for="car">Height <input type="number" name="height" step="0.1" min="1" max="6" placeholder="–"> m</label>
<label data-for="car">Width <input type="number" name="width" step="0.1" min="1" max="4" placeholder="–"> m</label>
<label data-for="car">Length <input type="number" name="length" step="0.5" min="2" max="25" placeholder="–"> m</label>
<label data-for="car">Weight <input type="number" name="weight" step="0.1" min="0.5" max="60" placeholder="–"> t</label>
<label data-for="bicycle">Bike
<select name="bicycle_type">
<option value="Road">Road</option>
<option value="Hybrid">Trekking</option>
<option value="Cross">Gravel</option>
<option value="Mountain">MTB</option>
</select>
</label>
<label data-for="bicycle foot">Speed <input type="number" name="speed" step="0.5" min="1" max="60" placeholder="–"> km/h</label>
<label data-for="bicycle foot">Hills
<select name="hills">
<option value="">Default</option>
<option value="0">Avoid</option>
<option value="1">Seek</option>
</select>
</label>
<label data-for="foot">Up to
<select name="sac">
<option value="">T1 hiking</option>
<option value="2">T2 mountain hiking</option>
<option value="3">T3 demanding</option>
<option value="4">T4 alpine</option>
<option value="5">T5 demanding alpine</option>
<option value="6">T6 difficult alpine</option>
</select>
</label>
<p class="route-panel__vehicle-hint" data-for="car">Empty: no limit. Over 3.5 t routes as a truck.</p>
<p class="route-panel__vehicle-hint" data-for="bicycle foot">Empty speed: the usual one for the bike or walking.</p>
<button type="button" data-action="vehicle-add">+ New vehicle</button>
<button type="button" data-action="vehicle-delete">Delete</button>
</fieldset>
<details class="route-panel__fold route-panel__directions" hidden>
<summary>Directions <span class="route-panel__fold-meta"></span></summary>
<ol></ol>
@@ -272,3 +229,82 @@
"control owns its content" story as the Overlays panel. -->
<div class="offline-data-panel__body"></div>
</div>
<!-- Profiles (cars and activities): set once, rarely opened again (the
Design canvas' Vehicle). The map's bottom-left chip picks one (route.js). -->
<dialog class="profiles" aria-label="Profiles">
<div class="profiles__head"><h2>Profiles</h2><button type="button" class="profiles__close" aria-label="Close">✕</button></div>
<div class="profiles__list"><ul></ul><button type="button" data-action="vehicle-add">+ New profile</button></div>
<fieldset class="profiles__form">
<label class="route-panel__vehicle-name">Name <input type="text" name="name" maxlength="40"></label>
<label>Type
<select name="type">
<option value="car">Car</option>
<option value="bicycle">Bicycle</option>
<option value="foot">On foot</option>
</select>
</label>
<!-- data-for: the types a field applies to, the rest are hidden. -->
<label data-for="car">Height <input type="number" name="height" step="0.1" min="1" max="6" placeholder="–"> m</label>
<label data-for="car">Width <input type="number" name="width" step="0.1" min="1" max="4" placeholder="–"> m</label>
<label data-for="car">Length <input type="number" name="length" step="0.5" min="2" max="25" placeholder="–"> m</label>
<label data-for="car">Weight <input type="number" name="weight" step="0.1" min="0.5" max="60" placeholder="–"> t</label>
<label data-for="bicycle">Bike
<select name="bicycle_type">
<option value="Road">Road</option>
<option value="Hybrid">Trekking</option>
<option value="Cross">Gravel</option>
<option value="Mountain">MTB</option>
</select>
</label>
<label data-for="bicycle foot">Speed <input type="number" name="speed" step="0.5" min="1" max="60" placeholder="–"> km/h</label>
<label data-for="bicycle foot">Hills
<select name="hills">
<option value="">Default</option>
<option value="0">Avoid</option>
<option value="1">Seek</option>
</select>
</label>
<label data-for="foot">Up to
<select name="sac">
<option value="">T1 hiking</option>
<option value="2">T2 mountain hiking</option>
<option value="3">T3 demanding</option>
<option value="4">T4 alpine</option>
<option value="5">T5 demanding alpine</option>
<option value="6">T6 difficult alpine</option>
</select>
</label>
<label data-for="car">Fuel
<select name="fuel">
<option value="">–</option>
<option value="petrol">Petrol</option>
<option value="diesel">Diesel</option>
<option value="lpg">LPG</option>
<option value="cng">CNG</option>
<option value="electric">Electric</option>
<option value="hybrid">Hybrid</option>
</select>
</label>
<label data-for="car">Euro
<select name="euro">
<option value="">–</option>
<option value="3">Euro 3</option>
<option value="4">Euro 4</option>
<option value="5">Euro 5</option>
<option value="6">Euro 6</option>
<option value="6d">Euro 6d</option>
</select>
</label>
<label data-for="car" class="profiles__wide">Stickers <input type="text" name="stickers" maxlength="80" placeholder="DE green 4 · FR Crit'Air 2"></label>
<div data-for="car" class="profiles__wide profiles__vignettes">
<span>Vignettes &amp; toll units</span>
<ul></ul>
<button type="button" data-action="vignette-add">+ Add</button>
</div>
<p class="route-panel__vehicle-hint" data-for="car">Empty: no limit. Over 3.5 t routes as a truck.</p>
<p class="route-panel__vehicle-hint" data-for="bicycle foot">Empty speed: the usual one for the bike or walking.</p>
<button type="button" data-action="vehicle-delete" class="profiles__delete">Delete this profile</button>
</fieldset>
<div class="profiles__foot">Stored on this server for every screen; changes save as you go.</div>
</dialog>