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() {
const { status, prevElement, currentElement, nextElement } = this.sceneryTimetableRow;
const prevDepartureIndicator = prevElement?.departureRouteExt
? `(${prevElement.departureRouteExt}) ${prevElement.stationName}`
: '---';
const nextArrivalIndicator = nextElement?.arrivalRouteExt
? `(${nextElement.arrivalRouteExt}) ${nextElement.stationName}`
: `${currentElement.stationName}`;
let stopStatusDescription = '',
stopStatusIndicator = '';
let stopStatusIndicator = '';
switch (status) {
case StopStatus.ARRIVING:
stopStatusIndicator = this.$t('timetables.desc-arriving', {
prevStationName: prevElement?.stationName ?? '',
prevDepartureLine: prevElement?.departureRouteExt ?? ''
});
if (prevElement) {
stopStatusIndicator = this.$t('timetables.desc-arriving', {
prevStationName: prevElement?.stationName ?? '',
prevDepartureLine: prevElement?.departureRouteExt ?? ''
});
} else {
stopStatusIndicator = this.$t('timetables.desc-beginning');
}
break;
case StopStatus.ONLINE:
@@ -56,8 +51,6 @@ export default defineComponent({
break;
case StopStatus.DEPARTED:
// stopStatusIndicator = `${this.$t('timetables.to')}: ${nextArrivalIndicator}`;
if (!nextElement?.stationName) {
stopStatusIndicator = this.$t('timetables.desc-departed-ends', {
nextStationName: currentElement.stationName
@@ -72,7 +65,6 @@ export default defineComponent({
break;
case StopStatus.DEPARTED_AWAY:
// stopStatusIndicator = `${this.$t('timetables.to')}: ${nextArrivalIndicator}`;
stopStatusIndicator = this.$t('timetables.desc-departed-away', {
nextStationName: nextElement?.stationName,
nextArrivalLine: nextElement?.arrivalRouteExt
@@ -80,7 +72,6 @@ export default defineComponent({
break;
case StopStatus.TERMINATED:
// stopStatusIndicator = `X ${this.$t('timetables.desc-terminated')}`;
stopStatusIndicator = this.$t('timetables.desc-terminated');
break;
+1
View File
@@ -591,6 +591,7 @@
"terminates": "TERMINATES\nHERE",
"from": "Arrives from",
"to": "Departs to",
"desc-beginning": "The train begins here",
"desc-arriving": "<i>Arrives from: <b>{prevStationName} ({prevDepartureLine})</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>",
+1
View File
@@ -577,6 +577,7 @@
"terminates": "KOŃCZY BIEG",
"from": "Przyjedzie z",
"to": "Odjeżdża do",
"desc-beginning": "Pociąg rozpoczyna bieg",
"desc-arriving": "<i>Przyjedzie z: <b>{prevStationName} ({prevDepartureLine})</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>",