fix: added timetable status for beginning offline

This commit is contained in:
2025-07-04 18:22:41 +02:00
parent a2602aeefe
commit 8909a0cd40
3 changed files with 11 additions and 18 deletions
@@ -26,23 +26,18 @@ export default defineComponent({
computedScheduledTrain() { computedScheduledTrain() {
const { status, prevElement, currentElement, nextElement } = this.sceneryTimetableRow; const { status, prevElement, currentElement, nextElement } = this.sceneryTimetableRow;
const prevDepartureIndicator = prevElement?.departureRouteExt let stopStatusIndicator = '';
? `(${prevElement.departureRouteExt}) ${prevElement.stationName}`
: '---';
const nextArrivalIndicator = nextElement?.arrivalRouteExt
? `(${nextElement.arrivalRouteExt}) ${nextElement.stationName}`
: `${currentElement.stationName}`;
let stopStatusDescription = '',
stopStatusIndicator = '';
switch (status) { switch (status) {
case StopStatus.ARRIVING: case StopStatus.ARRIVING:
stopStatusIndicator = this.$t('timetables.desc-arriving', { if (prevElement) {
prevStationName: prevElement?.stationName ?? '', stopStatusIndicator = this.$t('timetables.desc-arriving', {
prevDepartureLine: prevElement?.departureRouteExt ?? '' prevStationName: prevElement?.stationName ?? '',
}); prevDepartureLine: prevElement?.departureRouteExt ?? ''
});
} else {
stopStatusIndicator = this.$t('timetables.desc-beginning');
}
break; break;
case StopStatus.ONLINE: case StopStatus.ONLINE:
@@ -56,8 +51,6 @@ export default defineComponent({
break; break;
case StopStatus.DEPARTED: case StopStatus.DEPARTED:
// stopStatusIndicator = `${this.$t('timetables.to')}: ${nextArrivalIndicator}`;
if (!nextElement?.stationName) { if (!nextElement?.stationName) {
stopStatusIndicator = this.$t('timetables.desc-departed-ends', { stopStatusIndicator = this.$t('timetables.desc-departed-ends', {
nextStationName: currentElement.stationName nextStationName: currentElement.stationName
@@ -72,7 +65,6 @@ export default defineComponent({
break; break;
case StopStatus.DEPARTED_AWAY: case StopStatus.DEPARTED_AWAY:
// stopStatusIndicator = `${this.$t('timetables.to')}: ${nextArrivalIndicator}`;
stopStatusIndicator = this.$t('timetables.desc-departed-away', { stopStatusIndicator = this.$t('timetables.desc-departed-away', {
nextStationName: nextElement?.stationName, nextStationName: nextElement?.stationName,
nextArrivalLine: nextElement?.arrivalRouteExt nextArrivalLine: nextElement?.arrivalRouteExt
@@ -80,7 +72,6 @@ export default defineComponent({
break; break;
case StopStatus.TERMINATED: case StopStatus.TERMINATED:
// stopStatusIndicator = `X ${this.$t('timetables.desc-terminated')}`;
stopStatusIndicator = this.$t('timetables.desc-terminated'); stopStatusIndicator = this.$t('timetables.desc-terminated');
break; break;
+1
View File
@@ -591,6 +591,7 @@
"terminates": "TERMINATES\nHERE", "terminates": "TERMINATES\nHERE",
"from": "Arrives from", "from": "Arrives from",
"to": "Departs to", "to": "Departs to",
"desc-beginning": "The train begins here",
"desc-arriving": "<i>Arrives from: <b>{prevStationName} ({prevDepartureLine})</b></i>", "desc-arriving": "<i>Arrives from: <b>{prevStationName} ({prevDepartureLine})</b></i>",
"desc-online": "On scenery / <i>direction: <b>{nextStationName} ({nextArrivalLine})</b></i>", "desc-online": "On scenery / <i>direction: <b>{nextStationName} ({nextArrivalLine})</b></i>",
"desc-stopped": "On scenery - stopped / <i>direction: <b>{nextStationName} ({nextArrivalLine})</b></i>", "desc-stopped": "On scenery - stopped / <i>direction: <b>{nextStationName} ({nextArrivalLine})</b></i>",
+1
View File
@@ -577,6 +577,7 @@
"terminates": "KOŃCZY BIEG", "terminates": "KOŃCZY BIEG",
"from": "Przyjedzie z", "from": "Przyjedzie z",
"to": "Odjeżdża do", "to": "Odjeżdża do",
"desc-beginning": "Pociąg rozpoczyna bieg",
"desc-arriving": "<i>Przyjedzie z: <b>{prevStationName} ({prevDepartureLine})</b></i>", "desc-arriving": "<i>Przyjedzie z: <b>{prevStationName} ({prevDepartureLine})</b></i>",
"desc-online": "Na scenerii / <i>kierunek: <b>{nextStationName} ({nextArrivalLine})</b></i>", "desc-online": "Na scenerii / <i>kierunek: <b>{nextStationName} ({nextArrivalLine})</b></i>",
"desc-stopped": "Na scenerii - postój / <i>kierunek: <b>{nextStationName} ({nextArrivalLine})</b></i>", "desc-stopped": "Na scenerii - postój / <i>kierunek: <b>{nextStationName} ({nextArrivalLine})</b></i>",