Merge pull request #159 from Spythere/development

v1.33.0 hotfixes
This commit is contained in:
Spythere
2026-03-23 14:45:46 +01:00
committed by GitHub
4 changed files with 67 additions and 39 deletions
@@ -1,6 +1,6 @@
<template>
<section class="info-routes" v-if="station.generalInfo">
<div class="routes one-way" v-if="oneWayRoutes.length > 0">
<div class="routes one-way" v-if="singleRoutesAvailable.length > 0">
<button
class="routes-btn"
@click="toggleRoutesVisibility('single')"
@@ -12,7 +12,7 @@
</button>
<ul class="routes-list">
<li v-for="route in oneWayRoutes" :key="route.routeName">
<li v-for="route in singleRoutesFiltered" :key="route.routeName">
<span :class="{ 'no-catenary': !route.isElectric, internal: route.isInternal }">
{{ route.routeName }}</span
>
@@ -24,10 +24,17 @@
</span>
<span v-if="route.isRouteSBL" class="sbl">SBL</span>
</li>
<li v-if="singleRoutesFiltered.length == 0">
<span class="routes-hidden">
<i class="fa-solid fa-eye-slash"></i>
{{ $t('scenery.routes-hidden') }}
</span>
</li>
</ul>
</div>
<div class="routes two-way" v-if="twoWayRoutes.length > 0">
<div class="routes two-way" v-if="doubleRoutesAvailable.length > 0">
<button
class="routes-btn"
@click="toggleRoutesVisibility('double')"
@@ -39,7 +46,7 @@
</button>
<ul class="routes-list">
<li v-for="route in twoWayRoutes" :key="route.routeName">
<li v-for="route in doubleRoutesFiltered" :key="route.routeName">
<span :class="{ 'no-catenary': !route.isElectric, internal: route.isInternal }">
{{ route.routeName }}
</span>
@@ -54,6 +61,13 @@
</span>
<span v-if="route.isRouteSBL" class="sbl">SBL</span>
</li>
<li v-if="doubleRoutesFiltered.length == 0">
<span class="routes-hidden">
<i class="fa-solid fa-eye-slash"></i>
{{ $t('scenery.routes-hidden') }}
</span>
</li>
</ul>
</div>
</section>
@@ -102,20 +116,32 @@ export default defineComponent({
},
computed: {
oneWayRoutes() {
singleRoutesAvailable() {
return (
this.station.generalInfo?.routes.single
.filter((r) => !r.isInternal || r.isInternal == this.showInternalSingleRoutes)
.filter((r) => !r.hidden)
.sort((r1, r2) => r1.routeName.localeCompare(r2.routeName)) ?? []
);
},
twoWayRoutes() {
doubleRoutesAvailable() {
return (
this.station.generalInfo?.routes.double
.filter((r) => !r.isInternal || r.isInternal == this.showInternalDoubleRoutes)
.filter((r) => !r.hidden)
.sort((r1, r2) => r1.routeName.localeCompare(r2.routeName)) ?? []
);
},
singleRoutesFiltered() {
return this.singleRoutesAvailable.filter(
(r) => this.showInternalSingleRoutes || !r.isInternal
);
},
doubleRoutesFiltered() {
return this.doubleRoutesAvailable.filter(
(r) => this.showInternalDoubleRoutes || !r.isInternal
);
}
}
});
@@ -154,11 +180,6 @@ ul.routes-list {
li {
margin: 0.5em 0.25em;
cursor: pointer;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
& > span {
padding: 0.2em;
@@ -182,11 +203,16 @@ ul.routes-list {
background-color: #303030;
color: #cfcfcf;
}
&.sbl {
color: var(--clr-primary);
background-color: #404040;
}
&.routes-hidden {
background-color: #4b4b4b;
}
&:last-child {
border-radius: 0 0.5em 0.5em 0;
}
+1
View File
@@ -568,6 +568,7 @@
"additional-tools-title": "Additional tools",
"one-way-routes": "Single track routes",
"two-way-routes": "Double track routes",
"routes-hidden": "Hidden internal routes",
"no-data": "No available data about this scenery",
"option-active-timetables": "Active timetables",
"option-timetables-history": "Timetables history PL1",
+1
View File
@@ -554,6 +554,7 @@
"additional-tools-title": "Dodatkowe narzędzia",
"one-way-routes": "Szlaki jednotorowe",
"two-way-routes": "Szlaki dwutorowe",
"routes-hidden": "Ukryto szlaki wewnętrzne",
"no-data": "Brak informacji o tej scenerii",
"option-active-timetables": "Aktywne rozkłady jazdy",
"option-timetables-history": "Historia rozkładów PL1",
+26 -26
View File
@@ -94,14 +94,14 @@ export const initFilters = {
minTwoWayCatenary: 0,
minTwoWayInt: 0,
minTwoWayCatenaryInt: 0,
maxOneWay: 5,
maxOneWayCatenary: 5,
maxOneWayInt: 5,
maxOneWayCatenaryInt: 5,
maxTwoWay: 5,
maxTwoWayCatenary: 5,
maxTwoWayInt: 5,
maxTwoWayCatenaryInt: 5,
maxOneWay: 10,
maxOneWayCatenary: 10,
maxOneWayInt: 20,
maxOneWayCatenaryInt: 20,
maxTwoWay: 10,
maxTwoWayCatenary: 10,
maxTwoWayInt: 20,
maxTwoWayCatenaryInt: 20,
authors: '',
projects: '',
lines: ''
@@ -122,62 +122,62 @@ export const sliderGroups: SliderGroup[] = [
export const sliderGroupsOptions: Record<SliderGroup, SliderOptions[]> = {
vMax: [
{ id: 'minVmax', minRange: 0, maxRange: 200, step: 10 },
{ id: 'maxVmax', minRange: 0, maxRange: 200, step: 10 }
{ id: 'minVmax', minRange: 0, maxRange: 200, step: 20 },
{ id: 'maxVmax', minRange: 0, maxRange: 200, step: 20 }
],
level: [
{ id: 'minLevel', minRange: 0, maxRange: 20, step: 1 },
{ id: 'maxLevel', minRange: 0, maxRange: 20, step: 1 }
],
routeOneWay: [
{ id: 'minOneWay', minRange: 0, maxRange: 5, step: 1 },
{ id: 'maxOneWay', minRange: 0, maxRange: 5, step: 1 }
{ id: 'minOneWay', minRange: 0, maxRange: 10, step: 1 },
{ id: 'maxOneWay', minRange: 0, maxRange: 10, step: 1 }
],
routeOneWayCatenary: [
{ id: 'minOneWayCatenary', minRange: 0, maxRange: 5, step: 1 },
{ id: 'maxOneWayCatenary', minRange: 0, maxRange: 5, step: 1 }
{ id: 'minOneWayCatenary', minRange: 0, maxRange: 10, step: 1 },
{ id: 'maxOneWayCatenary', minRange: 0, maxRange: 10, step: 1 }
],
routeOneWayInternal: [
{ id: 'minOneWayInt', minRange: 0, maxRange: 5, step: 1 },
{ id: 'maxOneWayInt', minRange: 0, maxRange: 5, step: 1 }
{ id: 'minOneWayInt', minRange: 0, maxRange: 20, step: 1 },
{ id: 'maxOneWayInt', minRange: 0, maxRange: 20, step: 1 }
],
routeOneWayInternalCatenary: [
{
id: 'minOneWayCatenaryInt',
minRange: 0,
maxRange: 5,
maxRange: 20,
step: 1
},
{
id: 'maxOneWayCatenaryInt',
minRange: 0,
maxRange: 5,
maxRange: 20,
step: 1
}
],
routeTwoWay: [
{ id: 'minTwoWay', minRange: 0, maxRange: 5, step: 1 },
{ id: 'maxTwoWay', minRange: 0, maxRange: 5, step: 1 }
{ id: 'minTwoWay', minRange: 0, maxRange: 10, step: 1 },
{ id: 'maxTwoWay', minRange: 0, maxRange: 10, step: 1 }
],
routeTwoWayCatenary: [
{ id: 'minTwoWayCatenary', minRange: 0, maxRange: 5, step: 1 },
{ id: 'maxTwoWayCatenary', minRange: 0, maxRange: 5, step: 1 }
{ id: 'minTwoWayCatenary', minRange: 0, maxRange: 10, step: 1 },
{ id: 'maxTwoWayCatenary', minRange: 0, maxRange: 10, step: 1 }
],
routeTwoWayInternal: [
{ id: 'minTwoWayInt', minRange: 0, maxRange: 5, step: 1 },
{ id: 'maxTwoWayInt', minRange: 0, maxRange: 5, step: 1 }
{ id: 'minTwoWayInt', minRange: 0, maxRange: 20, step: 1 },
{ id: 'maxTwoWayInt', minRange: 0, maxRange: 20, step: 1 }
],
routeTwoWayInternalCatenary: [
{
id: 'minTwoWayCatenaryInt',
minRange: 0,
maxRange: 5,
maxRange: 20,
step: 1
},
{
id: 'maxTwoWayCatenaryInt',
minRange: 0,
maxRange: 5,
maxRange: 20,
step: 1
}
]