mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 05:18:10 +00:00
chore: replaced footer version check with vehicle counters
This commit is contained in:
@@ -9,7 +9,13 @@
|
||||
</i18n-t>
|
||||
|
||||
<div class="text--grayed" v-if="store.vehiclesData">
|
||||
{{ $t('footer.version-check', { version: store.compatibleSimulatorVersion }) }}
|
||||
{{
|
||||
$t('footer.vehicles-count', {
|
||||
all: vehiclesCounters.all,
|
||||
units: vehiclesCounters.units,
|
||||
cars: vehiclesCounters.cars,
|
||||
})
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@@ -33,6 +39,27 @@ export default defineComponent({
|
||||
store: useStore(),
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
vehiclesCounters() {
|
||||
let counters = {
|
||||
all: 0,
|
||||
cars: 0,
|
||||
units: 0,
|
||||
};
|
||||
|
||||
if (!this.store.vehiclesData) return counters;
|
||||
|
||||
this.store.vehiclesData?.forEach((v) => {
|
||||
counters.all += 1;
|
||||
|
||||
if (v.group.locoProps !== null) counters.units += 1;
|
||||
else counters.cars += 1;
|
||||
});
|
||||
|
||||
return counters;
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
+2
-1
@@ -6,7 +6,8 @@
|
||||
"disclaimer": "This site has only an informational intent. The author does not carry any responsibility for creating trains against {tos}!",
|
||||
"tos": "Train Driver 2 simulator rules",
|
||||
"tos-href": "https://docs.google.com/document/d/1UAAPUtN0d_RoS4RgOzEzllJZJhA0VcizzCzKW4QylbY/edit#heading=h.1ldcvhomwjp9",
|
||||
"version-check": "Site is complete for version {version} of Train Driver 2 simulator"
|
||||
"version-check": "Site is complete for version {version} of Train Driver 2 simulator",
|
||||
"vehicles-count": "Site contains currently {all} vehicles - including {units} traction units and {cars} car wagons!"
|
||||
},
|
||||
"inputs": {
|
||||
"title": "CHOOSE A VEHICLE",
|
||||
|
||||
+2
-1
@@ -6,7 +6,8 @@
|
||||
"disclaimer": "Ta strona ma charakter informacyjny. Autor nie ponosi odpowiedzialności za tworzenie pociągów niezgodnych z {tos}!",
|
||||
"tos": "regulaminem symulatora Train Driver 2",
|
||||
"tos-href": "https://docs.google.com/document/d/1UAAPUtN0d_RoS4RgOzEzllJZJhA0VcizzCzKW4QylbY/edit",
|
||||
"version-check": "Strona jest kompletna dla wersji {version} symulatora TD2"
|
||||
"version-check": "Strona jest kompletna dla wersji {version} symulatora TD2",
|
||||
"vehicles-count": "Strona zawiera obecnie {all} pojazdów - w tym {units} jednostek trakcyjnych i {cars} wagonów!"
|
||||
},
|
||||
"inputs": {
|
||||
"title": "WYBIERZ POJAZD",
|
||||
|
||||
@@ -70,6 +70,7 @@ export interface IVehicleData {
|
||||
cabinName: string | null;
|
||||
restrictions: IVehicleRestrictions | null;
|
||||
vehicleGroupsId: number;
|
||||
simulatorVersion: string;
|
||||
group: IVehicleGroup;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user