mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
Wsparcie języka angielskiego (beta)
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
<span
|
||||
class="option-content"
|
||||
:class="option.section + (option.value ? ' checked' : '')"
|
||||
>{{ option.content }}</span
|
||||
>{{ $t(`filters.${option.id}`) }}</span
|
||||
>
|
||||
</label>
|
||||
</div>
|
||||
@@ -42,7 +42,9 @@
|
||||
|
||||
<span class="slider-value">{{ slider.value }}</span>
|
||||
|
||||
<div class="slider-content">{{ slider.content }}</div>
|
||||
<div class="slider-content">
|
||||
{{ $t(`filters.sliders.${slider.id}`) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -51,15 +53,17 @@
|
||||
<label>
|
||||
<input type="checkbox" v-model="saveOptions" @change="saveFilters" />
|
||||
<span class="save" :class="{ checked: saveOptions }">
|
||||
ZAPISZ FILTRY
|
||||
{{ $t("filters.save") }}
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-actions flex">
|
||||
<button class="button" @click="resetFilters">RESET FILTRÓW</button>
|
||||
<button class="button" @click="exit">ZAMKNIJ FILTRY</button>
|
||||
<button class="button" @click="resetFilters">
|
||||
{{ $t("filters.reset") }}
|
||||
</button>
|
||||
<button class="button" @click="exit">{{ $t("filters.close") }}</button>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -4,7 +4,56 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- <th v-html="$t('sceneries.station')"></th>
|
||||
<th v-html="$t('sceneries.min-lvl')"></th>
|
||||
<th v-html="$t('sceneries.status')"></th>
|
||||
<th v-html="$t('sceneries.dispatcher')"></th>
|
||||
<th v-html="$t('sceneries.dispatcher-lvl')"></th>
|
||||
<th v-html="$t('sceneries.routes')"></th>
|
||||
<th v-html="$t('sceneries.general')"></th>
|
||||
<th v-html="$t('sceneries.drivers-online')"></th>
|
||||
<th v-html="$t('sceneries.spawns')"></th>
|
||||
<th v-html="$t('sceneries.timetables')"></th> -->
|
||||
|
||||
<th
|
||||
v-for="(id, i) in headIds"
|
||||
:key="id"
|
||||
@click="() => changeSorter(i)"
|
||||
>
|
||||
<span class="header_wrapper">
|
||||
<div v-html="$t(`sceneries.${id}`)"></div>
|
||||
|
||||
<img
|
||||
class="sort-icon"
|
||||
v-if="sorterActive.index == i"
|
||||
:src="sorterActive.dir == 1 ? ascIcon : descIcon"
|
||||
alt
|
||||
/>
|
||||
</span>
|
||||
</th>
|
||||
|
||||
<th
|
||||
v-for="(id, i) in headIconsIds"
|
||||
:key="id"
|
||||
@click="() => changeSorter(i + 7)"
|
||||
>
|
||||
<span class="header_wrapper">
|
||||
<img
|
||||
:src="require(`@/assets/icon-${id}.svg`)"
|
||||
:alt="id"
|
||||
:title="$t(`sceneries.${id}s`)"
|
||||
/>
|
||||
|
||||
<img
|
||||
class="sort-icon"
|
||||
v-if="sorterActive.index == i + 7"
|
||||
:src="sorterActive.dir == 1 ? ascIcon : descIcon"
|
||||
alt
|
||||
/>
|
||||
</span>
|
||||
</th>
|
||||
|
||||
<!-- <th
|
||||
v-for="(head, i) in headTitles"
|
||||
:key="i"
|
||||
@click="() => changeSorter(i)"
|
||||
@@ -28,7 +77,7 @@
|
||||
alt
|
||||
/>
|
||||
</span>
|
||||
</th>
|
||||
</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -204,7 +253,6 @@
|
||||
import { Component, Prop } from "vue-property-decorator";
|
||||
|
||||
import Station from "@/scripts/interfaces/Station";
|
||||
|
||||
import styleMixin from "@/mixins/styleMixin";
|
||||
|
||||
import Options from "@/components/StationsView/Options.vue";
|
||||
@@ -228,6 +276,18 @@ export default class StationTable extends styleMixin {
|
||||
ascIcon: string = require("@/assets/icon-arrow-asc.svg");
|
||||
descIcon: string = require("@/assets/icon-arrow-desc.svg");
|
||||
|
||||
headIds = [
|
||||
"station",
|
||||
"min-lvl",
|
||||
"status",
|
||||
"dispatcher",
|
||||
"dispatcher-lvl",
|
||||
"routes",
|
||||
"general",
|
||||
];
|
||||
|
||||
headIconsIds = ["user", "spawn", "timetable"];
|
||||
|
||||
headTitles: string[][] = [
|
||||
["Stacja"],
|
||||
["Min. poziom", "dyżurnego"],
|
||||
|
||||
@@ -16,7 +16,9 @@
|
||||
@click="() => chooseOption(option)"
|
||||
>
|
||||
<input type="radio" name="sort" :id="option.id" />
|
||||
<label :for="option.id">{{ option.content }}</label>
|
||||
<label :for="option.id">
|
||||
{{ $t(`trains.option-${option.id}`) }}
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -27,7 +29,7 @@
|
||||
<div class="search-box">
|
||||
<input
|
||||
class="search-input"
|
||||
placeholder="Szukaj nr pociągu..."
|
||||
:placeholder="$t('trains.search-no')"
|
||||
v-model="searchedTrain"
|
||||
/>
|
||||
<img
|
||||
@@ -43,7 +45,7 @@
|
||||
<div class="search-box">
|
||||
<input
|
||||
class="search-input"
|
||||
placeholder="Szukaj maszynisty..."
|
||||
:placeholder="$t('trains.search-driver')"
|
||||
v-model="searchedDriver"
|
||||
/>
|
||||
<img
|
||||
@@ -70,7 +72,7 @@ export default class TrainOptions extends Vue {
|
||||
clickEventListener!: EventListener;
|
||||
|
||||
sorterOptionsOpen = false;
|
||||
currentSorterOption = "kilometraż";
|
||||
currentSorterOption = this.$t("trains.option-distance");
|
||||
|
||||
searchedTrain = "";
|
||||
searchedDriver = "";
|
||||
@@ -112,7 +114,8 @@ export default class TrainOptions extends Vue {
|
||||
|
||||
chooseOption(option: { id: string; content: string }) {
|
||||
this.$emit("changeSorter", { id: option.id, dir: -1 });
|
||||
this.currentSorterOption = option.content;
|
||||
|
||||
this.currentSorterOption = this.$t(`trains.option-${option.id}`);
|
||||
|
||||
this.closeSorterOptions();
|
||||
}
|
||||
|
||||
@@ -6,17 +6,17 @@
|
||||
@click="toggleStats"
|
||||
v-if="trains.length > 0"
|
||||
>
|
||||
STATYSTYKI RUCHU
|
||||
{{ $t("trains.stats") }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<transition name="stats-anim">
|
||||
<div class="stats-body" v-if="statsOpen">
|
||||
<h2 class="stats-header">STATYSTYKI RUCHU</h2>
|
||||
<h2 class="stats-header">{{ $t("trains.stats") }}</h2>
|
||||
|
||||
<div class="stats-speed">
|
||||
<div class="title stats-title">
|
||||
PRĘDKOŚCI POCIĄGÓW (MIN | ŚR | MAX) [km/h]
|
||||
{{ $t("trains.stats-speed") }}
|
||||
</div>
|
||||
<div class="stats-content">
|
||||
{{ speedStats.min }} | {{ speedStats.avg }} | {{ speedStats.max }}
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<div class="stats-length">
|
||||
<div class="title stats-title">
|
||||
DŁUGOŚCI ROZKŁADÓW (MIN | ŚR | MAX) [km]
|
||||
{{ $t("trains.stats-length") }}
|
||||
</div>
|
||||
<div class="stats-content">
|
||||
{{ timetableStats.min }} | {{ timetableStats.avg }} |
|
||||
@@ -34,7 +34,9 @@
|
||||
</div>
|
||||
|
||||
<div class="stats-categories">
|
||||
<div class="title stats-title">KATEGORIE RJ</div>
|
||||
<div class="title stats-title">
|
||||
{{ $t("trains.stats-categories") }}
|
||||
</div>
|
||||
|
||||
<div class="category-list">
|
||||
<span
|
||||
@@ -49,19 +51,23 @@
|
||||
|
||||
<div class="special-list">
|
||||
<span class="special twr">
|
||||
<span class="special-type">WYSOKIEGO RYZYKA</span>
|
||||
<span class="special-type">{{
|
||||
$t("trains.stats-special-twr")
|
||||
}}</span>
|
||||
<span class="special-count">{{ specialTrainCount[0] }}</span>
|
||||
</span>
|
||||
|
||||
<span class="special skr">
|
||||
<span class="special-type">PRZEKROCZONA SKRAJNIA</span>
|
||||
<span class="special-type">{{
|
||||
$t("trains.stats-special-skr")
|
||||
}}</span>
|
||||
<span class="special-count">{{ specialTrainCount[1] }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="stats-locos">
|
||||
<div class="title stats-title">NAJCZĘSTSZE JEDNOSTKI</div>
|
||||
<div class="title stats-title">{{ $t("trains.stats-locos") }}</div>
|
||||
|
||||
<div class="loco-list stats-content">
|
||||
<div class="loco-item" v-for="(loco, i) in locoList" :key="i">
|
||||
|
||||
Reference in New Issue
Block a user