Wyświetlanie historii dyżurnych tylko dla PL1

This commit is contained in:
2022-01-10 18:57:02 +01:00
parent e63dbb9633
commit 69c32294f6
3 changed files with 19 additions and 5 deletions
+13 -4
View File
@@ -9,12 +9,17 @@
</div>
<div class="scenery-wrapper" v-if="stationInfo" ref="card-wrapper">
<button v-if="!timetableOnly" class="back-btn btn btn--image" :title="$t('scenery.return-btn')" @click="navigateTo('/')">
<button
v-if="!timetableOnly"
class="back-btn btn btn--image"
:title="$t('scenery.return-btn')"
@click="navigateTo('/')"
>
<img :src="icons.back" alt="Back to scenery" />
</button>
<button
v-if="!timetableOnly"
v-if="!timetableOnly && currentRegion.id == 'eu'"
class="history-btn btn btn--image"
@click="setCardViewMode(viewMode == 'history' ? 'info' : 'history')"
:title="viewMode == 'history' ? $t('scenery.info-btn') : $t('scenery.history-btn')"
@@ -85,6 +90,7 @@ export default defineComponent({
return {
data,
currentRegion: computed(() => store.getters[GETTERS.currentRegion]),
timetableOnly,
isComponentVisible,
isDataLoaded,
@@ -99,12 +105,16 @@ export default defineComponent({
navigateTo(path: string) {
this.$router.push(path);
}
},
},
mounted() {
this.cardHeight = (this.$refs['card-wrapper'] as HTMLElement).getBoundingClientRect().height;
},
activated() {
if (this.currentRegion.id != 'eu' && this.viewMode == 'history') this.viewMode = 'info';
},
});
</script>
@@ -144,7 +154,6 @@ $sceneryBgCol: #333;
width: 75%;
max-width: 950px;
@include midScreen {
width: 95%;
}