Skip to content

Commit 47db963

Browse files
DennisOSRMCopilot
andauthored
Add version info, improve UI layout, and hide directions pane by default (#404)
* Add version info, improve UI layout, and hide directions pane by default - Add build timestamp to hamburger menu via new version.js module - Inject timestamp at compile time using webpack DefinePlugin - Move scale widget to bottom-right (350px from right edge) - Hide directions pane by default, show when route is computed - Hide pane when waypoints are cleared - Update styling for version info display with white text Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR #404 review feedback - version.js: replace try/catch with isNaN(date.getTime()) check so invalid date strings fall back to the raw timestamp correctly - tools.js: use this._local['Build'] for the version label so the tools menu remains fully translatable - i18n/*.js: add 'Build' translation key to all 13 locale files - index.js (routesfound): re-query .leaflet-routing-container inside the event handler instead of capturing it once at startup - index.js (waypointschanged): hide pane only when fewer than 2 valid waypoints exist, avoiding flicker during partial edits - css/site.css: remove unused #version-info rule (JS uses .leaflet-osrm-tools-version class) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 5740b42 commit 47db963

22 files changed

Lines changed: 114 additions & 57127 deletions

bundle.js

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundle.raw.js

Lines changed: 0 additions & 57103 deletions
This file was deleted.

css/site.css

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
/* Scale position */
5353
.leaflet-control-scale {
5454
position: absolute;
55-
left: 320px;
5655
bottom: 1px;
56+
right: 350px;
5757
}
5858

5959
/* Zoom control position */
@@ -920,3 +920,22 @@ td.distance {
920920
margin-right: -400px !important;
921921
transition: 0.5s;
922922
}
923+
924+
.leaflet-osrm-tools-version {
925+
padding: 12px 8px;
926+
border-top: 1px solid rgba(255, 255, 255, 0.2);
927+
margin-top: 8px;
928+
font-size: 12px;
929+
color: #fff;
930+
}
931+
932+
.leaflet-osrm-tools-version-label {
933+
font-weight: bold;
934+
margin-right: 4px;
935+
color: #fff;
936+
}
937+
938+
.leaflet-osrm-tools-version-value {
939+
cursor: help;
940+
color: #fff;
941+
}

i18n/da.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ module.exports = {
1515
'Via point - press enter to drop marker': 'Via - tryk for at placere delmålspunkt',
1616
'Bike': 'Cykel',
1717
'Car': 'Bil',
18-
'Foot': 'Til fods'
18+
'Foot': 'Til fods',
19+
'Build': 'Bygget: '
1920
};

i18n/de.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ module.exports = {
1515
'Via point - press enter to drop marker': 'Zwischenstop - drücken um einen Marker zu plazieren',
1616
'Bike': 'Fahrrad',
1717
'Car': 'Auto',
18-
'Foot': 'Fussgänger'
18+
'Foot': 'Fussgänger',
19+
'Build': 'Build: '
1920
};

i18n/en.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ module.exports = {
1515
'Via point - press enter to drop marker': 'Via point - press enter to drop marker',
1616
'Bike': 'Bike',
1717
'Car': 'Car',
18-
'Foot': 'Foot'
18+
'Foot': 'Foot',
19+
'Build': 'Build: '
1920
};

i18n/es.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ module.exports = {
1515
'Via point - press enter to drop marker': 'Punto en la vía - presione enter para colocar un marcador',
1616
'Bike': 'Bicicleta',
1717
'Car': 'Coche',
18-
'Foot': 'Peatón'
18+
'Foot': 'Peatón',
19+
'Build': 'Compilación: '
1920
};

i18n/fa.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ module.exports = {
99
'Select language': 'انتخاب زبان',
1010
'Start - press enter to drop marker': 'شروع - برای درج نشانه روی نقشه اینتر بزنید',
1111
'End - press enter to drop marker': 'پایان - برای درج نشانه روی نقشه اینتر بزنید',
12-
'Via point - press enter to drop marker': 'مسیر میانه - برای درج نشانه روی نقشه اینتر بزنید'
12+
'Via point - press enter to drop marker': 'مسیر میانه - برای درج نشانه روی نقشه اینتر بزنید',
13+
'Build': 'بیلد: '
1314
};

i18n/fr.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ module.exports = {
1515
'Via point - press enter to drop marker': 'Étape intermédiaire - appuyez sur Entrée pour placer le marqueur',
1616
'Bike': 'Vélo',
1717
'Car': 'Voiture',
18-
'Foot': 'Piéton'
18+
'Foot': 'Piéton',
19+
'Build': 'Build : '
1920
};

0 commit comments

Comments
 (0)