mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-02 21:08:12 +00:00
chore(profile): added activity region
This commit is contained in:
@@ -81,7 +81,7 @@
|
|||||||
:to="`/scenery?station=${d.stationName}`"
|
:to="`/scenery?station=${d.stationName}`"
|
||||||
>
|
>
|
||||||
<img src="/images/icon-user.svg" width="25" alt="user icon" />
|
<img src="/images/icon-user.svg" width="25" alt="user icon" />
|
||||||
<b>{{ d.stationName }}</b>
|
<b>{{ d.stationName }} ({{ getRegionNameById(d.region) }})</b>
|
||||||
<StationStatusBadge :isOnline="true" :dispatcherStatus="d.dispatcherStatus" />
|
<StationStatusBadge :isOnline="true" :dispatcherStatus="d.dispatcherStatus" />
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
<span v-if="d.timetable" class="text--primary">{{ d.timetable.category }}</span>
|
<span v-if="d.timetable" class="text--primary">{{ d.timetable.category }}</span>
|
||||||
<span>{{ d.trainNo }}</span>
|
<span>{{ d.trainNo }}</span>
|
||||||
•
|
•
|
||||||
<span>{{ d.currentStationName }}</span>
|
<span>{{ d.currentStationName }} ({{ getRegionNameById(d.region) }})</span>
|
||||||
•
|
•
|
||||||
<span class="text--grayed">{{ d.stockString.split(';')[0] }}</span>
|
<span class="text--grayed">{{ d.stockString.split(';')[0] }}</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
@@ -231,9 +231,8 @@ import { useI18n } from 'vue-i18n';
|
|||||||
import { useApiStore } from '../../store/apiStore';
|
import { useApiStore } from '../../store/apiStore';
|
||||||
import StationStatusBadge from '../Global/StationStatusBadge.vue';
|
import StationStatusBadge from '../Global/StationStatusBadge.vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Status } from '../../typings/common';
|
|
||||||
import Loading from '../Global/Loading.vue';
|
|
||||||
import ProfilePlayerAvatar from './ProfilePlayerAvatar.vue';
|
import ProfilePlayerAvatar from './ProfilePlayerAvatar.vue';
|
||||||
|
import { getRegionNameById } from '../../utils/regionUtils';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
export enum ServerRegion {
|
||||||
|
'eu' = 'PL1',
|
||||||
|
'cae' = 'PL2',
|
||||||
|
'usw' = 'DE',
|
||||||
|
'us' = 'CZE',
|
||||||
|
'ru' = 'ENG'
|
||||||
|
}
|
||||||
|
|
||||||
|
export const regions: Record<string, string> = {
|
||||||
|
eu: 'PL1',
|
||||||
|
cae: 'PL2',
|
||||||
|
usw: 'DE',
|
||||||
|
us: 'CZE',
|
||||||
|
ru: 'ENG'
|
||||||
|
};
|
||||||
|
|
||||||
|
export function getRegionNameById(id: string) {
|
||||||
|
return regions[id] ?? 'PL1';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user