mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 11:45:34 +00:00
chore: replaced footer version check with vehicle counters
This commit is contained in:
@@ -9,7 +9,13 @@
|
|||||||
</i18n-t>
|
</i18n-t>
|
||||||
|
|
||||||
<div class="text--grayed" v-if="store.vehiclesData">
|
<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>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -33,6 +39,27 @@ export default defineComponent({
|
|||||||
store: useStore(),
|
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>
|
</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}!",
|
"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": "Train Driver 2 simulator rules",
|
||||||
"tos-href": "https://docs.google.com/document/d/1UAAPUtN0d_RoS4RgOzEzllJZJhA0VcizzCzKW4QylbY/edit#heading=h.1ldcvhomwjp9",
|
"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": {
|
"inputs": {
|
||||||
"title": "CHOOSE A VEHICLE",
|
"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}!",
|
"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": "regulaminem symulatora Train Driver 2",
|
||||||
"tos-href": "https://docs.google.com/document/d/1UAAPUtN0d_RoS4RgOzEzllJZJhA0VcizzCzKW4QylbY/edit",
|
"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": {
|
"inputs": {
|
||||||
"title": "WYBIERZ POJAZD",
|
"title": "WYBIERZ POJAZD",
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ export interface IVehicleData {
|
|||||||
cabinName: string | null;
|
cabinName: string | null;
|
||||||
restrictions: IVehicleRestrictions | null;
|
restrictions: IVehicleRestrictions | null;
|
||||||
vehicleGroupsId: number;
|
vehicleGroupsId: number;
|
||||||
|
simulatorVersion: string;
|
||||||
group: IVehicleGroup;
|
group: IVehicleGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user