Merge pull request #153 from Spythere/development

v1.31.1
This commit is contained in:
Spythere
2026-01-16 22:27:16 +01:00
committed by GitHub
28 changed files with 191 additions and 35 deletions
+6 -6
View File
@@ -62,25 +62,25 @@
crossorigin crossorigin
/> />
<link rel="preload" as="image" href="/images/icon-pl.svg" />
<link rel="preload" as="image" href="/images/stacjownik-header-logo.svg" /> <link rel="preload" as="image" href="/images/stacjownik-header-logo.svg" />
<link rel="preload" as="image" href="/images/icon-dispatcher.svg" /> <link rel="preload" as="image" href="/images/icon-dispatcher.svg" />
<link rel="preload" as="image" href="/images/icon-train.svg" /> <link rel="preload" as="image" href="/images/icon-train.svg" />
<link rel="preload" as="image" href="/images/icon-arrow-asc.svg" />
<link rel="preload" as="image" href="/images/icon-arrow-desc.svg" /> <link rel="preload" as="image" href="/images/icon-arrow-desc.svg" />
<link rel="preload" as="image" href="/images/icon-filter2.svg" />
<link rel="preload" as="image" href="/images/icon-stats.svg" />
<link rel="preload" as="image" href="/images/icon-gnr.svg" />
<link rel="preload" as="image" href="/images/icon-pojazdownik.svg" /> <link rel="preload" as="image" href="/images/icon-pojazdownik.svg" />
<link rel="preload" as="image" href="/images/icon-diamond.svg" /> <link rel="preload" as="image" href="/images/icon-stats.svg" />
<link rel="preload" as="image" href="/images/icon-filter2.svg" />
<link rel="preload" as="image" href="/images/icon-user.svg" /> <link rel="preload" as="image" href="/images/icon-user.svg" />
<link rel="preload" as="image" href="/images/icon-like.svg" /> <link rel="preload" as="image" href="/images/icon-like.svg" />
<link rel="preload" as="image" href="/images/icon-gnr.svg" />
<link rel="preload" as="image" href="/images/icon-spawn.svg" /> <link rel="preload" as="image" href="/images/icon-spawn.svg" />
<link rel="preload" as="image" href="/images/icon-timetableAll.svg" /> <link rel="preload" as="image" href="/images/icon-timetableAll.svg" />
<link rel="preload" as="image" href="/images/icon-timetableUnconfirmed.svg" /> <link rel="preload" as="image" href="/images/icon-timetableUnconfirmed.svg" />
<link rel="preload" as="image" href="/images/icon-timetableConfirmed.svg" /> <link rel="preload" as="image" href="/images/icon-timetableConfirmed.svg" />
<link rel="preload" as="image" href="/images/icon-discord.png" /> <link rel="preload" as="image" href="/images/icon-discord.png" />
<link rel="prefetch" as="image" href="/images/icon-arrow-asc.svg" />
<link rel="prefetch" as="image" href="/images/icon-diamond.svg" />
<!-- Static OpenGraph meta --> <!-- Static OpenGraph meta -->
<meta name="description" content="Pomocnik maszynisty i dyżurnego symulatora Train Driver 2" /> <meta name="description" content="Pomocnik maszynisty i dyżurnego symulatora Train Driver 2" />
<meta property="og:url" content="https://stacjownik-td2.web.app/" /> <meta property="og:url" content="https://stacjownik-td2.web.app/" />
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "stacjownik", "name": "stacjownik",
"version": "1.31.0", "version": "1.31.1",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
+5
View File
@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-cz" viewBox="0 0 640 480">
<path fill="#fff" d="M0 0h640v240H0z"/>
<path fill="#d7141a" d="M0 240h640v240H0z"/>
<path fill="#11457e" d="M360 240 0 0v480z"/>
</svg>

After

Width:  |  Height:  |  Size: 225 B

+5
View File
@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-de" viewBox="0 0 640 480">
<path fill="#fc0" d="M0 320h640v160H0z"/>
<path fill="#000001" d="M0 0h640v160H0z"/>
<path fill="red" d="M0 160h640v160H0z"/>
</svg>

After

Width:  |  Height:  |  Size: 221 B

Before

Width:  |  Height:  |  Size: 504 B

After

Width:  |  Height:  |  Size: 504 B

+7
View File
@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-it" viewBox="0 0 640 480">
<g fill-rule="evenodd" stroke-width="1pt">
<path fill="#fff" d="M0 0h640v480H0z"/>
<path fill="#009246" d="M0 0h213.3v480H0z"/>
<path fill="#ce2b37" d="M426.7 0H640v480H426.7z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 289 B

Before

Width:  |  Height:  |  Size: 219 B

After

Width:  |  Height:  |  Size: 219 B

+5
View File
@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-ru" viewBox="0 0 640 480">
<path fill="#fff" d="M0 0h640v160H0z"/>
<path fill="#0039a6" d="M0 160h640v160H0z"/>
<path fill="#d52b1e" d="M0 320h640v160H0z"/>
</svg>

After

Width:  |  Height:  |  Size: 225 B

+4
View File
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-se" viewBox="0 0 640 480">
<path fill="#005293" d="M0 0h640v480H0z"/>
<path fill="#fecb00" d="M176 0v192H0v96h176v192h96V288h368v-96H272V0z"/>
</svg>

After

Width:  |  Height:  |  Size: 209 B

+9
View File
@@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-sk" viewBox="0 0 640 480">
<path fill="#ee1c25" d="M0 0h640v480H0z"/>
<path fill="#0b4ea2" d="M0 0h640v320H0z"/>
<path fill="#fff" d="M0 0h640v160H0z"/>
<path fill="#fff" d="M233 370.8c-43-20.7-104.6-61.9-104.6-143.2 0-81.4 4-118.4 4-118.4h201.3s3.9 37 3.9 118.4S276 350 233 370.8"/>
<path fill="#ee1c25" d="M233 360c-39.5-19-96-56.8-96-131.4s3.6-108.6 3.6-108.6h184.8s3.5 34 3.5 108.6C329 303.3 272.5 341 233 360"/>
<path fill="#fff" d="M241.4 209c10.7.2 31.6.6 50.1-5.6 0 0-.4 6.7-.4 14.4s.5 14.4.5 14.4c-17-5.7-38.1-5.8-50.2-5.7v41.2h-16.8v-41.2c-12-.1-33.1 0-50.1 5.7 0 0 .5-6.7.5-14.4s-.5-14.4-.5-14.4c18.5 6.2 39.4 5.8 50 5.6v-25.9c-9.7 0-23.7.4-39.6 5.7 0 0 .5-6.6.5-14.4 0-7.7-.5-14.4-.5-14.4 15.9 5.3 29.9 5.8 39.6 5.7-.5-16.4-5.3-37-5.3-37s9.9.7 13.8.7 13.8-.7 13.8-.7-4.8 20.6-5.3 37c9.7.1 23.7-.4 39.6-5.7 0 0-.5 6.7-.5 14.4s.5 14.4.5 14.4a119 119 0 0 0-39.7-5.7v26z"/>
<path fill="#0b4ea2" d="M233 263.3c-19.9 0-30.5 27.5-30.5 27.5s-6-13-22.2-13c-11 0-19 9.7-24.2 18.8 20 31.7 51.9 51.3 76.9 63.4 25-12 57-31.7 76.9-63.4-5.2-9-13.2-18.8-24.2-18.8-16.2 0-22.2 13-22.2 13S253 263.3 233 263.3"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

+6
View File
@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-ua" viewBox="0 0 640 480">
<g fill-rule="evenodd" stroke-width="1pt">
<path fill="gold" d="M0 0h640v480H0z"/>
<path fill="#0057b8" d="M0 0h640v240H0z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

+4 -3
View File
@@ -5,11 +5,11 @@
<div class="language-select"> <div class="language-select">
<button :data-active="$i18n.locale == 'pl'" @click="store.changeLocale('pl')"> <button :data-active="$i18n.locale == 'pl'" @click="store.changeLocale('pl')">
<img src="/images/icon-pl.svg" alt="" width="45" /> <FlagIcon :language-id="0" width="2.5em" />
</button> </button>
<button :data-active="$i18n.locale == 'en'" @click="store.changeLocale('en')"> <button :data-active="$i18n.locale == 'en'" @click="store.changeLocale('en')">
<img src="/images/icon-en.svg" alt="" width="45" /> <FlagIcon :language-id="1" width="2.5em" />
</button> </button>
</div> </div>
@@ -116,6 +116,7 @@
<script setup lang="ts"> <script setup lang="ts">
import Card from '../Global/Card.vue'; import Card from '../Global/Card.vue';
import { useMainStore } from '../../store/mainStore'; import { useMainStore } from '../../store/mainStore';
import FlagIcon from '../Global/FlagIcon.vue';
const store = useMainStore(); const store = useMainStore();
@@ -157,7 +158,7 @@ a.link {
justify-content: center; justify-content: center;
margin: 0.5em 0; margin: 0.5em 0;
button[data-active='false'] img { button[data-active='false'] ::v-deep(img) {
opacity: 0.5; opacity: 0.5;
} }
} }
+43
View File
@@ -0,0 +1,43 @@
<template>
<div class="flag-icon">
<img
:src="languageFlagSrc"
alt="language flag"
:style="{
width: width
}"
/>
</div>
</template>
<script lang="ts" setup>
import { computed } from 'vue';
import { getLanguageNameById } from '../../utils/languageUtils';
const props = defineProps({
languageId: {
type: Number,
required: true
},
width: {
type: String
}
});
const languageFlagSrc = computed(
() => `/images/flags/${getLanguageNameById(props.languageId)}.svg`
);
</script>
<style scoped>
.flag-icon {
display: flex;
justify-content: center;
align-items: center;
}
.flag-icon img {
vertical-align: middle;
}
</style>
@@ -1,14 +1,13 @@
<template> <template>
<li class="dispatcher-history-entry"> <li class="dispatcher-history-entry">
<div class="entry-info"> <div class="entry-info">
<span> <span class="entry-info-left">
<span> <div class="station-info">
<router-link :to="`/journal/dispatchers?search-station=${entry.stationName}`"> <router-link :to="`/journal/dispatchers?search-station=${entry.stationName}`">
<b>{{ entry.stationName }}</b> <b>{{ entry.stationName }}</b>
</router-link> </router-link>
<b class="text--grayed"> #{{ entry.stationHash }}</b> <b class="text--grayed"> #{{ entry.stationHash }}</b>
</span>
&bull; &bull;
<b <b
v-if="entry.dispatcherLevel !== null" v-if="entry.dispatcherLevel !== null"
@@ -17,7 +16,7 @@
> >
{{ entry.dispatcherLevel >= 2 ? entry.dispatcherLevel : 'L' }} {{ entry.dispatcherLevel >= 2 ? entry.dispatcherLevel : 'L' }}
</b> </b>
<b style="margin-left: 5px">
<span <span
v-if="apiStore.donatorsData.includes(entry.dispatcherName)" v-if="apiStore.donatorsData.includes(entry.dispatcherName)"
data-tooltip-type="DonatorTooltip" data-tooltip-type="DonatorTooltip"
@@ -37,7 +36,11 @@
> >
{{ entry.dispatcherName }} {{ entry.dispatcherName }}
</router-link> </router-link>
</b>
<span class="dispatcher-language" v-if="entry.dispatcherLanguageId != null">
<FlagIcon :language-id="entry.dispatcherLanguageId" width="1.75em" />
</span>
</div>
<div> <div>
<span v-if="entry.timestampTo"> <span v-if="entry.timestampTo">
@@ -118,6 +121,7 @@ import dateMixin from '../../../mixins/dateMixin';
import styleMixin from '../../../mixins/styleMixin'; import styleMixin from '../../../mixins/styleMixin';
import { useApiStore } from '../../../store/apiStore'; import { useApiStore } from '../../../store/apiStore';
import StationStatusBadge from '../../Global/StationStatusBadge.vue'; import StationStatusBadge from '../../Global/StationStatusBadge.vue';
import FlagIcon from '../../Global/FlagIcon.vue';
export default defineComponent({ export default defineComponent({
props: { props: {
@@ -125,7 +129,7 @@ export default defineComponent({
showExtraInfo: { type: Boolean, required: true } showExtraInfo: { type: Boolean, required: true }
}, },
components: { StationStatusBadge }, components: { StationStatusBadge, FlagIcon },
mixins: [dateMixin, styleMixin], mixins: [dateMixin, styleMixin],
emits: ['toggleShowExtraInfo'], emits: ['toggleShowExtraInfo'],
@@ -164,6 +168,11 @@ export default defineComponent({
padding: 1em; padding: 1em;
} }
.dispatcher-language {
display: inline-block;
vertical-align: middle;
}
.entry-info { .entry-info {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@@ -185,6 +194,15 @@ export default defineComponent({
margin-top: 1em; margin-top: 1em;
} }
.station-info {
display: flex;
flex-wrap: wrap;
text-align: center;
align-items: center;
gap: 0.25em;
font-weight: bold;
}
.status-list { .status-list {
display: flex; display: flex;
overflow: auto; overflow: auto;
@@ -198,11 +216,15 @@ export default defineComponent({
border-radius: 1em; border-radius: 1em;
} }
@include responsive.smallScreen{ @include responsive.smallScreen {
.entry-info { .entry-info {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
text-align: center; text-align: center;
} }
.station-info {
justify-content: center;
}
} }
</style> </style>
@@ -71,6 +71,10 @@
<router-link v-else :to="`/journal/timetables?search-driver=${timetable.driverName}`"> <router-link v-else :to="`/journal/timetables?search-driver=${timetable.driverName}`">
<strong>{{ timetable.driverName }}</strong> <strong>{{ timetable.driverName }}</strong>
</router-link> </router-link>
<div v-if="timetable.driverLanguageId != null">
<FlagIcon :language-id="timetable.driverLanguageId" width="1.75em" />
</div>
</span> </span>
<span class="general-time"> <span class="general-time">
@@ -110,8 +114,10 @@ import dateMixin from '../../../mixins/dateMixin';
import styleMixin from '../../../mixins/styleMixin'; import styleMixin from '../../../mixins/styleMixin';
import { useApiStore } from '../../../store/apiStore'; import { useApiStore } from '../../../store/apiStore';
import trainCategoryMixin from '../../../mixins/trainCategoryMixin'; import trainCategoryMixin from '../../../mixins/trainCategoryMixin';
import FlagIcon from '../../Global/FlagIcon.vue';
export default defineComponent({ export default defineComponent({
components: { FlagIcon },
mixins: [dateMixin, styleMixin, trainCategoryMixin], mixins: [dateMixin, styleMixin, trainCategoryMixin],
data() { data() {
@@ -191,7 +197,7 @@ export default defineComponent({
} }
} }
@include responsive.smallScreen{ @include responsive.smallScreen {
.item-general { .item-general {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
@@ -21,6 +21,8 @@
</span> </span>
<span v-else>{{ onlineScenery.dispatcherName }}</span> <span v-else>{{ onlineScenery.dispatcherName }}</span>
</router-link> </router-link>
<FlagIcon :languageId="onlineScenery.dispatcherLanguageId" width="1.25em" />
</div> </div>
<div class="info-bottom"> <div class="info-bottom">
@@ -51,9 +53,11 @@ import styleMixin from '../../../mixins/styleMixin';
import StationStatusBadge from '../../Global/StationStatusBadge.vue'; import StationStatusBadge from '../../Global/StationStatusBadge.vue';
import { ActiveScenery } from '../../../typings/common'; import { ActiveScenery } from '../../../typings/common';
import { useApiStore } from '../../../store/apiStore'; import { useApiStore } from '../../../store/apiStore';
import FlagIcon from '../../Global/FlagIcon.vue';
export default defineComponent({ export default defineComponent({
mixins: [styleMixin, dateMixin, routerMixin], mixins: [styleMixin, dateMixin, routerMixin],
components: { StationStatusBadge, FlagIcon },
data() { data() {
return { return {
@@ -66,8 +70,7 @@ export default defineComponent({
type: Object as PropType<ActiveScenery>, type: Object as PropType<ActiveScenery>,
required: false required: false
} }
}, }
components: { StationStatusBadge }
}); });
</script> </script>
+15 -1
View File
@@ -146,6 +146,14 @@
</span> </span>
</td> </td>
<td class="station-dispatcher-lang">
<FlagIcon
v-if="station.onlineInfo && station.onlineInfo.dispatcherLanguageId != -1"
:language-id="station.onlineInfo.dispatcherLanguageId"
width="2.25em"
/>
</td>
<td class="station-dispatcher-exp"> <td class="station-dispatcher-exp">
<span <span
v-if="station.onlineInfo && station.onlineInfo?.dispatcherExp != -1" v-if="station.onlineInfo && station.onlineInfo?.dispatcherExp != -1"
@@ -344,11 +352,13 @@ import { useTooltipStore } from '../../store/tooltipStore';
import { getChangedFilters } from '../../managers/stationFilterManager'; import { getChangedFilters } from '../../managers/stationFilterManager';
import { ActiveSorter, HeadIdsType, headIconsIds, headIds } from './typings'; import { ActiveSorter, HeadIdsType, headIconsIds, headIds } from './typings';
import { filterStations, sortStations } from './utils'; import { filterStations, sortStations } from './utils';
import { getLanguageNameById } from '../../utils/languageUtils';
import FlagIcon from '../Global/FlagIcon.vue';
export default defineComponent({ export default defineComponent({
emits: ['toggleDonationCard'], emits: ['toggleDonationCard'],
components: { Loading, StationStatusBadge }, components: { Loading, StationStatusBadge, FlagIcon },
mixins: [styleMixin, dateMixin], mixins: [styleMixin, dateMixin],
data: () => ({ data: () => ({
@@ -495,6 +505,10 @@ thead th {
width: 12em; width: 12em;
} }
&.dispatcher-lang {
width: 6em;
}
&.dispatcher-lvl { &.dispatcher-lvl {
width: 6em; width: 6em;
} }
+1
View File
@@ -10,6 +10,7 @@ export const headIds = [
'min-lvl', 'min-lvl',
'status', 'status',
'dispatcher', 'dispatcher',
'dispatcher-lang',
'dispatcher-lvl', 'dispatcher-lvl',
'routes-single', 'routes-single',
'routes-double', 'routes-double',
+5
View File
@@ -210,6 +210,11 @@ export const sortStations = (a: Station, b: Station, sorter: ActiveSorter) => {
diff = (a.onlineInfo?.dispatcherExp || 0) - (b.onlineInfo?.dispatcherExp || 0); diff = (a.onlineInfo?.dispatcherExp || 0) - (b.onlineInfo?.dispatcherExp || 0);
break; break;
case 'dispatcher-lang':
diff =
(a.onlineInfo?.dispatcherLanguageId ?? -1) - (b.onlineInfo?.dispatcherLanguageId ?? -1);
break;
case 'routes-single': case 'routes-single':
diff = diff =
(a.generalInfo?.routes.single.filter((r) => !r.hidden && !r.isInternal).length ?? -1) - (a.generalInfo?.routes.single.filter((r) => !r.hidden && !r.isInternal).length ?? -1) -
+6 -1
View File
@@ -66,6 +66,10 @@
<span v-else>{{ train.driverName }}</span> <span v-else>{{ train.driverName }}</span>
</div> </div>
<div class="train-language-flag">
<FlagIcon :language-id="train.driverLanguageId" width="1.75em" />
</div>
</div> </div>
</div> </div>
@@ -199,10 +203,11 @@ import trainInfoMixin from '../../mixins/trainInfoMixin';
import trainCategoryMixin from '../../mixins/trainCategoryMixin'; import trainCategoryMixin from '../../mixins/trainCategoryMixin';
import ProgressBar from '../Global/ProgressBar.vue'; import ProgressBar from '../Global/ProgressBar.vue';
import StockList from '../Global/StockList.vue'; import StockList from '../Global/StockList.vue';
import FlagIcon from '../Global/FlagIcon.vue';
export default defineComponent({ export default defineComponent({
mixins: [trainInfoMixin, styleMixin, trainCategoryMixin], mixins: [trainInfoMixin, styleMixin, trainCategoryMixin],
components: { ProgressBar, StockList }, components: { ProgressBar, StockList, FlagIcon },
props: { props: {
train: { train: {
+1
View File
@@ -337,6 +337,7 @@
"min-lvl": "Scenery\nlevel", "min-lvl": "Scenery\nlevel",
"status": "Status", "status": "Status",
"dispatcher": "Dispatcher", "dispatcher": "Dispatcher",
"dispatcher-lang": "Language",
"dispatcher-lvl": "Dispatcher\nlevel", "dispatcher-lvl": "Dispatcher\nlevel",
"routes-single": "1-track\nroutes", "routes-single": "1-track\nroutes",
"routes-double": "2-track\nroutes", "routes-double": "2-track\nroutes",
+1
View File
@@ -334,6 +334,7 @@
"min-lvl": "Poziom\nscenerii", "min-lvl": "Poziom\nscenerii",
"status": "Status", "status": "Status",
"dispatcher": "Dyżurny", "dispatcher": "Dyżurny",
"dispatcher-lang": "Język",
"dispatcher-lvl": "Poziom\ndyżurnego", "dispatcher-lvl": "Poziom\ndyżurnego",
"routes-single": "Szlaki\n1-torowe", "routes-single": "Szlaki\n1-torowe",
"routes-double": "Szlaki\n2-torowe", "routes-double": "Szlaki\n2-torowe",
+3
View File
@@ -87,6 +87,7 @@ export const useMainStore = defineStore('mainStore', {
online: Boolean(train.online), online: Boolean(train.online),
driverId: train.driverId, driverId: train.driverId,
driverName: train.driverName, driverName: train.driverName,
driverLanguageId: train.driverLanguageId,
currentStationName: train.currentStationName, currentStationName: train.currentStationName,
currentStationHash: train.currentStationHash, currentStationHash: train.currentStationHash,
connectedTrack: train.connectedTrack, connectedTrack: train.connectedTrack,
@@ -258,6 +259,7 @@ export const useMainStore = defineStore('mainStore', {
dispatcherIsSupporter: false, dispatcherIsSupporter: false,
dispatcherStatus: Status.ActiveDispatcher.FREE, dispatcherStatus: Status.ActiveDispatcher.FREE,
dispatcherTimestamp: -1, dispatcherTimestamp: -1,
dispatcherLanguageId: -1,
isOnline: false, isOnline: false,
@@ -304,6 +306,7 @@ export const useMainStore = defineStore('mainStore', {
dispatcherIsSupporter: scenery.dispatcherIsSupporter, dispatcherIsSupporter: scenery.dispatcherIsSupporter,
dispatcherStatus: scenery.dispatcherStatus, dispatcherStatus: scenery.dispatcherStatus,
dispatcherTimestamp: dispatcherTimestamp, dispatcherTimestamp: dispatcherTimestamp,
dispatcherLanguageId: scenery.dispatcherLanguageId,
isOnline: scenery.isOnline == 1, isOnline: scenery.isOnline == 1,
+4
View File
@@ -38,6 +38,7 @@ export namespace API {
dispatcherLevel: number | null; dispatcherLevel: number | null;
dispatcherRate: number; dispatcherRate: number;
dispatcherIsSupporter: boolean; dispatcherIsSupporter: boolean;
dispatcherLanguageId: number | null;
dispatcherStatus?: number; dispatcherStatus?: number;
isOnline: boolean; isOnline: boolean;
lastOnlineTimestamp: number; lastOnlineTimestamp: number;
@@ -114,6 +115,7 @@ export namespace API {
dispatcherId: number; dispatcherId: number;
dispatcherName: string; dispatcherName: string;
dispatcherIsSupporter: boolean; dispatcherIsSupporter: boolean;
dispatcherLanguageId: number;
stationName: string; stationName: string;
stationHash: string; stationHash: string;
region: string; region: string;
@@ -152,6 +154,7 @@ export namespace API {
driverId: number; driverId: number;
driverIsSupporter: boolean; driverIsSupporter: boolean;
driverLevel?: number; driverLevel?: number;
driverLanguageId: number;
currentStationName: string; currentStationName: string;
currentStationHash?: string; currentStationHash?: string;
@@ -221,6 +224,7 @@ export namespace API {
driverName: string; driverName: string;
driverLevel: number | null; driverLevel: number | null;
driverIsSupporter: boolean; driverIsSupporter: boolean;
driverLanguageId: number | null;
route: string; route: string;
twr: number; twr: number;
+2
View File
@@ -60,6 +60,7 @@ export interface Train {
distance: number; distance: number;
connectedTrack: string; connectedTrack: string;
driverId: number; driverId: number;
driverLanguageId: number;
trainNo: number; trainNo: number;
driverName: string; driverName: string;
driverLevel: number; driverLevel: number;
@@ -162,6 +163,7 @@ export interface ActiveScenery {
dispatcherIsSupporter: boolean; dispatcherIsSupporter: boolean;
dispatcherStatus: Status.ActiveDispatcher | number; dispatcherStatus: Status.ActiveDispatcher | number;
dispatcherTimestamp: number | null; dispatcherTimestamp: number | null;
dispatcherLanguageId: number;
isOnline: boolean; isOnline: boolean;
stationTrains: Train[]; stationTrains: Train[];
scheduledTrains: CheckpointTrain[]; scheduledTrains: CheckpointTrain[];
+5
View File
@@ -0,0 +1,5 @@
export const languageFlagNames = ['pl', 'en', 'de', 'cz', 'sk', 'ru', 'se', 'ua', 'it'];
export function getLanguageNameById(languageId: number) {
return languageFlagNames[languageId] ?? 'pl';
}
+4 -5
View File
@@ -29,10 +29,7 @@
data-tooltip-type="HtmlTooltip" data-tooltip-type="HtmlTooltip"
:data-tooltip-content="`<b>${$t('app.language-tooltip-content')}</b>`" :data-tooltip-content="`<b>${$t('app.language-tooltip-content')}</b>`"
> >
<img <FlagIcon :language-id="mainStore.currentLocale == 'pl' ? 0 : 1" />
:src="`/images/icon-${mainStore.currentLocale}.svg`"
alt="change language flag icon"
/>
</button> </button>
<a <a
@@ -85,6 +82,7 @@ import { reactive } from 'vue';
import { provide } from 'vue'; import { provide } from 'vue';
import { ActiveSorter } from '../components/StationsView/typings'; import { ActiveSorter } from '../components/StationsView/typings';
import { onMounted } from 'vue'; import { onMounted } from 'vue';
import FlagIcon from '../components/Global/FlagIcon.vue';
const filterInitStates = { ...initFilters }; const filterInitStates = { ...initFilters };
@@ -93,7 +91,8 @@ export default defineComponent({
StationTable, StationTable,
StationFilterCard, StationFilterCard,
StationStats, StationStats,
DonationCard DonationCard,
FlagIcon
}, },
data: () => ({ data: () => ({