mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
Dodano animację do widoków
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="scenery-view">
|
||||
<div class="scenery-offline" v-if="!stationInfo && isComponentVisible">
|
||||
<div class="scenery-offline" v-if="!stationInfo && isComponentVisible && store.dataStatuses.sceneries == 2">
|
||||
<div>{{ $t('scenery.no-scenery') }}</div>
|
||||
|
||||
<action-button>
|
||||
@@ -19,7 +19,7 @@
|
||||
</button>
|
||||
|
||||
<button
|
||||
v-if="!timetableOnly && currentRegion.id == 'eu' && stationInfo"
|
||||
v-if="!timetableOnly && store.region.id == 'eu' && stationInfo"
|
||||
class="history-btn btn btn--image"
|
||||
@click="
|
||||
navigateTo('/journal', {
|
||||
@@ -46,10 +46,9 @@ import SceneryHeader from '@/components/SceneryView/SceneryHeader.vue';
|
||||
|
||||
import ActionButton from '@/components/Global/ActionButton.vue';
|
||||
|
||||
import { computed, defineComponent, provide, reactive } from '@vue/runtime-core';
|
||||
import { computed, defineComponent, reactive } from '@vue/runtime-core';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
import Station from '@/scripts/interfaces/Station';
|
||||
import { useStore } from '@/store/store';
|
||||
|
||||
export default defineComponent({
|
||||
@@ -64,16 +63,15 @@ export default defineComponent({
|
||||
|
||||
viewMode: 'info',
|
||||
|
||||
stationInfo: {} as Station | undefined,
|
||||
onlineFrom: -1,
|
||||
}),
|
||||
|
||||
activated() {},
|
||||
|
||||
setup() {
|
||||
const route = useRoute();
|
||||
const store = useStore();
|
||||
|
||||
const savedSceneryHistory = reactive({});
|
||||
|
||||
const timetableOnly = computed(() => (route.query['timetable_only'] == '1' ? true : false));
|
||||
|
||||
const isComponentVisible = computed(() => route.path === '/scenery');
|
||||
@@ -82,17 +80,11 @@ export default defineComponent({
|
||||
return store.stationList.find((station) => station.name === route.query.station?.toString().replace(/_/g, ' '));
|
||||
});
|
||||
|
||||
provide('savedSceneryHistory', savedSceneryHistory);
|
||||
|
||||
// const onlineFrom = computed(async () => {
|
||||
// return await (await axios.get(`${URLs.stacjownikAPI}?name=${route.query.station}&historyCount=0`)).data;
|
||||
// });
|
||||
|
||||
return {
|
||||
currentRegion: store.region,
|
||||
timetableOnly,
|
||||
isComponentVisible,
|
||||
stationInfo,
|
||||
store,
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user