mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
Poprawiono opisy ikonek dla SBL i TWB
This commit is contained in:
@@ -22,18 +22,18 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<img
|
<img
|
||||||
v-if="station.generalInfo && station.generalInfo.SBL !== ''"
|
v-if="station.generalInfo && station.generalInfo.routes.sblRouteNames.length > 0"
|
||||||
:src="icons.SBL"
|
:src="icons.SBL"
|
||||||
:alt="$t('desc.SBL') + `${station.generalInfo.SBL}`"
|
alt="sbl icon"
|
||||||
:title="$t('desc.SBL') + `${station.generalInfo.SBL}`"
|
:title="$t('desc.SBL') + `${station.generalInfo.routes.sblRouteNames.join(', ')}`"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<img
|
<img
|
||||||
v-if="station.generalInfo && station.generalInfo.TWB !== ''"
|
v-if="station.generalInfo && station.generalInfo.routes.twoWay.some(route => route.TWB)"
|
||||||
:src="icons.TWB"
|
:src="icons.TWB"
|
||||||
alt="two way route blockade"
|
alt="TWB icon"
|
||||||
:title="
|
:title="
|
||||||
`${station.generalInfo.TWB === 'TAK' ? $t('desc.TWB-all') : $t('desc.TWB-routes') + station.generalInfo.TWB}`
|
$t('desc.TWB-routes') + station.generalInfo.routes.twoWay.filter(route => route.TWB).map(route => route.name).join(', ')
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -56,25 +56,15 @@ import SceneryHeader from '@/components/SceneryView/SceneryHeader.vue';
|
|||||||
|
|
||||||
import ActionButton from '@/components/Global/ActionButton.vue';
|
import ActionButton from '@/components/Global/ActionButton.vue';
|
||||||
|
|
||||||
import { computed, ComputedRef, defineComponent } from '@vue/runtime-core';
|
import { computed, ComputedRef, defineComponent, onMounted } from '@vue/runtime-core';
|
||||||
import { useStore } from '@/store';
|
import { useStore } from '@/store';
|
||||||
import { GETTERS } from '@/constants/storeConstants';
|
import { GETTERS } from '@/constants/storeConstants';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { URLs } from '@/scripts/utils/apiURLs';
|
import { URLs } from '@/scripts/utils/apiURLs';
|
||||||
import { watch, watchEffect } from 'vue';
|
|
||||||
import Station from '@/scripts/interfaces/Station';
|
import Station from '@/scripts/interfaces/Station';
|
||||||
|
|
||||||
interface SceneryHistoryData {
|
|
||||||
response?: {
|
|
||||||
stationName: string;
|
|
||||||
currentDispatcher: string;
|
|
||||||
currentDispatcherId: number;
|
|
||||||
currentDispatcherFrom: number;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: { SceneryInfo, SceneryTimetable, SceneryHistory, ActionButton, SceneryHeader },
|
components: { SceneryInfo, SceneryTimetable, SceneryHistory, ActionButton, SceneryHeader },
|
||||||
|
|
||||||
@@ -107,6 +97,7 @@ export default defineComponent({
|
|||||||
return data.value.stationList.find((station) => station.name === route.query.station?.toString().replace(/_/g, ' '))
|
return data.value.stationList.find((station) => station.name === route.query.station?.toString().replace(/_/g, ' '))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// const onlineFrom = computed(async () => {
|
// const onlineFrom = computed(async () => {
|
||||||
// return await (await axios.get(`${URLs.stacjownikAPI}?name=${route.query.station}&historyCount=0`)).data;
|
// return await (await axios.get(`${URLs.stacjownikAPI}?name=${route.query.station}&historyCount=0`)).data;
|
||||||
// });
|
// });
|
||||||
@@ -132,7 +123,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.stationInfo = (this.$store.getters[GETTERS.allData] as StoreData).stationList.find((station) => station.name === this.$route.query.station?.toString().replace(/_/g, ' '))
|
// this.stationInfo = (this.$store.getters[GETTERS.allData] as StoreData).stationList.find((station) => station.name === this.$route.query.station?.toString().replace(/_/g, ' '))
|
||||||
},
|
},
|
||||||
|
|
||||||
async activated() {
|
async activated() {
|
||||||
|
|||||||
Reference in New Issue
Block a user