From aa99247fbbb6af4b6cc8bdee57debe14b26216e5 Mon Sep 17 00:00:00 2001 From: Erwin Sperling Date: Mon, 23 Dec 2024 14:15:43 +0100 Subject: [PATCH] Add remark icons --- .../src/assets/icons/2nd-class-only.svg | 95 +++++++++ front/bahnui-front/src/assets/icons/55.svg | 113 +++++++++++ .../src/assets/icons/air-conditioned.svg | 192 ++++++++++++++++++ .../src/assets/icons/barrier-free-vehicle.svg | 116 +++++++++++ .../icons/bicycle-conveyance-reservation.svg | 115 +++++++++++ .../src/assets/icons/bicycle-conveyance.svg | 104 ++++++++++ .../assets/icons/compulsory-reservation.svg | 80 ++++++++ .../src/assets/icons/on-board-restaurant.svg | 95 +++++++++ .../src/assets/icons/power-sockets.svg | 87 ++++++++ .../src/assets/icons/wheelchair-space.svg | 105 ++++++++++ front/bahnui-front/src/assets/icons/wifi.svg | 104 ++++++++++ front/bahnui-front/src/components/routing.vue | 15 +- front/bahnui-front/src/lib/remarks.js | 33 +++ front/bahnui-front/src/locales/de.json | 16 ++ front/bahnui-front/src/locales/en.json | 16 ++ 15 files changed, 1283 insertions(+), 3 deletions(-) create mode 100644 front/bahnui-front/src/assets/icons/2nd-class-only.svg create mode 100644 front/bahnui-front/src/assets/icons/55.svg create mode 100644 front/bahnui-front/src/assets/icons/air-conditioned.svg create mode 100644 front/bahnui-front/src/assets/icons/barrier-free-vehicle.svg create mode 100644 front/bahnui-front/src/assets/icons/bicycle-conveyance-reservation.svg create mode 100644 front/bahnui-front/src/assets/icons/bicycle-conveyance.svg create mode 100644 front/bahnui-front/src/assets/icons/compulsory-reservation.svg create mode 100644 front/bahnui-front/src/assets/icons/on-board-restaurant.svg create mode 100644 front/bahnui-front/src/assets/icons/power-sockets.svg create mode 100644 front/bahnui-front/src/assets/icons/wheelchair-space.svg create mode 100644 front/bahnui-front/src/assets/icons/wifi.svg create mode 100644 front/bahnui-front/src/lib/remarks.js diff --git a/front/bahnui-front/src/assets/icons/2nd-class-only.svg b/front/bahnui-front/src/assets/icons/2nd-class-only.svg new file mode 100644 index 0000000..4e461a1 --- /dev/null +++ b/front/bahnui-front/src/assets/icons/2nd-class-only.svg @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + 1 + + diff --git a/front/bahnui-front/src/assets/icons/55.svg b/front/bahnui-front/src/assets/icons/55.svg new file mode 100644 index 0000000..99b80d7 --- /dev/null +++ b/front/bahnui-front/src/assets/icons/55.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/front/bahnui-front/src/assets/icons/air-conditioned.svg b/front/bahnui-front/src/assets/icons/air-conditioned.svg new file mode 100644 index 0000000..5405352 --- /dev/null +++ b/front/bahnui-front/src/assets/icons/air-conditioned.svg @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/front/bahnui-front/src/assets/icons/barrier-free-vehicle.svg b/front/bahnui-front/src/assets/icons/barrier-free-vehicle.svg new file mode 100644 index 0000000..7ffa973 --- /dev/null +++ b/front/bahnui-front/src/assets/icons/barrier-free-vehicle.svg @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/front/bahnui-front/src/assets/icons/bicycle-conveyance-reservation.svg b/front/bahnui-front/src/assets/icons/bicycle-conveyance-reservation.svg new file mode 100644 index 0000000..312d459 --- /dev/null +++ b/front/bahnui-front/src/assets/icons/bicycle-conveyance-reservation.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + R + + diff --git a/front/bahnui-front/src/assets/icons/bicycle-conveyance.svg b/front/bahnui-front/src/assets/icons/bicycle-conveyance.svg new file mode 100644 index 0000000..12fdecd --- /dev/null +++ b/front/bahnui-front/src/assets/icons/bicycle-conveyance.svg @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/front/bahnui-front/src/assets/icons/compulsory-reservation.svg b/front/bahnui-front/src/assets/icons/compulsory-reservation.svg new file mode 100644 index 0000000..59902df --- /dev/null +++ b/front/bahnui-front/src/assets/icons/compulsory-reservation.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + R + + diff --git a/front/bahnui-front/src/assets/icons/on-board-restaurant.svg b/front/bahnui-front/src/assets/icons/on-board-restaurant.svg new file mode 100644 index 0000000..b7ecde9 --- /dev/null +++ b/front/bahnui-front/src/assets/icons/on-board-restaurant.svg @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + diff --git a/front/bahnui-front/src/assets/icons/power-sockets.svg b/front/bahnui-front/src/assets/icons/power-sockets.svg new file mode 100644 index 0000000..ee5d59b --- /dev/null +++ b/front/bahnui-front/src/assets/icons/power-sockets.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + diff --git a/front/bahnui-front/src/assets/icons/wheelchair-space.svg b/front/bahnui-front/src/assets/icons/wheelchair-space.svg new file mode 100644 index 0000000..043d0b6 --- /dev/null +++ b/front/bahnui-front/src/assets/icons/wheelchair-space.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/front/bahnui-front/src/assets/icons/wifi.svg b/front/bahnui-front/src/assets/icons/wifi.svg new file mode 100644 index 0000000..ddab554 --- /dev/null +++ b/front/bahnui-front/src/assets/icons/wifi.svg @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + diff --git a/front/bahnui-front/src/components/routing.vue b/front/bahnui-front/src/components/routing.vue index b0a6821..2e71d14 100644 --- a/front/bahnui-front/src/components/routing.vue +++ b/front/bahnui-front/src/components/routing.vue @@ -16,11 +16,16 @@
{{ leg.destination.name }}
{{ timeWithDelay(leg.arrival, leg.arrivalDelay) }}

Gleis {{ leg.arrivalPlatform }}

-
-

{{remark.text}}

+
+
+ +
+
+

{{remark.text}}

+
+
-
@@ -29,6 +34,7 @@ import timefunctions from '@/lib/time.js' import routefunctions from '@/lib/routes.js' import operatorfunctions from '@/lib/operators.js' + import remarkfunctions from '@/lib/remarks.js' export default { name: 'RoutingBahn', @@ -76,6 +82,9 @@ getOperatorLogo(line){ return operatorfunctions.getOperatorLogo(line) }, + getIconForRemark(remark){ + return remarkfunctions.getIconForRemark(remark) + }, } } diff --git a/front/bahnui-front/src/lib/remarks.js b/front/bahnui-front/src/lib/remarks.js new file mode 100644 index 0000000..6b27d37 --- /dev/null +++ b/front/bahnui-front/src/lib/remarks.js @@ -0,0 +1,33 @@ +let remarkfunctions = { + getIconForRemark(remark){ + if (!remark){ + return (null); + } else if (remark.code === "55"){ + return new URL('../assets/icons/55.svg', import.meta.url); + } else if (remark.code === "wifi"){ + return new URL('../assets/icons/wifi.svg', import.meta.url); + } else if (remark.code === "air-conditioned"){ + return new URL('../assets/icons/air-conditioned.svg', import.meta.url); + } else if (remark.code === "barrier-free-vehicle"){ + return new URL('../assets/icons/barrier-free-vehicle.svg', import.meta.url); + } else if (remark.code === "compulsory-reservation"){ + return new URL('../assets/icons/compulsory-reservation.svg', import.meta.url); + } else if (remark.code === "on-board-restaurant"){ + return new URL('../assets/icons/on-board-restaurant.svg', import.meta.url); + } else if (remark.code === "power-sockets"){ + return new URL('../assets/icons/power-sockets.svg', import.meta.url); + } else if (remark.code === "wheelchair-space"){ + return new URL('../assets/icons/wheelchair-space.svg', import.meta.url); + } else if (remark.code === "bicycle-conveyance"){ + return new URL('../assets/icons/bicycle-conveyance.svg', import.meta.url); + } else if (remark.code === "bicycle-conveyance-reservation"){ + return new URL('../assets/icons/bicycle-conveyance-reservation.svg', import.meta.url); + } else if (remark.code === "2nd-class-only"){ + return new URL('../assets/icons/2nd-class-only.svg', import.meta.url); + + } else { + return null; + } + } +} +export default remarkfunctions; diff --git a/front/bahnui-front/src/locales/de.json b/front/bahnui-front/src/locales/de.json index ee35565..8721d5b 100644 --- a/front/bahnui-front/src/locales/de.json +++ b/front/bahnui-front/src/locales/de.json @@ -15,5 +15,21 @@ "buttons":{ "searchConnection":"Verbindung suchen" } + }, + "routing":{ + "remarks":{ + "bicycle-conveyance":"Fahrradmitnahme möglich", + "bicycle-conveyance-reservation":"Fahrradmitnahme reservierungspflichtig", + "power-sockets":"Steckdosen für Laptops vorhanden", + "barrier-free-vehicle":"Behindertengerechtes Fahrzeug", + "wheelchairs-space":"Rollstuhlplatz vorhanden", + "air-conditioned":"klimatisiertes Fahrzeug", + "55":"Rauchen verboten", + "wifi":"WLAN vorhanden", + "compulsary-reservation":"Reservierungspflicht", + "2nd-class-only":"Nur 2. Klasse", + "RZ":"Rollstuhlgerechter Einstieg", + "on-board-restaurant":"Boardrestaurant vorhanden" + } } } \ No newline at end of file diff --git a/front/bahnui-front/src/locales/en.json b/front/bahnui-front/src/locales/en.json index 0f53966..c428ce8 100644 --- a/front/bahnui-front/src/locales/en.json +++ b/front/bahnui-front/src/locales/en.json @@ -15,5 +15,21 @@ "buttons":{ "searchConnection":"search connection" } + }, + "routing":{ + "remarks":{ + "bicycle-conveyance":"bicycles allowed", + "bicycle-conveyance-reservation":"bicycles need reservation", + "power-sockets":"power sockets for laptops", + "barrier-free-vehicle":"barrier-free vehicle", + "wheelchairs-space":"wheelchair spaces", + "air-conditioned":"air-conditioned vehicle", + "55":"smoking prohibited", + "wifi":"vehicle with wifi", + "compulsary-reservation":"reservation compulsary", + "2nd-class-only":"2nd class only", + "RZ":"barrier-free boarding for wheelchairs", + "on-board-restaurant":"on-board restaurant" + } } } \ No newline at end of file