feat: user communication flags
@@ -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 |
@@ -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 |
@@ -0,0 +1,7 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-gb" viewBox="0 0 640 480">
|
||||||
|
<path fill="#012169" d="M0 0h640v480H0z"/>
|
||||||
|
<path fill="#FFF" d="m75 0 244 181L562 0h78v62L400 241l240 178v61h-80L320 301 81 480H0v-60l239-178L0 64V0z"/>
|
||||||
|
<path fill="#C8102E" d="m424 281 216 159v40L369 281zm-184 20 6 35L54 480H0zM640 0v3L391 191l2-44L590 0zM0 0l239 176h-60L0 42z"/>
|
||||||
|
<path fill="#FFF" d="M241 0v480h160V0zM0 160v160h640V160z"/>
|
||||||
|
<path fill="#C8102E" d="M0 193v96h640v-96zM273 0v480h96V0z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 504 B |
@@ -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 |
@@ -0,0 +1,6 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-pl" viewBox="0 0 640 480">
|
||||||
|
<g fill-rule="evenodd">
|
||||||
|
<path fill="#fff" d="M640 480H0V0h640z"/>
|
||||||
|
<path fill="#dc143c" d="M640 480H0V240h640z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 219 B |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -146,6 +146,14 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
<td class="station-dispatcher-lang">
|
||||||
|
<img
|
||||||
|
v-if="station.onlineInfo"
|
||||||
|
:src="`/images/flags/${getLanguageNameById(station.onlineInfo.dispatcherLanguageId)}.svg`"
|
||||||
|
alt="user flag"
|
||||||
|
/>
|
||||||
|
</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,6 +352,7 @@ 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';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
emits: ['toggleDonationCard'],
|
emits: ['toggleDonationCard'],
|
||||||
@@ -354,7 +363,8 @@ export default defineComponent({
|
|||||||
data: () => ({
|
data: () => ({
|
||||||
headIconsIds,
|
headIconsIds,
|
||||||
headIds,
|
headIds,
|
||||||
getChangedFilters
|
getChangedFilters,
|
||||||
|
getLanguageNameById
|
||||||
}),
|
}),
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
@@ -495,6 +505,10 @@ thead th {
|
|||||||
width: 12em;
|
width: 12em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.dispatcher-lang {
|
||||||
|
width: 6em;
|
||||||
|
}
|
||||||
|
|
||||||
&.dispatcher-lvl {
|
&.dispatcher-lvl {
|
||||||
width: 6em;
|
width: 6em;
|
||||||
}
|
}
|
||||||
@@ -604,6 +618,13 @@ tbody tr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.station-dispatcher-lang {
|
||||||
|
img {
|
||||||
|
max-width: 2em;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.station-level {
|
.station-level {
|
||||||
span {
|
span {
|
||||||
background-color: #888;
|
background-color: #888;
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
@@ -66,6 +66,13 @@
|
|||||||
|
|
||||||
<span v-else>{{ train.driverName }}</span>
|
<span v-else>{{ train.driverName }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="train-language-flag">
|
||||||
|
<img
|
||||||
|
:src="`/images/flags/${getLanguageNameById(train.driverLanguageId)}.svg`"
|
||||||
|
alt="user flag"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -199,6 +206,7 @@ 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 { getLanguageNameById } from '../../utils/languageUtils';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
mixins: [trainInfoMixin, styleMixin, trainCategoryMixin],
|
mixins: [trainInfoMixin, styleMixin, trainCategoryMixin],
|
||||||
@@ -217,7 +225,8 @@ export default defineComponent({
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
store: useMainStore(),
|
store: useMainStore(),
|
||||||
apiStore: useApiStore()
|
apiStore: useApiStore(),
|
||||||
|
getLanguageNameById
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -290,6 +299,11 @@ export default defineComponent({
|
|||||||
vertical-align: text-bottom;
|
vertical-align: text-bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.train-language-flag img {
|
||||||
|
width: 1.5em;
|
||||||
|
vertical-align: text-bottom;
|
||||||
|
}
|
||||||
|
|
||||||
.timetable-id {
|
.timetable-id {
|
||||||
color: #d2d2d2;
|
color: #d2d2d2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|
||||||
|
|||||||
@@ -114,6 +114,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 +153,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;
|
||||||
|
|||||||
@@ -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[];
|
||||||
|
|||||||
@@ -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';
|
||||||
|
}
|
||||||