mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
fix: added timetable status for beginning offline
This commit is contained in:
@@ -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:
|
||||||
|
if (prevElement) {
|
||||||
stopStatusIndicator = this.$t('timetables.desc-arriving', {
|
stopStatusIndicator = this.$t('timetables.desc-arriving', {
|
||||||
prevStationName: prevElement?.stationName ?? '',
|
prevStationName: prevElement?.stationName ?? '',
|
||||||
prevDepartureLine: prevElement?.departureRouteExt ?? ''
|
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;
|
||||||
|
|
||||||
|
|||||||
@@ -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>",
|
||||||
|
|||||||
@@ -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>",
|
||||||
|
|||||||
Reference in New Issue
Block a user