dodano pole do ukrywania szlaków

This commit is contained in:
2024-01-03 17:09:09 +01:00
parent 39d6213e4f
commit 97bc6db1c4
8 changed files with 214 additions and 129 deletions
+47
View File
@@ -0,0 +1,47 @@
<template>
<span class="routes">
<span
v-for="(route, i) in routes"
class="route"
:key="i"
:class="{
'text--accent': route.routeSpeed != 0 && route.routeLength != 0,
internal: route.isInternal,
hidden: route.hidden,
}"
>
<span class="route-name">{{ route.routeName }}</span>
<span class="route-info"> ({{ route.routeTracks }}/{{ route.isElectric ? 'E' : 'N' }}/{{ route.isRouteSBL ? 'S' : 'P' }}) </span>
</span>
</span>
</template>
<script lang="ts">
import { PropType, defineComponent } from 'vue';
import { SceneryRoutesInfo } from '../types/types';
export default defineComponent({
props: {
routes: {
type: Array as PropType<SceneryRoutesInfo[]>,
},
},
});
</script>
<style lang="scss" scoped>
.route {
&.internal > .route-name {
text-decoration: underline;
}
&.hidden > .route-name {
// text-decoration: underline;
color: #ccc;
}
}
.route-info {
color: #aaa;
}
</style>