Skip to content

Commit

Permalink
Merge branch 'next' into mobidatabw
Browse files Browse the repository at this point in the history
# Conflicts:
#	app/translations.js
#	package.json
#	yarn.lock
  • Loading branch information
hbruch committed Oct 1, 2024
2 parents af6cba9 + 9e3a6f3 commit 392c2ee
Show file tree
Hide file tree
Showing 19 changed files with 1,317 additions and 1,076 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/dev-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 16.x ]
node-version: [ 20.x ]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint-test-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16
v20
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax = docker/dockerfile:1.4
FROM node:16-alpine as builder
FROM node:20-alpine as builder

WORKDIR /opt/digitransit-ui

Expand Down Expand Up @@ -55,7 +55,7 @@ RUN \
RUN \
rm -rf static docs .cache

FROM node:16-alpine
FROM node:20-alpine
LABEL org.opencontainers.image.title="digitransit-ui"
LABEL org.opencontainers.image.description="open nationwide journey planning platform"
LABEL org.opencontainers.image.authors="[email protected]"
Expand Down
6 changes: 5 additions & 1 deletion app/component/IndexPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,11 @@ class IndexPage extends React.Component {
if (config.welcomeMessage) {
const welcome = config.welcomeMessage[lang];

return (
return welcome.imageUrl ? (
<a href={welcome.linkUrl} rel="noreferrer" target="_blank">
<img alt={welcome.imageAltText} src={welcome.imageUrl} />
</a>
) : (
<div>
<h2>{welcome.header}</h2>
{welcome.paragraphs &&
Expand Down
19 changes: 19 additions & 0 deletions app/component/ItineraryTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ class ItineraryTab extends React.Component {
);
};

shouldShowCarpoolDisclaimer = (itinerary, config) => {
const hasCarpoolLegs = itinerary.legs.some(l => l.mode === 'CARPOOL');
return hasCarpoolLegs && config.carpoolDisclaimer;
};

printItinerary = e => {
e.stopPropagation();

Expand Down Expand Up @@ -236,6 +241,7 @@ class ItineraryTab extends React.Component {
}
}
}

const suggestionIndex = this.context.match.params.secondHash
? Number(this.context.match.params.secondHash) + 1
: Number(this.context.match.params.hash) + 1;
Expand Down Expand Up @@ -338,6 +344,19 @@ class ItineraryTab extends React.Component {
focusToLeg={this.props.focusToLeg}
toggleCarpoolDrawer={this.props.toggleCarpoolDrawer}
/>
{ this.shouldShowCarpoolDisclaimer(itinerary, config) && (
<div className="itinerary-disclaimer">
<div className="info-container">
<div className="icon-container">
<Icon className="info" img="icon-icon_info" />
</div>
<div className="description-container">
{config.carpoolDisclaimer}
</div>
</div>
</div>
)}

{shouldShowFareInfo(config) && (
<TicketInformation
fares={fares}
Expand Down
12 changes: 1 addition & 11 deletions app/configurations/config.herrenberg.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,6 @@ const maxLon = 9.9014;
export default configMerger(parentConfig, {
CONFIG,

issueTrackerUrl: 'https://maengelmelder.service-bw.de/?lat=${lat}&lng=${lon}',
// issueTrackerUrls define issuetracker URLs per postalCode. In case none matches, issueTrackerUrl is used as falllback
issueTrackerUrls: {
'71083': 'https://www.herrenberg.de/tools/mvs/?lat=${lat}&lng=${lon}#mvPagePictures',
'71634': 'https://www.ludwigsburg.de/,Lde/start/stadt_buerger/maengelmelder.html?uri=/bms/create%3Flat=${lat}%26lon=${lon}',
'71636': 'https://www.ludwigsburg.de/,Lde/start/stadt_buerger/maengelmelder.html?uri=/bms/create%3Flat=${lat}%26lon=${lon}',
'71638': 'https://www.ludwigsburg.de/,Lde/start/stadt_buerger/maengelmelder.html?uri=/bms/create%3Flat=${lat}%26lon=${lon}',
'71640': 'https://www.ludwigsburg.de/,Lde/start/stadt_buerger/maengelmelder.html?uri=/bms/create%3Flat=${lat}%26lon=${lon}',
'71642': 'https://www.ludwigsburg.de/,Lde/start/stadt_buerger/maengelmelder.html?uri=/bms/create%3Flat=${lat}%26lon=${lon}',
},

cityBike: {
minZoomStopsNearYou: 10,
showStationId: false,
Expand Down Expand Up @@ -242,6 +231,7 @@ export default configMerger(parentConfig, {
},

logo: 'herrenberg/stadtnavi-herrenberg-logo.svg',
secondaryLogo: 'herrenberg/stadtnavi-logo-green.svg',

feedIds: ['hbg'],

Expand Down
1 change: 1 addition & 0 deletions app/configurations/config.ludwigsburg.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default configMerger(parentConfig, {
title: APP_TITLE,
favicon: './app/configurations/images/ludwigsburg/favicon.png',
logo: 'ludwigsburg/stadtnavi-ludwigsburg-logo.svg',
secondaryLogo: 'ludwigsburg/stadtnavi-logo-yellow.svg',

searchParams: {
'boundary.rect.min_lat': 48.34164,
Expand Down
65 changes: 0 additions & 65 deletions app/configurations/config.stadtnavi.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export default configMerger(parentConfig, {

availableLanguages: ['de', 'en'],
defaultLanguage: 'de',
issueTrackerUrl: 'https://maengelmelder.service-bw.de/?lat=${lat}&lng=${lon}',
// issueTrackerUrls define issuetracker URLs per postalCode. In case none matches, issueTrackerUrl is used as falllback
issueTrackerUrls: {
'71083': 'https://www.herrenberg.de/tools/mvs/?lat=${lat}&lng=${lon}#mvPagePictures',
Expand Down Expand Up @@ -410,70 +409,6 @@ export default configMerger(parentConfig, {
],
},

aboutThisService: {
de: [
{
header: 'Über diesen Dienst',
paragraphs: [
'stadtnavi ist eine Reiseplanungs-Anwendung für die Stadt Herrenberg und Umgebung. Dieser Dienst umfasst ÖPNV, Fußwege, Radverkehr, Straßen- und Parkplatzinformationen, Ladeinfrastruktur und Sharing-Angebote. Mobilitätsangebote werden durch intermodales Routing miteinander vernetzt.',
'Gefördert durch <br>',
'<a href="https://www.herrenberg.de/stadtluft"><img src="https://www.herrenberg.de/ceasy/resource/?id=4355&predefinedImageSize=rightEditorContent"/></a>',

],
},
{
header: 'Mitmachen',
paragraphs: [
'Die Stadt Herrenberg hat diese App im Rahmen der Modellstadt, gefördert durch das Bundesministerium für Verkehr und digitale Infrastruktur (BMVI) entwickelt. stadtnavi Anwendung ist eine Open Source Lösung und kann von anderen Kommunen und Akteuren unter ihrem Namen und Erscheinungsbild verwendet und an individuelle Bedürfnisse angepasst und weiterentwickelt werden (White Label Lösung). Mitmachen ist gewünscht!',
]
},
{
header: 'Digitransit Plattform',
paragraphs: [
'Dieser Dienst basiert auf der Digitransit Platform und dem Backend-Dienst OpenTripPlanner. Alle Software ist unter einer offenen Lizenzen verfügbar. Vielen Dank an alle Beteiligten.',
'Der gesamte Quellcode der Plattform, die aus vielen verschiedenen Komponenten besteht, ist auf <a href="https://github.com/stadtnavi/">Github</a> verfügbar.'
],
},
{
header: 'Datenquellen',
paragraphs: [
'Kartendaten: © <a target=new href=https://www.openstreetmap.org/>OpenStreetMap Mitwirkende</a>',
'ÖPNV-Daten: Datensätze der <a target=new href=https://www.nvbw.de/aufgaben/digitale-mobilitaet/open-data/>NVBW GmbH</a> und der <a target=new href=https://www.openvvs.de/dataset/gtfs-daten>VVS GmbH</a>, Shapes (d.h. Geometrien der Streckenverläufe) jeweils angereichert mit OpenStreetMap-Daten © OpenStreetMap Mitwirkende',
'Alle Angaben ohne Gewähr.'
],
},
],
en: [
{
header: 'About this service',
paragraphs: [
'stadtnavi is a travel planning application for the city of Herrenberg and its surroundings. This service includes public transport, footpaths, cycling, street and parking information, charging infrastructure and sharing offerings. The mobility offerings are connected through intermodal routing.',
'<a href="https://www.herrenberg.de/stadtluft"><img src="https://www.herrenberg.de/ceasy/resource/?id=4355&predefinedImageSize=rightEditorContent"/></a>',
],
},
{
header: 'Contribute',
paragraphs: [
'The city of Herrenberg has developed this app, funded by the Federal Ministry of Transport and Digital Infrastructure (BMVI), as model city. The stadtnavi app is an open source solution and can be used, customized and further developed by other municipalities to meet individual needs (white lable solution). Participation is welcome!',
]
},
{
header: 'Digitransit platform',
paragraphs: [
'The Digitransit service platform is an open source routing platform developed by HSL and Traficom. It builds on OpenTripPlanner by Conveyal. Enhancements by Transportkollektiv and MITFAHR|DE|ZENTRALE. All software is open source. Thanks to everybody working on this!',
],
},
{
header: 'Data sources',
paragraphs: [
'Map data: © <a target=new href=https://www.openstreetmap.org/>OpenStreetMap contributors</a>',
'Public transit data: Datasets by <a target=new href=https://www.nvbw.de/aufgaben/digitale-mobilitaet/open-data/>NVBW GmbH</a> and <a target=new href=https://www.openvvs.de/dataset/gtfs-daten>VVS GmbH</a>, Shapes (d.h. Geometrien der Streckenverläufe) enhanced with OpenStreetMap data © OpenStreetMap contributors',
'No responsibility is accepted for the accuracy of this information.'
],
},
],
},

redirectReittiopasParams: true,

transportModes: {
Expand Down
25 changes: 22 additions & 3 deletions app/configurations/config.vpe.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,15 @@ export default configMerger(parentConfig, {
label: `© VPE GmbH ${YEAR}`
},
content: [
{
name: 'current-alerts',
nameEn: 'Current Alerts',
href: 'https://startmobi.vpe.de/rss/',
icon: 'icon-icon_warning',
},
{
name: 'about-this-service',
nameEn: 'About this service',
nameEn: 'About this Service',
route: '/dieser-dienst',
icon: 'icon-icon_info',
},
Expand Down Expand Up @@ -182,7 +188,8 @@ export default configMerger(parentConfig, {
paragraphs: [
'Kartendaten: © <a target=new href=https://www.openstreetmap.org/>OpenStreetMap Mitwirkende</a>',
'ÖPNV-Daten: Datensätze der <a target=new href=https://www.nvbw.de/aufgaben/digitale-mobilitaet/open-data/>NVBW GmbH</a>, Shapes (d.h. Geometrien der Streckenverläufe) jeweils angereichert mit OpenStreetMap-Daten © OpenStreetMap Mitwirkende',
'Sharing-Daten: Car-Sharing-Standorte bereitgestellt durch <a href="https://karlsruhe.stadtmobil.de/">stadtmobil Karlsruhe</a>',
'Carsharing-Daten: Car-Sharing-Standorte bereitgestellt durch <a href="https://karlsruhe.stadtmobil.de/">stadtmobil Karlsruhe</a>',
'Mitfahrangebote: Mitfahrangebote für das Gebiet Baden-Württemberg werden bereitgestellt durch <a href="https://fahrgemeinschaft.de">Fahrgemeinschaft.de</a>. Sind Sie Anbieter einer Mitfahrplattform und möchten mit Ihrem Angebot ebenfalls in <b>VPE</b>mobi erscheinen? Dann nehmen Sie gerne Kontakt mit uns auf.',
'Alle Angaben ohne Gewähr.'
],
},
Expand All @@ -207,7 +214,8 @@ export default configMerger(parentConfig, {
paragraphs: [
'Map data: © <a target=new href=https://www.openstreetmap.org/>OpenStreetMap contributors</a>',
'Public transit data: Datasets by <a target=new href=https://www.nvbw.de/aufgaben/digitale-mobilitaet/open-data/>NVBW GmbH</a>, Shapes (d.h. Geometrien der Streckenverläufe) enhanced with OpenStreetMap data © OpenStreetMap contributors',
'Sharing data: carsharing locations are provided by <a href="https://karlsruhe.stadtmobil.de/">stadtmobil Karlsruhe</a>',
'Carsharing data: carsharing locations are provided by <a href="https://karlsruhe.stadtmobil.de/">stadtmobil Karlsruhe</a>',
'Carpooling data: Carpooling offers for the area of Baden-Württemberg are provided by <a href="https://fahrgemeinschaft.de">Fahrgemeinschaft.de</a>.',
'No responsibility is accepted for the accuracy of this information.'
],
},
Expand Down Expand Up @@ -259,4 +267,15 @@ export default configMerger(parentConfig, {

// live bus locations
vehicles: false,

// Disclaimer shown if trip has a leg with mode=CARPOOL
carpoolDisclaimer: 'Der VPE stellt lediglich die Plattform zur Verfügung, auf der Personen Mitfahrangebote veröffentlichen können, um von möglichen Mitfahrer*innen kontaktiert zu werden. Der VPE ist weder an einer etwaigen Vereinbarung zwischen Fahrenden und Mitfahrenden beteiligt noch haftet er für deren Verhalten im Zusammenhang mit der Durchführung der Fahrt, den Zustand des eingesetzten Fahrzeugs oder das Zustandekommen der Fahrt.',

welcomeMessage: {
'de': {
imageUrl: '/img/vpe-mitfahrportal.png',
imageAltText: 'Mitfahrgelegenheit bieten und buchen - ab sofort über das Mitfahrportal des VPE!',
linkUrl: 'https://startmobi.vpe.de/mitfahrportal/',
}
}
});
Loading

0 comments on commit 392c2ee

Please sign in to comment.