Skip to content

Commit

Permalink
fix: show correct start point to enter (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayfinn committed Sep 20, 2023
1 parent 22af2c0 commit d947bc5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/views/liveView/Main.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,13 @@
currentSection.actions[$liveJourney.currentAction].instruction;
} else if (currentSection.intermediateStops) {
let id = $liveJourney.currentIntermediateStop;
let stop = currentSection.intermediateStops[id];
if (currentSection.intermediateStops.length === 0) {
currentSupportBoxText = `Steige bei ${currentSection.departure.place.name} in die ${currentSection.transport.name} Richtung ${currentSection.transport.headsign} ein und steige bei ${currentSection.arrival.place.name} wieder aus.`;
} else {
switch (id) {
case 0:
currentSupportBoxText = `Steige bei ${stop.departure.place.name} in die ${currentSection.transport.name} Richtung ${currentSection.transport.headsign} ein.`;
currentSupportBoxText = `Steige bei ${currentSection.departure.place.name} in die ${currentSection.transport.name} Richtung ${currentSection.transport.headsign} ein.`;
break;
case currentSection.intermediateStops.length - 1:
currentSupportBoxText = `Gehe zum Ausgang und steige bei ${currentSection.arrival.place.name} aus.`;
Expand All @@ -220,7 +219,7 @@
}
}
} else {
currentSupportBoxText = `Du musst von {currentSection.departure.place.name} nach {currentSection.arrival.place.name}`;
currentSupportBoxText = `Du musst von ${currentSection.departure.place.name} nach ${currentSection.arrival.place.name}`;
}
}
Expand Down

0 comments on commit d947bc5

Please sign in to comment.