mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="info-routes" v-if="station.generalInfo">
|
<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
|
<button
|
||||||
class="routes-btn"
|
class="routes-btn"
|
||||||
@click="toggleRoutesVisibility('single')"
|
@click="toggleRoutesVisibility('single')"
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<ul class="routes-list">
|
<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 }">
|
<span :class="{ 'no-catenary': !route.isElectric, internal: route.isInternal }">
|
||||||
{{ route.routeName }}</span
|
{{ route.routeName }}</span
|
||||||
>
|
>
|
||||||
@@ -24,10 +24,17 @@
|
|||||||
</span>
|
</span>
|
||||||
<span v-if="route.isRouteSBL" class="sbl">SBL</span>
|
<span v-if="route.isRouteSBL" class="sbl">SBL</span>
|
||||||
</li>
|
</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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="routes two-way" v-if="twoWayRoutes.length > 0">
|
<div class="routes two-way" v-if="doubleRoutesAvailable.length > 0">
|
||||||
<button
|
<button
|
||||||
class="routes-btn"
|
class="routes-btn"
|
||||||
@click="toggleRoutesVisibility('double')"
|
@click="toggleRoutesVisibility('double')"
|
||||||
@@ -39,7 +46,7 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<ul class="routes-list">
|
<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 }">
|
<span :class="{ 'no-catenary': !route.isElectric, internal: route.isInternal }">
|
||||||
{{ route.routeName }}
|
{{ route.routeName }}
|
||||||
</span>
|
</span>
|
||||||
@@ -54,6 +61,13 @@
|
|||||||
</span>
|
</span>
|
||||||
<span v-if="route.isRouteSBL" class="sbl">SBL</span>
|
<span v-if="route.isRouteSBL" class="sbl">SBL</span>
|
||||||
</li>
|
</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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -102,20 +116,32 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
oneWayRoutes() {
|
singleRoutesAvailable() {
|
||||||
return (
|
return (
|
||||||
this.station.generalInfo?.routes.single
|
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)) ?? []
|
.sort((r1, r2) => r1.routeName.localeCompare(r2.routeName)) ?? []
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
twoWayRoutes() {
|
doubleRoutesAvailable() {
|
||||||
return (
|
return (
|
||||||
this.station.generalInfo?.routes.double
|
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)) ?? []
|
.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 {
|
li {
|
||||||
margin: 0.5em 0.25em;
|
margin: 0.5em 0.25em;
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
|
|
||||||
& > span {
|
& > span {
|
||||||
padding: 0.2em;
|
padding: 0.2em;
|
||||||
@@ -182,11 +203,16 @@ ul.routes-list {
|
|||||||
background-color: #303030;
|
background-color: #303030;
|
||||||
color: #cfcfcf;
|
color: #cfcfcf;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.sbl {
|
&.sbl {
|
||||||
color: var(--clr-primary);
|
color: var(--clr-primary);
|
||||||
background-color: #404040;
|
background-color: #404040;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.routes-hidden {
|
||||||
|
background-color: #4b4b4b;
|
||||||
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border-radius: 0 0.5em 0.5em 0;
|
border-radius: 0 0.5em 0.5em 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -568,6 +568,7 @@
|
|||||||
"additional-tools-title": "Additional tools",
|
"additional-tools-title": "Additional tools",
|
||||||
"one-way-routes": "Single track routes",
|
"one-way-routes": "Single track routes",
|
||||||
"two-way-routes": "Double track routes",
|
"two-way-routes": "Double track routes",
|
||||||
|
"routes-hidden": "Hidden internal routes",
|
||||||
"no-data": "No available data about this scenery",
|
"no-data": "No available data about this scenery",
|
||||||
"option-active-timetables": "Active timetables",
|
"option-active-timetables": "Active timetables",
|
||||||
"option-timetables-history": "Timetables history PL1",
|
"option-timetables-history": "Timetables history PL1",
|
||||||
|
|||||||
@@ -554,6 +554,7 @@
|
|||||||
"additional-tools-title": "Dodatkowe narzędzia",
|
"additional-tools-title": "Dodatkowe narzędzia",
|
||||||
"one-way-routes": "Szlaki jednotorowe",
|
"one-way-routes": "Szlaki jednotorowe",
|
||||||
"two-way-routes": "Szlaki dwutorowe",
|
"two-way-routes": "Szlaki dwutorowe",
|
||||||
|
"routes-hidden": "Ukryto szlaki wewnętrzne",
|
||||||
"no-data": "Brak informacji o tej scenerii",
|
"no-data": "Brak informacji o tej scenerii",
|
||||||
"option-active-timetables": "Aktywne rozkłady jazdy",
|
"option-active-timetables": "Aktywne rozkłady jazdy",
|
||||||
"option-timetables-history": "Historia rozkładów PL1",
|
"option-timetables-history": "Historia rozkładów PL1",
|
||||||
|
|||||||
@@ -94,14 +94,14 @@ export const initFilters = {
|
|||||||
minTwoWayCatenary: 0,
|
minTwoWayCatenary: 0,
|
||||||
minTwoWayInt: 0,
|
minTwoWayInt: 0,
|
||||||
minTwoWayCatenaryInt: 0,
|
minTwoWayCatenaryInt: 0,
|
||||||
maxOneWay: 5,
|
maxOneWay: 10,
|
||||||
maxOneWayCatenary: 5,
|
maxOneWayCatenary: 10,
|
||||||
maxOneWayInt: 5,
|
maxOneWayInt: 20,
|
||||||
maxOneWayCatenaryInt: 5,
|
maxOneWayCatenaryInt: 20,
|
||||||
maxTwoWay: 5,
|
maxTwoWay: 10,
|
||||||
maxTwoWayCatenary: 5,
|
maxTwoWayCatenary: 10,
|
||||||
maxTwoWayInt: 5,
|
maxTwoWayInt: 20,
|
||||||
maxTwoWayCatenaryInt: 5,
|
maxTwoWayCatenaryInt: 20,
|
||||||
authors: '',
|
authors: '',
|
||||||
projects: '',
|
projects: '',
|
||||||
lines: ''
|
lines: ''
|
||||||
@@ -122,62 +122,62 @@ export const sliderGroups: SliderGroup[] = [
|
|||||||
|
|
||||||
export const sliderGroupsOptions: Record<SliderGroup, SliderOptions[]> = {
|
export const sliderGroupsOptions: Record<SliderGroup, SliderOptions[]> = {
|
||||||
vMax: [
|
vMax: [
|
||||||
{ id: 'minVmax', minRange: 0, maxRange: 200, step: 10 },
|
{ id: 'minVmax', minRange: 0, maxRange: 200, step: 20 },
|
||||||
{ id: 'maxVmax', minRange: 0, maxRange: 200, step: 10 }
|
{ id: 'maxVmax', minRange: 0, maxRange: 200, step: 20 }
|
||||||
],
|
],
|
||||||
level: [
|
level: [
|
||||||
{ id: 'minLevel', minRange: 0, maxRange: 20, step: 1 },
|
{ id: 'minLevel', minRange: 0, maxRange: 20, step: 1 },
|
||||||
{ id: 'maxLevel', minRange: 0, maxRange: 20, step: 1 }
|
{ id: 'maxLevel', minRange: 0, maxRange: 20, step: 1 }
|
||||||
],
|
],
|
||||||
routeOneWay: [
|
routeOneWay: [
|
||||||
{ id: 'minOneWay', minRange: 0, maxRange: 5, step: 1 },
|
{ id: 'minOneWay', minRange: 0, maxRange: 10, step: 1 },
|
||||||
{ id: 'maxOneWay', minRange: 0, maxRange: 5, step: 1 }
|
{ id: 'maxOneWay', minRange: 0, maxRange: 10, step: 1 }
|
||||||
],
|
],
|
||||||
routeOneWayCatenary: [
|
routeOneWayCatenary: [
|
||||||
{ id: 'minOneWayCatenary', minRange: 0, maxRange: 5, step: 1 },
|
{ id: 'minOneWayCatenary', minRange: 0, maxRange: 10, step: 1 },
|
||||||
{ id: 'maxOneWayCatenary', minRange: 0, maxRange: 5, step: 1 }
|
{ id: 'maxOneWayCatenary', minRange: 0, maxRange: 10, step: 1 }
|
||||||
],
|
],
|
||||||
routeOneWayInternal: [
|
routeOneWayInternal: [
|
||||||
{ id: 'minOneWayInt', minRange: 0, maxRange: 5, step: 1 },
|
{ id: 'minOneWayInt', minRange: 0, maxRange: 20, step: 1 },
|
||||||
{ id: 'maxOneWayInt', minRange: 0, maxRange: 5, step: 1 }
|
{ id: 'maxOneWayInt', minRange: 0, maxRange: 20, step: 1 }
|
||||||
],
|
],
|
||||||
routeOneWayInternalCatenary: [
|
routeOneWayInternalCatenary: [
|
||||||
{
|
{
|
||||||
id: 'minOneWayCatenaryInt',
|
id: 'minOneWayCatenaryInt',
|
||||||
minRange: 0,
|
minRange: 0,
|
||||||
maxRange: 5,
|
maxRange: 20,
|
||||||
step: 1
|
step: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'maxOneWayCatenaryInt',
|
id: 'maxOneWayCatenaryInt',
|
||||||
minRange: 0,
|
minRange: 0,
|
||||||
maxRange: 5,
|
maxRange: 20,
|
||||||
step: 1
|
step: 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
routeTwoWay: [
|
routeTwoWay: [
|
||||||
{ id: 'minTwoWay', minRange: 0, maxRange: 5, step: 1 },
|
{ id: 'minTwoWay', minRange: 0, maxRange: 10, step: 1 },
|
||||||
{ id: 'maxTwoWay', minRange: 0, maxRange: 5, step: 1 }
|
{ id: 'maxTwoWay', minRange: 0, maxRange: 10, step: 1 }
|
||||||
],
|
],
|
||||||
routeTwoWayCatenary: [
|
routeTwoWayCatenary: [
|
||||||
{ id: 'minTwoWayCatenary', minRange: 0, maxRange: 5, step: 1 },
|
{ id: 'minTwoWayCatenary', minRange: 0, maxRange: 10, step: 1 },
|
||||||
{ id: 'maxTwoWayCatenary', minRange: 0, maxRange: 5, step: 1 }
|
{ id: 'maxTwoWayCatenary', minRange: 0, maxRange: 10, step: 1 }
|
||||||
],
|
],
|
||||||
routeTwoWayInternal: [
|
routeTwoWayInternal: [
|
||||||
{ id: 'minTwoWayInt', minRange: 0, maxRange: 5, step: 1 },
|
{ id: 'minTwoWayInt', minRange: 0, maxRange: 20, step: 1 },
|
||||||
{ id: 'maxTwoWayInt', minRange: 0, maxRange: 5, step: 1 }
|
{ id: 'maxTwoWayInt', minRange: 0, maxRange: 20, step: 1 }
|
||||||
],
|
],
|
||||||
routeTwoWayInternalCatenary: [
|
routeTwoWayInternalCatenary: [
|
||||||
{
|
{
|
||||||
id: 'minTwoWayCatenaryInt',
|
id: 'minTwoWayCatenaryInt',
|
||||||
minRange: 0,
|
minRange: 0,
|
||||||
maxRange: 5,
|
maxRange: 20,
|
||||||
step: 1
|
step: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'maxTwoWayCatenaryInt',
|
id: 'maxTwoWayCatenaryInt',
|
||||||
minRange: 0,
|
minRange: 0,
|
||||||
maxRange: 5,
|
maxRange: 20,
|
||||||
step: 1
|
step: 1
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user