Dodano animację do widoków

This commit is contained in:
2022-06-29 22:39:10 +02:00
parent 4d826e858a
commit 1a255e933c
8 changed files with 37 additions and 83 deletions
+6 -14
View File
@@ -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,
};
},