Liczba wagonów pod ikoną lokomotywy

This commit is contained in:
2021-06-18 00:26:27 +02:00
parent 539a3db48b
commit 48fc79e9f5
3 changed files with 17 additions and 19 deletions
+13 -17
View File
@@ -226,18 +226,11 @@
/> />
</span> </span>
<div class="driver-cars"> <div
<!-- {{ class="driver-cars"
train.cars.length == 0 v-html="calculateCars(train.locoType, train.cars) "
? "EZT" >
: `${train.cars.length} wagon${
train.cars.length % 10 >= 5
? "ów"
: train.cars.length == 1
? ""
: "y"
}`
}} -->
</div> </div>
</span> </span>
@@ -424,15 +417,18 @@ export default class TrainTable extends Vue {
!stop.stopNameRAW.includes("po.") && !stop.stopNameRAW.includes("po.") &&
!stop.stopNameRAW.includes("SBL") !stop.stopNameRAW.includes("SBL")
) )
acc.push( acc.push(`<span style='color:${ stop.confirmed ? "springgreen" : "lightgray" }'>${stop.stopName}</span>`);
`<span style='color:${
stop.confirmed ? "springgreen" : "lightgray"
}'>${stop.stopName}</span>`
);
return acc; return acc;
}, []) }, [])
.join(" > "); .join(" > ");
} }
calculateCars(locoType: string, cars: string[]) {
if (cars.length == 0 && locoType.includes("EN")) return "EZT";
else if (cars.length == 0) return "LOK";
return `${this.$t("trains.cars")}: <span style='color:gold'> ${cars.length}</span>`;
}
} }
</script> </script>
+2 -1
View File
@@ -107,7 +107,8 @@
"detailed-timetable": "Detailed timetable for train no. ", "detailed-timetable": "Detailed timetable for train no. ",
"via-title": "Via: ", "via-title": "Via: ",
"no-timetable": "no current timetable", "no-timetable": "no current timetable",
"distance-exceeded": "Attention! Due to an internal error, timetables with route distance greater than 200km might be incorrect!" "distance-exceeded": "Attention! Due to an internal error, timetables with route distance greater than 200km might be incorrect!",
"cars": "Cars"
}, },
"journal": { "journal": {
"title": "SCENERY ACTIVITY JOURNAL", "title": "SCENERY ACTIVITY JOURNAL",
+2 -1
View File
@@ -107,7 +107,8 @@
"detailed-timetable": "Szczegółowy rozkład jazdy pociągu ", "detailed-timetable": "Szczegółowy rozkład jazdy pociągu ",
"via-title": "Przez: ", "via-title": "Przez: ",
"no-timetable": "brak rozkładu jazdy", "no-timetable": "brak rozkładu jazdy",
"distance-exceeded": "Uwaga! Z powodu wewnętrznego błędu serwera TD2, rozkłady jazdy o kilometrażu powyżej 200km mogą być niepoprawne!" "distance-exceeded": "Uwaga! Z powodu wewnętrznego błędu serwera TD2, rozkłady jazdy o kilometrażu powyżej 200km mogą być niepoprawne!",
"cars": "Wagony"
}, },
"journal": { "journal": {
"title": "DZIENNIK AKTYWNOŚCI SCENERII", "title": "DZIENNIK AKTYWNOŚCI SCENERII",