mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
fixy filtrowania; ogólne
This commit is contained in:
@@ -1,19 +1,48 @@
|
||||
<template>
|
||||
<div class="update-modal">
|
||||
<AnimatedModal :is-open="true">Test</AnimatedModal>
|
||||
</div>
|
||||
<AnimatedModal :is-open="mainStore.isNewUpdate" @toggle-modal="toggleModal">
|
||||
<div class="modal_content">
|
||||
<h1 class="header">Aktualizacja Stacjownika</h1>
|
||||
<h2>wersja {{ version }}</h2>
|
||||
|
||||
<b>Co nowego?</b>
|
||||
<p>
|
||||
<ul>
|
||||
<li>test</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
</AnimatedModal>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { useMainStore } from '../../store/mainStore';
|
||||
import { version } from '../../../package.json';
|
||||
import AnimatedModal from '../Global/AnimatedModal.vue';
|
||||
|
||||
export default defineComponent({
|
||||
components: { AnimatedModal },
|
||||
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
mainStore: useMainStore(),
|
||||
version: version
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
toggleModal(value: boolean) {
|
||||
this.$emit('toggleModal', value);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
.modal_content {
|
||||
text-align: center;
|
||||
padding: 1em;
|
||||
height: 80vh;
|
||||
min-height: 550px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<section class="info-routes" v-if="station.generalInfo">
|
||||
<div class="routes one-way" v-if="filteredOneWayRoutes.length > 0">
|
||||
<div class="routes one-way" v-if="oneWayRoutes.length > 0">
|
||||
<b>{{ $t('scenery.one-way-routes') }}</b>
|
||||
|
||||
<ul class="routes-list">
|
||||
<li
|
||||
v-for="route in filteredOneWayRoutes"
|
||||
v-for="route in oneWayRoutes"
|
||||
:key="route.routeName"
|
||||
@click="setActiveShowLength(route.routeName)"
|
||||
>
|
||||
@@ -24,12 +24,12 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="routes two-way" v-if="filteredTwoWayRoutes.length > 0">
|
||||
<div class="routes two-way" v-if="twoWayRoutes.length > 0">
|
||||
<b>{{ $t('scenery.two-way-routes') }}</b>
|
||||
|
||||
<ul class="routes-list">
|
||||
<li
|
||||
v-for="route in filteredTwoWayRoutes"
|
||||
v-for="route in twoWayRoutes"
|
||||
:key="route.routeName"
|
||||
@click="setActiveShowLength(route.routeName)"
|
||||
>
|
||||
@@ -53,9 +53,6 @@
|
||||
<script lang="ts">
|
||||
import { PropType, defineComponent } from 'vue';
|
||||
import Station from '../../../scripts/interfaces/Station';
|
||||
import { StationRoutesInfo } from '../../../store/typings';
|
||||
|
||||
const routeFilter = (route: StationRoutesInfo) => !route.hidden;
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
@@ -80,12 +77,12 @@ export default defineComponent({
|
||||
},
|
||||
|
||||
computed: {
|
||||
filteredOneWayRoutes() {
|
||||
return this.station.generalInfo?.routes.single.filter(routeFilter) || [];
|
||||
oneWayRoutes() {
|
||||
return this.station.generalInfo?.routes.single ?? [];
|
||||
},
|
||||
|
||||
filteredTwoWayRoutes() {
|
||||
return this.station.generalInfo?.routes.double.filter(routeFilter) || [];
|
||||
twoWayRoutes() {
|
||||
return this.station.generalInfo?.routes.double ?? [];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -196,21 +196,22 @@
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td class="station-info" v-if="station.generalInfo">
|
||||
<td class="station-info">
|
||||
<span
|
||||
v-if="station.generalInfo?.signalType"
|
||||
class="scenery-icon icon-info"
|
||||
:class="station.generalInfo.controlType.replace('+', '-')"
|
||||
:class="station.generalInfo?.controlType.replace('+', '-')"
|
||||
:title="
|
||||
$t('sceneries.info.control-type') +
|
||||
$t(`controls.${station.generalInfo.controlType}`)
|
||||
$t(`controls.${station.generalInfo?.controlType}`)
|
||||
"
|
||||
v-html="getControlTypeAbbrev(station.generalInfo.controlType)"
|
||||
>
|
||||
</span>
|
||||
|
||||
<img
|
||||
v-if="station.generalInfo?.signalType"
|
||||
class="icon-info"
|
||||
v-if="station.generalInfo.signalType"
|
||||
:src="`/images/icon-${station.generalInfo.signalType}.svg`"
|
||||
:alt="station.generalInfo.signalType"
|
||||
:title="
|
||||
@@ -220,24 +221,23 @@
|
||||
/>
|
||||
|
||||
<img
|
||||
v-if="station.generalInfo?.SUP"
|
||||
class="icon-info"
|
||||
v-if="station.generalInfo.SUP"
|
||||
src="/images/icon-SUP.svg"
|
||||
alt="SUP (RASP-UZK)"
|
||||
:title="$t('sceneries.info.SUP')"
|
||||
/>
|
||||
|
||||
<img
|
||||
v-if="station.generalInfo?.ASDEK"
|
||||
class="icon-info"
|
||||
v-if="station.generalInfo.ASDEK"
|
||||
src="/images/icon-ASDEK.svg"
|
||||
alt="dSAT ASDEK"
|
||||
:title="$t('sceneries.info.ASDEK')"
|
||||
/>
|
||||
</td>
|
||||
|
||||
<td class="station-info" v-else>
|
||||
<img
|
||||
v-if="!station.generalInfo"
|
||||
class="icon-info"
|
||||
src="/images/icon-unknown.svg"
|
||||
alt="icon-unknown"
|
||||
@@ -460,7 +460,7 @@ table {
|
||||
}
|
||||
|
||||
&.general {
|
||||
width: 10em;
|
||||
width: 11em;
|
||||
}
|
||||
|
||||
&.header-image {
|
||||
|
||||
Reference in New Issue
Block a user