mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
Poprawki do zmiany serwerów TD2, ogólne
This commit is contained in:
@@ -14,26 +14,28 @@
|
||||
<div class="card_title flex">{{ $t("filters.title") }}</div>
|
||||
|
||||
<section class="card_regions">
|
||||
<span
|
||||
v-for="region in inputs.regions"
|
||||
:key="region.id"
|
||||
:class="`region-${region.id}`"
|
||||
>
|
||||
<label>
|
||||
<input
|
||||
type="radio"
|
||||
name="region"
|
||||
:id="region.id"
|
||||
:value="region"
|
||||
v-model="currentRegion"
|
||||
@change="handleChangeRegion"
|
||||
/>
|
||||
<div class="regions_content">
|
||||
<span
|
||||
v-for="region in inputs.regions"
|
||||
:key="region.id"
|
||||
:class="`region-${region.id}`"
|
||||
>
|
||||
<label>
|
||||
<input
|
||||
type="radio"
|
||||
name="region"
|
||||
:id="region.id"
|
||||
:value="region"
|
||||
v-model="currentRegion"
|
||||
@change="handleChangeRegion"
|
||||
/>
|
||||
|
||||
<span :class="{ checked: currentRegion.id === region.id }">
|
||||
{{ region.value }}
|
||||
</span>
|
||||
</label>
|
||||
</span>
|
||||
<span :class="{ checked: currentRegion.id === region.id }">
|
||||
{{ region.value }}
|
||||
</span>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="card_options">
|
||||
@@ -97,7 +99,7 @@ import { ACTIONS, GETTERS, MUTATIONS } from "@/constants/storeConstants";
|
||||
import inputData from "@/data/options.json";
|
||||
|
||||
import StorageManager from "@/scripts/managers/storageManager";
|
||||
import { defineComponent, inject, provide, ref } from "@vue/runtime-core";
|
||||
import { defineComponent, inject } from "@vue/runtime-core";
|
||||
import ActionButton from "../Global/ActionButton.vue";
|
||||
import FilterOption from "./FilterOption.vue";
|
||||
|
||||
@@ -155,6 +157,8 @@ export default defineComponent({
|
||||
handleChangeRegion() {
|
||||
this.$store.commit(MUTATIONS.SET_REGION, this.currentRegion);
|
||||
this.$store.dispatch(ACTIONS.fetchOnlineData);
|
||||
|
||||
this.closeCard();
|
||||
},
|
||||
|
||||
invertFilters() {
|
||||
|
||||
@@ -80,8 +80,8 @@
|
||||
</td>
|
||||
|
||||
<td class="station_status">
|
||||
<span class="status-badge" :class="station.statusID"
|
||||
>{{ $t(`status.${station.statusID}`) }}
|
||||
<span class="status-badge" :class="station.statusID">
|
||||
{{ $t(`status.${station.statusID}`) }}
|
||||
{{
|
||||
station.statusID == "online" ? station.statusTimeString : ""
|
||||
}}
|
||||
@@ -96,10 +96,9 @@
|
||||
<span
|
||||
v-if="station.online"
|
||||
:style="calculateExpStyle(station.dispatcherExp)"
|
||||
>{{
|
||||
2 > station.dispatcherExp ? "L" : station.dispatcherExp
|
||||
}}</span
|
||||
>
|
||||
{{ 2 > station.dispatcherExp ? "L" : station.dispatcherExp }}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td class="station_tracks twoway">
|
||||
@@ -198,15 +197,19 @@
|
||||
class="station_schedules"
|
||||
:class="{ inactive: !station.online }"
|
||||
>
|
||||
<span class="highlight">
|
||||
{{ station.scheduledTrains.length }}
|
||||
<span>
|
||||
<span class="highlight">
|
||||
{{ station.scheduledTrains.length }}
|
||||
</span>
|
||||
/
|
||||
<span style="color: #bbb">
|
||||
{{
|
||||
station.scheduledTrains.filter(
|
||||
(train) => train.stopInfo.confirmed
|
||||
).length
|
||||
}}
|
||||
</span>
|
||||
</span>
|
||||
/
|
||||
<span style="color: #bbb">{{
|
||||
station.scheduledTrains.filter(
|
||||
(train) => train.stopInfo.confirmed
|
||||
).length
|
||||
}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -217,7 +220,7 @@
|
||||
{{ $t("sceneries.no-stations") }}
|
||||
</div>
|
||||
|
||||
<div class="no-stations" v-if="!isDataLoaded">
|
||||
<div class="no-stations" v-if="!isDataLoaded && stations.length == 0">
|
||||
{{ $t("app.loading") }}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user