mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b6c6ee756 | |||
| 829059d35b | |||
| b56e114ef9 | |||
| 71b4cc3bdb | |||
| 8cc773ffb5 | |||
| 427b4c03e4 | |||
| 46dc43d652 | |||
| 6435d12090 | |||
| e41b8cfa98 | |||
| bc81bb2a38 | |||
| e6c064d15d | |||
| 4d1df5165c | |||
| 43ac2be3e7 | |||
| 75c4e56183 | |||
| 931f6b9fbd | |||
| 21fa1f8699 | |||
| 877ef50a97 | |||
| 933be53630 | |||
| eef4103960 |
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "stacjownik",
|
||||
"version": "1.29.0",
|
||||
"version": "1.29.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</i>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<div class="actions-container">
|
||||
<a
|
||||
class="action a-button btn--image coffee"
|
||||
href="https://buycoffee.to/spythere"
|
||||
@@ -198,7 +198,7 @@ a.discord {
|
||||
}
|
||||
}
|
||||
|
||||
.actions > .action {
|
||||
.actions-container > .action {
|
||||
&.paypal {
|
||||
$btnColor: #254069;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<div class="g-separator"></div>
|
||||
|
||||
<div class="stock-specs">
|
||||
<div class="timetable-specs">
|
||||
<span class="badge specs-badge" v-if="timetable.authorName">
|
||||
<span>{{ $t('journal.dispatcher-name') }}</span>
|
||||
<span>{{ timetable.authorName }}</span>
|
||||
@@ -254,6 +254,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
.timetable-specs,
|
||||
.stock-specs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -300,7 +301,7 @@ hr {
|
||||
}
|
||||
|
||||
@include smallScreen() {
|
||||
.stock-specs {
|
||||
.timetable-specs {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,69 +1,11 @@
|
||||
<template>
|
||||
<div class="scenery-info">
|
||||
<section>
|
||||
<div class="scenery-info-general">
|
||||
<SceneryInfoIcons :station="station" />
|
||||
<SceneryInfoIcons :station="station" />
|
||||
<SceneryInfoGeneral :station="station" />
|
||||
<SceneryInfoRoutes v-if="station" :station="station" />
|
||||
<SceneryInfoAuthors :station="station" />
|
||||
|
||||
<div class="scenery-general-list" v-if="station?.generalInfo">
|
||||
<span>
|
||||
<b>{{ $t('availability.title') }}:</b>
|
||||
{{ $t(`availability.${station.generalInfo.availability}`) }}
|
||||
|
||||
<span v-if="station.generalInfo.reqLevel > -1">
|
||||
-
|
||||
{{
|
||||
$t(
|
||||
'scenery.req-level',
|
||||
{ lvl: station.generalInfo.reqLevel },
|
||||
station.generalInfo.reqLevel
|
||||
)
|
||||
}}
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<span>
|
||||
• <b>{{ $t('controls.title') }}:</b>
|
||||
{{ $t(`controls.${station.generalInfo.controlType}`) }}
|
||||
</span>
|
||||
|
||||
<span>
|
||||
• <b>{{ $t('signals.title') }}:</b>
|
||||
{{ $t(`signals.${station.generalInfo.signalType}`) }}
|
||||
</span>
|
||||
|
||||
<span v-if="station.generalInfo.lines">
|
||||
• <b>{{ $t('scenery.lines-title') }}:</b> {{ station.generalInfo.lines }}
|
||||
</span>
|
||||
<span v-if="station.generalInfo.project">
|
||||
• <b>{{ $t('scenery.project-title') }}: </b>
|
||||
<a
|
||||
style="color: salmon; text-decoration: underline; font-weight: bold"
|
||||
:href="station.generalInfo.projectUrl"
|
||||
target="_blank"
|
||||
>
|
||||
{{ station.generalInfo.project }}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<SceneryInfoRoutes v-if="station" :station="station" />
|
||||
|
||||
<div
|
||||
class="scenery-authors"
|
||||
v-if="station?.generalInfo?.authors && station.generalInfo.authors.length > 0"
|
||||
>
|
||||
<b>
|
||||
{{
|
||||
$t(
|
||||
'scenery.authors-title',
|
||||
{ authors: station.generalInfo.authors.length },
|
||||
station.generalInfo.authors.length
|
||||
)
|
||||
}}:
|
||||
</b>
|
||||
{{ station.generalInfo.authors.join(', ') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin: 2em 0; height: 2px; background-color: white"></div>
|
||||
|
||||
@@ -89,15 +31,20 @@ import SceneryInfoIcons from './SceneryInfo/SceneryInfoIcons.vue';
|
||||
import SceneryInfoUserList from './SceneryInfo/SceneryInfoUserList.vue';
|
||||
import SceneryInfoSpawnList from './SceneryInfo/SceneryInfoSpawnList.vue';
|
||||
import SceneryInfoRoutes from './SceneryInfo/SceneryInfoRoutes.vue';
|
||||
import SceneryInfoGeneral from './SceneryInfo/SceneryInfoGeneral.vue';
|
||||
import SceneryInfoAuthors from "./SceneryInfo/SceneryInfoAuthors.vue";
|
||||
|
||||
import { ActiveScenery, Station } from '../../typings/common';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
SceneryInfoDispatcher,
|
||||
SceneryInfoGeneral,
|
||||
SceneryInfoIcons,
|
||||
SceneryInfoAuthors,
|
||||
SceneryInfoUserList,
|
||||
SceneryInfoSpawnList,
|
||||
SceneryInfoRoutes
|
||||
SceneryInfoRoutes,
|
||||
},
|
||||
props: {
|
||||
station: {
|
||||
@@ -134,20 +81,6 @@ h3.section-header {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.scenery-info-general {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.scenery-general-list {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
span {
|
||||
margin: 0 0.15em;
|
||||
}
|
||||
}
|
||||
|
||||
.scenery-topic a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<section
|
||||
class="scenery-authors"
|
||||
v-if="station?.generalInfo?.authors && station.generalInfo.authors.length > 0"
|
||||
>
|
||||
<b>
|
||||
{{
|
||||
$t(
|
||||
'scenery.authors-title',
|
||||
{ authors: station.generalInfo.authors.length },
|
||||
station.generalInfo.authors.length
|
||||
)
|
||||
}}:
|
||||
</b>
|
||||
{{ station.generalInfo.authors.join(', ') }}
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, PropType } from 'vue';
|
||||
import { Station } from '../../../typings/common';
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
station: {
|
||||
type: Object as PropType<Station>
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<section class="info-general">
|
||||
<div v-if="station?.generalInfo === undefined">
|
||||
<b>{{ $t('scenery.no-data') }}</b>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<span>
|
||||
<b>{{ $t('availability.title') }}:</b>
|
||||
{{ $t(`availability.${station.generalInfo.availability}`) }}
|
||||
|
||||
<span v-if="station.generalInfo.reqLevel > -1">
|
||||
-
|
||||
{{
|
||||
$t(
|
||||
'scenery.req-level',
|
||||
{ lvl: station.generalInfo.reqLevel },
|
||||
station.generalInfo.reqLevel
|
||||
)
|
||||
}}
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<span>
|
||||
• <b>{{ $t('controls.title') }}:</b>
|
||||
{{ $t(`controls.${station.generalInfo.controlType}`) }}
|
||||
</span>
|
||||
|
||||
<span>
|
||||
• <b>{{ $t('signals.title') }}:</b>
|
||||
{{ $t(`signals.${station.generalInfo.signalType}`) }}
|
||||
</span>
|
||||
|
||||
<span v-if="station.generalInfo.lines">
|
||||
• <b>{{ $t('scenery.lines-title') }}:</b> {{ station.generalInfo.lines }}
|
||||
</span>
|
||||
|
||||
<span v-if="station.generalInfo.project">
|
||||
• <b>{{ $t('scenery.project-title') }}: </b>
|
||||
<a
|
||||
style="color: salmon; text-decoration: underline; font-weight: bold"
|
||||
:href="station.generalInfo.projectUrl"
|
||||
target="_blank"
|
||||
>
|
||||
{{ station.generalInfo.project }}
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<span v-if="additionalTools.length != 0">
|
||||
• <b>{{ $t('scenery.additional-tools-title') }}: </b>
|
||||
{{ additionalTools.join(', ') }}
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, PropType } from 'vue';
|
||||
import { Station } from '../../../typings/common';
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
station: {
|
||||
type: Object as PropType<Station>
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
additionalTools() {
|
||||
if (this.$props.station?.generalInfo === undefined) return [];
|
||||
let tools = [];
|
||||
|
||||
if (this.$props.station.generalInfo.SUP) tools.push('SUP');
|
||||
if (this.$props.station.generalInfo.ASDEK) tools.push('ASDEK');
|
||||
|
||||
return tools;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.info-general {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
div {
|
||||
margin: 0 0.15em;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -17,25 +17,6 @@
|
||||
{{ station?.generalInfo.reqLevel >= 2 ? station?.generalInfo.reqLevel : 'L' }}
|
||||
</span>
|
||||
|
||||
<span
|
||||
v-if="station?.generalInfo"
|
||||
class="scenery-icon icon-info"
|
||||
:class="station?.generalInfo.controlType.replace('+', '-')"
|
||||
:title="
|
||||
$t('sceneries.info.control-type') + $t(`controls.${station?.generalInfo.controlType}`)
|
||||
"
|
||||
>
|
||||
{{ $t(`controls.abbrevs.${station.generalInfo.controlType}`) }}
|
||||
</span>
|
||||
|
||||
<img
|
||||
v-if="station?.generalInfo?.signalType"
|
||||
class="icon-info"
|
||||
:src="`/images/icon-${station.generalInfo.signalType}.svg`"
|
||||
:alt="station.generalInfo.signalType"
|
||||
:title="$t('sceneries.info.signals-type') + $t(`signals.${station.generalInfo.signalType}`)"
|
||||
/>
|
||||
|
||||
<img
|
||||
v-if="station?.generalInfo?.availability == 'nonPublic'"
|
||||
class="icon-info"
|
||||
@@ -60,6 +41,33 @@
|
||||
:title="$t('sceneries.info.abandoned')"
|
||||
/>
|
||||
|
||||
<span
|
||||
v-if="station?.generalInfo"
|
||||
class="scenery-icon icon-info"
|
||||
:class="station?.generalInfo.controlType.replace('+', '-')"
|
||||
:title="
|
||||
$t('sceneries.info.control-type') + $t(`controls.${station?.generalInfo.controlType}`)
|
||||
"
|
||||
>
|
||||
{{ $t(`controls.abbrevs.${station.generalInfo.controlType}`) }}
|
||||
</span>
|
||||
|
||||
<img
|
||||
v-if="station?.generalInfo?.signalType"
|
||||
class="icon-info"
|
||||
:src="`/images/icon-${station.generalInfo.signalType}.svg`"
|
||||
:alt="station.generalInfo.signalType"
|
||||
:title="$t('sceneries.info.signals-type') + $t(`signals.${station.generalInfo.signalType}`)"
|
||||
/>
|
||||
|
||||
<img
|
||||
v-if="station?.generalInfo?.lines"
|
||||
class="icon-info"
|
||||
src="/images/icon-real.svg"
|
||||
alt="real scenery"
|
||||
:title="`${$t('sceneries.info.real')} ${station.generalInfo.lines}`"
|
||||
/>
|
||||
|
||||
<img
|
||||
v-if="station?.generalInfo?.SUP"
|
||||
class="icon-info"
|
||||
@@ -75,14 +83,6 @@
|
||||
alt="dSAT ASDEK"
|
||||
:title="$t('sceneries.info.ASDEK')"
|
||||
/>
|
||||
|
||||
<img
|
||||
v-if="station?.generalInfo?.lines"
|
||||
class="icon-info"
|
||||
src="/images/icon-real.svg"
|
||||
alt="real scenery"
|
||||
:title="`${$t('sceneries.info.real')} ${station.generalInfo.lines}`"
|
||||
/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,23 +1,26 @@
|
||||
<template>
|
||||
<section class="info-routes" v-if="station.generalInfo">
|
||||
<div class="routes one-way" v-if="oneWayRoutes.length > 0">
|
||||
<b>{{ $t('scenery.one-way-routes') }}</b>
|
||||
<button
|
||||
class="routes-btn"
|
||||
@click="toggleRoutesVisibility('single')"
|
||||
data-tooltip-type="BaseTooltip"
|
||||
:data-tooltip-content="`${showInternalSingleRoutes ? $t('scenery.btn-hide-internal-routes') : $t('scenery.btn-show-internal-routes')}`"
|
||||
>
|
||||
<b>{{ $t('scenery.one-way-routes') }}</b>
|
||||
<i class="fa-solid" :class="`${showInternalSingleRoutes ? 'fa-eye' : 'fa-eye-slash'}`"></i>
|
||||
</button>
|
||||
|
||||
<ul class="routes-list">
|
||||
<li
|
||||
v-for="route in oneWayRoutes"
|
||||
:key="route.routeName"
|
||||
@click="setActiveShowLength(route.routeName)"
|
||||
>
|
||||
<li v-for="route in oneWayRoutes" :key="route.routeName">
|
||||
<span :class="{ 'no-catenary': !route.isElectric, internal: route.isInternal }">
|
||||
{{ route.routeName }}</span
|
||||
>
|
||||
<span v-if="route.routeSpeed" class="speed">
|
||||
{{
|
||||
activeShowLength.includes(route.routeName)
|
||||
? route.routeLength + 'm'
|
||||
: route.routeSpeed
|
||||
}}
|
||||
{{ route.routeSpeed }}
|
||||
</span>
|
||||
<span v-if="route.routeLength" class="length">
|
||||
{{ (route.routeLength / 1000).toFixed(1) + 'km' }}
|
||||
</span>
|
||||
<span v-if="route.isRouteSBL" class="sbl">SBL</span>
|
||||
</li>
|
||||
@@ -25,23 +28,24 @@
|
||||
</div>
|
||||
|
||||
<div class="routes two-way" v-if="twoWayRoutes.length > 0">
|
||||
<b>{{ $t('scenery.two-way-routes') }}</b>
|
||||
<button
|
||||
class="routes-btn"
|
||||
@click="toggleRoutesVisibility('double')"
|
||||
data-tooltip-type="BaseTooltip"
|
||||
:data-tooltip-content="`${showInternalDoubleRoutes ? $t('scenery.btn-hide-internal-routes') : $t('scenery.btn-show-internal-routes')}`"
|
||||
>
|
||||
<b>{{ $t('scenery.two-way-routes') }}</b>
|
||||
<i class="fa-solid" :class="`${showInternalDoubleRoutes ? 'fa-eye' : 'fa-eye-slash'}`"></i>
|
||||
</button>
|
||||
|
||||
<ul class="routes-list">
|
||||
<li
|
||||
v-for="route in twoWayRoutes"
|
||||
:key="route.routeName"
|
||||
@click="setActiveShowLength(route.routeName)"
|
||||
>
|
||||
<span :class="{ 'no-catenary': !route.isElectric, internal: route.isInternal }">{{
|
||||
route.routeName
|
||||
}}</span>
|
||||
<span v-if="route.routeSpeed" class="speed">
|
||||
{{
|
||||
activeShowLength.includes(route.routeName)
|
||||
? route.routeLength + 'm'
|
||||
: route.routeSpeed
|
||||
}}
|
||||
<li v-for="route in twoWayRoutes" :key="route.routeName">
|
||||
<span :class="{ 'no-catenary': !route.isElectric, internal: route.isInternal }">
|
||||
{{ route.routeName }}
|
||||
</span>
|
||||
<span v-if="route.routeSpeed" class="speed">{{ route.routeSpeed }}</span>
|
||||
<span v-if="route.routeLength" class="length">
|
||||
{{ (route.routeLength / 1000).toFixed(1) + 'km' }}
|
||||
</span>
|
||||
<span v-if="route.isRouteSBL" class="sbl">SBL</span>
|
||||
</li>
|
||||
@@ -53,6 +57,7 @@
|
||||
<script lang="ts">
|
||||
import { PropType, defineComponent } from 'vue';
|
||||
import { Station } from '../../../typings/common';
|
||||
import StorageManager from '../../../managers/storageManager';
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
@@ -62,27 +67,50 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
setActiveShowLength(name: string) {
|
||||
if (this.activeShowLength.includes(name))
|
||||
this.activeShowLength.splice(this.activeShowLength.indexOf(name), 1);
|
||||
else this.activeShowLength.push(name);
|
||||
data() {
|
||||
return {
|
||||
showInternalSingleRoutes: false,
|
||||
showInternalDoubleRoutes: false
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
if (StorageManager.getBooleanValue('showInternalDoubleRoutes')) {
|
||||
this.showInternalDoubleRoutes = StorageManager.getBooleanValue('showInternalDoubleRoutes');
|
||||
}
|
||||
|
||||
if (StorageManager.getBooleanValue('showInternalSingleRoutes')) {
|
||||
this.showInternalSingleRoutes = StorageManager.getBooleanValue('showInternalSingleRoutes');
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
activeShowLength: [] as string[]
|
||||
};
|
||||
methods: {
|
||||
toggleRoutesVisibility(type: 'single' | 'double') {
|
||||
if (type == 'double') {
|
||||
this.showInternalDoubleRoutes = !this.showInternalDoubleRoutes;
|
||||
StorageManager.setBooleanValue('showInternalDoubleRoutes', this.showInternalDoubleRoutes);
|
||||
} else {
|
||||
this.showInternalSingleRoutes = !this.showInternalSingleRoutes;
|
||||
StorageManager.setBooleanValue('showInternalSingleRoutes', this.showInternalSingleRoutes);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
oneWayRoutes() {
|
||||
return this.station.generalInfo?.routes.single ?? [];
|
||||
return (
|
||||
this.station.generalInfo?.routes.single
|
||||
.filter((r) => !r.isInternal || r.isInternal == this.showInternalSingleRoutes)
|
||||
.sort((r1, r2) => r1.routeName.localeCompare(r2.routeName)) ?? []
|
||||
);
|
||||
},
|
||||
|
||||
twoWayRoutes() {
|
||||
return this.station.generalInfo?.routes.double ?? [];
|
||||
return (
|
||||
this.station.generalInfo?.routes.double
|
||||
.filter((r) => !r.isInternal || r.isInternal == this.showInternalDoubleRoutes)
|
||||
.sort((r1, r2) => r1.routeName.localeCompare(r2.routeName)) ?? []
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -92,20 +120,26 @@ export default defineComponent({
|
||||
.info-routes {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.routes {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
padding: 0.25em;
|
||||
}
|
||||
|
||||
.routes > button.routes-btn {
|
||||
margin: 0 auto;
|
||||
display: inline-block;
|
||||
|
||||
i {
|
||||
margin-left: 0.5em;
|
||||
width: 1.25em;
|
||||
height: 1.25em;
|
||||
}
|
||||
}
|
||||
|
||||
ul.routes-list {
|
||||
margin: 0.45em 0.25em;
|
||||
display: flex;
|
||||
@@ -121,7 +155,7 @@ ul.routes-list {
|
||||
-webkit-user-select: none;
|
||||
|
||||
span {
|
||||
padding: 0.2em 0.25em;
|
||||
padding: 0.2em;
|
||||
background-color: #007599;
|
||||
font-weight: bold;
|
||||
|
||||
@@ -138,6 +172,10 @@ ul.routes-list {
|
||||
color: #cfcfcf;
|
||||
}
|
||||
|
||||
&.length {
|
||||
background-color: #303030;
|
||||
color: #cfcfcf;
|
||||
}
|
||||
&.sbl {
|
||||
color: var(--clr-primary);
|
||||
background-color: #404040;
|
||||
|
||||
@@ -23,7 +23,10 @@
|
||||
<span class="user_name">
|
||||
{{ train.driverName }}
|
||||
<i
|
||||
v-if="train.timetableData != undefined && train.lastSeen <= Date.now() - 120000"
|
||||
v-if="
|
||||
train.timetableData != undefined &&
|
||||
(train.lastSeen <= Date.now() - 60000 || !train.online)
|
||||
"
|
||||
class="fa-solid fa-user-slash"
|
||||
style="color: lightcoral"
|
||||
data-tooltip-type="BaseTooltip"
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
<span class="schedule-stop">
|
||||
<span class="stop-connection">
|
||||
{{ row.arrivingLine }}
|
||||
{{ row.currentElement.arrivalRouteExt }}
|
||||
</span>
|
||||
|
||||
<span class="stop-time">
|
||||
@@ -139,7 +139,7 @@
|
||||
</span>
|
||||
|
||||
<span class="stop-connection">
|
||||
{{ row.departureLine }}
|
||||
{{ row.currentElement.departureRouteExt }}
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@@ -279,12 +279,9 @@ export default defineComponent({
|
||||
return {
|
||||
checkpointStop: ct.checkpointStop,
|
||||
train: ct.train,
|
||||
prevDepartureLine: ct.previousSceneryElement?.departureRouteExt ?? null,
|
||||
nextArrivalLine: ct.nextSceneryElement?.arrivalRouteExt ?? null,
|
||||
departureLine: ct.timetablePathElement.departureRouteExt ?? null,
|
||||
arrivingLine: ct.timetablePathElement.arrivalRouteExt ?? null,
|
||||
prevStationName: ct.previousSceneryElement?.stationName ?? null,
|
||||
nextStationName: ct.nextSceneryElement?.stationName ?? null,
|
||||
prevElement: ct.previousSceneryElement,
|
||||
nextElement: ct.nextSceneryElement,
|
||||
currentElement: ct.timetablePathElement,
|
||||
status: trainStopStatus
|
||||
};
|
||||
})
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
<div class="general-status">
|
||||
<span
|
||||
:class="computedScheduledTrain.status"
|
||||
:title="computedScheduledTrain.stopStatusDescription"
|
||||
data-tooltip-type="HtmlTooltip"
|
||||
:data-tooltip-content="computedScheduledTrain.stopStatusDescription"
|
||||
@click.prevent="() => {}"
|
||||
>
|
||||
{{ computedScheduledTrain.stopStatusIndicator }}
|
||||
</span>
|
||||
@@ -24,16 +26,16 @@ export default defineComponent({
|
||||
|
||||
computed: {
|
||||
computedScheduledTrain() {
|
||||
const { prevDepartureLine, prevStationName, nextArrivalLine, nextStationName, status } =
|
||||
this.sceneryTimetableRow;
|
||||
const { status, prevElement, currentElement, nextElement } = this.sceneryTimetableRow;
|
||||
|
||||
const prevDepartureIndicator = prevDepartureLine
|
||||
? `(${prevDepartureLine}) ${prevStationName}`
|
||||
: '---';
|
||||
const nextArrivalIndicator = nextArrivalLine
|
||||
? `(${nextArrivalLine}) ${nextStationName}`
|
||||
const prevDepartureIndicator = prevElement?.departureRouteExt
|
||||
? `(${prevElement.departureRouteExt}) ${prevElement.stationName}`
|
||||
: '---';
|
||||
|
||||
const nextArrivalIndicator = nextElement?.arrivalRouteExt
|
||||
? `(${nextElement.arrivalRouteExt}) ${nextElement.stationName}`
|
||||
: `${currentElement.stationName}`;
|
||||
|
||||
let stopStatusDescription = '',
|
||||
stopStatusIndicator = '';
|
||||
|
||||
@@ -41,34 +43,45 @@ export default defineComponent({
|
||||
case StopStatus.ARRIVING:
|
||||
stopStatusIndicator = `${this.$t('timetables.from')}: ${prevDepartureIndicator}`;
|
||||
stopStatusDescription = this.$t('timetables.desc-arriving', {
|
||||
prevStationName,
|
||||
prevDepartureLine
|
||||
prevStationName: prevElement?.stationName ?? '',
|
||||
prevDepartureLine: prevElement?.departureRouteExt ?? ''
|
||||
});
|
||||
break;
|
||||
|
||||
case StopStatus.ONLINE:
|
||||
case StopStatus.STOPPED:
|
||||
stopStatusIndicator = nextArrivalLine
|
||||
stopStatusIndicator = nextElement?.arrivalRouteExt
|
||||
? `${this.$t('timetables.to')}: ${nextArrivalIndicator}`
|
||||
: `${this.$t('timetables.desc-end')}`;
|
||||
stopStatusDescription = nextArrivalLine
|
||||
? this.$t(`timetables.desc-${status}`, { nextStationName, nextArrivalLine })
|
||||
stopStatusDescription = nextElement?.arrivalRouteExt
|
||||
? this.$t(`timetables.desc-${status}`, {
|
||||
nextStationName: nextElement?.stationName,
|
||||
nextArrivalLine: nextElement?.arrivalRouteExt
|
||||
})
|
||||
: '';
|
||||
break;
|
||||
|
||||
case StopStatus.DEPARTED:
|
||||
stopStatusIndicator = `${this.$t('timetables.to')}: ${nextArrivalIndicator}`;
|
||||
stopStatusDescription = this.$t('timetables.desc-departed', {
|
||||
nextStationName,
|
||||
nextArrivalLine
|
||||
});
|
||||
|
||||
if (!nextElement?.stationName) {
|
||||
stopStatusDescription = this.$t('timetables.desc-departed-ends', {
|
||||
nextStationName: currentElement.stationName
|
||||
});
|
||||
} else {
|
||||
stopStatusDescription = this.$t('timetables.desc-departed', {
|
||||
nextStationName: nextElement?.stationName ?? currentElement.stationName,
|
||||
nextArrivalLine: nextElement?.arrivalRouteExt
|
||||
});
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case StopStatus.DEPARTED_AWAY:
|
||||
stopStatusIndicator = `${this.$t('timetables.to')}: ${nextArrivalIndicator}`;
|
||||
stopStatusDescription = this.$t('timetables.desc-departed-away', {
|
||||
nextStationName,
|
||||
nextArrivalLine
|
||||
nextStationName: nextElement?.stationName,
|
||||
nextArrivalLine: nextElement?.arrivalRouteExt
|
||||
});
|
||||
break;
|
||||
|
||||
@@ -93,6 +106,7 @@ export default defineComponent({
|
||||
<style lang="scss" scoped>
|
||||
.general-status {
|
||||
margin-top: 0.5em;
|
||||
cursor: help;
|
||||
|
||||
span.arriving {
|
||||
color: #ccc;
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
import { StopStatus, Train, TrainStop } from '../../typings/common';
|
||||
import { StopStatus, TimetablePathElement, Train, TrainStop } from '../../typings/common';
|
||||
|
||||
export interface SceneryTimetableRow {
|
||||
checkpointStop: TrainStop;
|
||||
train: Train;
|
||||
prevDepartureLine: string | null;
|
||||
nextArrivalLine: string | null;
|
||||
departureLine: string | null;
|
||||
arrivingLine: string | null;
|
||||
prevStationName: string | null;
|
||||
nextStationName: string | null;
|
||||
prevElement: TimetablePathElement | null;
|
||||
nextElement: TimetablePathElement | null;
|
||||
currentElement: TimetablePathElement;
|
||||
status: StopStatus;
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
</section>
|
||||
|
||||
<section class="card_sliders">
|
||||
<div class="slider" v-for="(slider, i) in initSliders" :key="i">
|
||||
<div class="slider" v-for="(slider, i) in sliderStates" :key="i">
|
||||
<input
|
||||
class="slider-input"
|
||||
type="range"
|
||||
@@ -130,7 +130,7 @@
|
||||
:min="slider.minRange"
|
||||
:max="slider.maxRange"
|
||||
:step="slider.step"
|
||||
v-model="filters[slider.id]"
|
||||
v-model.number="filters[slider.id]"
|
||||
/>
|
||||
<span class="slider-value">{{ filters[slider.id] }}</span>
|
||||
<div class="slider-content">
|
||||
@@ -178,7 +178,7 @@ import StorageManager from '../../managers/storageManager';
|
||||
|
||||
import {
|
||||
filtersSections,
|
||||
initSliders,
|
||||
sliderStates,
|
||||
initFilters,
|
||||
getChangedFilters
|
||||
} from '../../managers/stationFilterManager';
|
||||
@@ -197,7 +197,7 @@ export default defineComponent({
|
||||
saveOptions: false,
|
||||
|
||||
filtersSections,
|
||||
initSliders,
|
||||
sliderStates,
|
||||
|
||||
minimumHours: 0,
|
||||
authors: '',
|
||||
@@ -567,7 +567,8 @@ h3.section-header {
|
||||
}
|
||||
|
||||
.slider {
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 50px 1fr;
|
||||
align-items: center;
|
||||
gap: 0.25em;
|
||||
|
||||
@@ -576,6 +577,7 @@ h3.section-header {
|
||||
&-value {
|
||||
color: $accentCol;
|
||||
padding: 0.1em 0.2em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&-input {
|
||||
@@ -602,7 +604,8 @@ h3.section-header {
|
||||
border-radius: 50%;
|
||||
|
||||
background: white;
|
||||
border: 4px solid $accentCol;
|
||||
border: 3px solid $accentCol;
|
||||
background-color: #333;
|
||||
|
||||
@include smallScreen() {
|
||||
width: 15px;
|
||||
@@ -658,12 +661,17 @@ h3.section-header {
|
||||
|
||||
@include smallScreen {
|
||||
.slider {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
|
||||
&-input {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
&-content {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -429,14 +429,16 @@ table {
|
||||
min-width: 1250px;
|
||||
white-space: wrap;
|
||||
|
||||
thead {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
thead tr {
|
||||
background-color: $bgCol;
|
||||
}
|
||||
|
||||
thead th {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
|
||||
&.station {
|
||||
width: 12em;
|
||||
}
|
||||
|
||||
@@ -120,6 +120,8 @@ function filterSliderValues(filters: Record<string, any>, generalInfo: StationGe
|
||||
const otherAvailability =
|
||||
availability == 'nonPublic' || availability == 'unavailable' || availability == 'abandoned';
|
||||
|
||||
const internalRoutes = routes.all.filter((r) => r.isInternal && !r.isRouteSBL && !r.hidden);
|
||||
|
||||
return (
|
||||
filters['minLevel'] > reqLevel + (otherAvailability ? 1 : 0) ||
|
||||
filters['maxLevel'] < reqLevel + (otherAvailability ? 1 : 0) ||
|
||||
@@ -130,7 +132,13 @@ function filterSliderValues(filters: Record<string, any>, generalInfo: StationGe
|
||||
filters['minOneWayCatenary'] > routes.singleElectrifiedNames.length ||
|
||||
filters['minOneWay'] > routes.singleOtherNames.length ||
|
||||
filters['minTwoWayCatenary'] > routes.doubleElectrifiedNames.length ||
|
||||
filters['minTwoWay'] > routes.doubleOtherNames.length
|
||||
// filters['minTwoWay'] > routes.doubleOtherNames.length ||
|
||||
filters['minOneWayCatenaryInt'] >
|
||||
internalRoutes.filter((r) => r.routeTracks == 1 && r.isElectric == true).length ||
|
||||
filters['minOneWayInt'] >
|
||||
internalRoutes.filter((r) => r.routeTracks == 1 && r.isElectric == false).length ||
|
||||
filters['minTwoWayCatenaryInt'] >
|
||||
internalRoutes.filter((r) => r.routeTracks == 2 && r.isElectric == true).length
|
||||
);
|
||||
}
|
||||
|
||||
@@ -235,7 +243,7 @@ export const sortStations = (a: Station, b: Station, sorter: ActiveSorter) => {
|
||||
return a.name.localeCompare(b.name);
|
||||
};
|
||||
|
||||
export const filterStations = (station: Station, filters: Record<string, any>) => {
|
||||
export const filterStations = (station: Station, filters: Record<string, any>) => {
|
||||
if (filters['free'] && (!station.onlineInfo || station.onlineInfo.dispatcherId == -1))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<div class="tooltip-content">
|
||||
<span v-html="tooltipStore.content"></span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { useTooltipStore } from '../../store/tooltipStore';
|
||||
|
||||
export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
tooltipStore: useTooltipStore()
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.tooltip-content {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 0.5em;
|
||||
white-space: pre-line;
|
||||
|
||||
padding: 0.25em 0.5em;
|
||||
border-radius: 0.25em;
|
||||
|
||||
width: 100%;
|
||||
background-color: #1f1f1f;
|
||||
box-shadow: 0 0 5px 2px #aaa;
|
||||
}
|
||||
|
||||
img {
|
||||
height: 1em;
|
||||
}
|
||||
</style>
|
||||
@@ -12,11 +12,19 @@ import VehiclePreviewTooltip from './VehiclePreviewTooltip.vue';
|
||||
import BaseTooltip from './BaseTooltip.vue';
|
||||
import SpawnsTooltip from './SpawnsTooltip.vue';
|
||||
import UsersTooltip from './UsersTooltip.vue';
|
||||
import HtmlTooltip from './HtmlTooltip.vue';
|
||||
|
||||
const BOX_PADDING_PX = 20;
|
||||
|
||||
export default defineComponent({
|
||||
components: { DonatorTooltip, VehiclePreviewTooltip, BaseTooltip, SpawnsTooltip, UsersTooltip },
|
||||
components: {
|
||||
DonatorTooltip,
|
||||
VehiclePreviewTooltip,
|
||||
BaseTooltip,
|
||||
SpawnsTooltip,
|
||||
UsersTooltip,
|
||||
HtmlTooltip
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -187,17 +187,12 @@ import { defineComponent } from 'vue';
|
||||
import { useMainStore } from '../../store/mainStore';
|
||||
import { useApiStore } from '../../store/apiStore';
|
||||
import { Train } from '../../typings/common';
|
||||
import speedLimits from '../../data/speedLimits.json';
|
||||
import styleMixin from '../../mixins/styleMixin';
|
||||
import trainInfoMixin from '../../mixins/trainInfoMixin';
|
||||
import trainCategoryMixin from '../../mixins/trainCategoryMixin';
|
||||
import ProgressBar from '../Global/ProgressBar.vue';
|
||||
import StockList from '../Global/StockList.vue';
|
||||
|
||||
export type SpeedLimitLocoType = keyof typeof speedLimits;
|
||||
|
||||
const isCompatibleLoco = (locoType: string): locoType is SpeedLimitLocoType =>
|
||||
locoType in speedLimits;
|
||||
import { speedLimits } from '../../data/speedLimits';
|
||||
|
||||
export default defineComponent({
|
||||
mixins: [trainInfoMixin, styleMixin, trainCategoryMixin],
|
||||
@@ -239,19 +234,22 @@ export default defineComponent({
|
||||
|
||||
const headLoco = this.train.stockList[0].slice(0, this.train.stockList[0].indexOf('-'));
|
||||
|
||||
if (!isCompatibleLoco(headLoco)) return vehicleMaxSpeed;
|
||||
if (speedLimits[headLoco] === undefined) return vehicleMaxSpeed;
|
||||
|
||||
if (this.train.stockList.length == 1) return speedLimits[headLoco]['none'];
|
||||
|
||||
const speedTable = speedLimits[headLoco][isPassenger ? 'passenger' : 'cargo'];
|
||||
const speedTable: Record<string, number> =
|
||||
speedLimits[headLoco][isPassenger ? 'passenger' : 'cargo'];
|
||||
|
||||
if (!speedTable) return vehicleMaxSpeed;
|
||||
|
||||
let massKey = Object.keys(speedTable).findLast(
|
||||
const massKey = Object.keys(speedTable).findLast(
|
||||
(massKey) => this.train.mass >= Number(massKey)
|
||||
);
|
||||
|
||||
return massKey ? ((speedTable as any)[massKey] as number) : vehicleMaxSpeed;
|
||||
const massMaxSpeed = massKey ? speedTable[massKey] : Infinity;
|
||||
|
||||
return Math.min(massMaxSpeed, vehicleMaxSpeed);
|
||||
},
|
||||
journalRouteLocation() {
|
||||
return {
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
<div class="schedule-wrapper" v-if="train.timetableData">
|
||||
<div class="stops">
|
||||
<div
|
||||
v-for="(stop, i) in scheduleStopsV2"
|
||||
v-for="(stop, i) in scheduleStops"
|
||||
:key="i"
|
||||
class="stop"
|
||||
:data-status="stop.status"
|
||||
:data-sbl="stop.isSBL && stop.sceneryName == scheduleStopsV2[i + 1]?.sceneryName"
|
||||
:data-sbl="stop.isSBL && stop.sceneryName == scheduleStops[i + 1]?.sceneryName"
|
||||
:data-position="stop.position"
|
||||
:data-delayed="stop.departureDelay > 0"
|
||||
:data-stop-type="stop.type"
|
||||
@@ -34,7 +34,7 @@
|
||||
<div></div>
|
||||
|
||||
<div class="progress">
|
||||
<div class="line line_connection" v-if="i < scheduleStopsV2.length - 1"></div>
|
||||
<div class="line line_connection" v-if="i < scheduleStops.length - 1"></div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-line-info">
|
||||
@@ -48,9 +48,9 @@
|
||||
<span
|
||||
v-if="
|
||||
stop.departureLine &&
|
||||
(scheduleStopsV2[i + 1]?.arrivalLineInfo?.routeSpeed !=
|
||||
(scheduleStops[i + 1]?.arrivalLineInfo?.routeSpeed !=
|
||||
stop.arrivalLineInfo?.routeSpeed ||
|
||||
stop.sceneryName != scheduleStopsV2[i + 1]?.sceneryName)
|
||||
stop.sceneryName != scheduleStops[i + 1]?.sceneryName)
|
||||
"
|
||||
>
|
||||
<div class="scenery-route">
|
||||
@@ -85,13 +85,13 @@
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="stop.sceneryName != scheduleStopsV2[i + 1]?.sceneryName"
|
||||
v-if="stop.sceneryName != scheduleStops[i + 1]?.sceneryName"
|
||||
class="scenery-change-name"
|
||||
>
|
||||
<span>{{ scheduleStopsV2[i + 1].sceneryName }}</span>
|
||||
<span>{{ scheduleStops[i + 1].sceneryName }}</span>
|
||||
|
||||
<i
|
||||
v-if="!scheduleStopsV2[i + 1].isSceneryOnline"
|
||||
v-if="!scheduleStops[i + 1].isSceneryOnline"
|
||||
class="fa-solid fa-ban fa-sm"
|
||||
data-tooltip-type="BaseTooltip"
|
||||
:data-tooltip-content="$t('app.tooltip-scenery-offline')"
|
||||
@@ -101,30 +101,30 @@
|
||||
|
||||
<div
|
||||
class="scenery-route"
|
||||
v-if="stop.sceneryName != scheduleStopsV2[i + 1]?.sceneryName"
|
||||
v-if="stop.sceneryName != scheduleStops[i + 1]?.sceneryName"
|
||||
>
|
||||
<span> {{ scheduleStopsV2[i + 1].arrivalLine }}</span>
|
||||
<span> {{ scheduleStops[i + 1].arrivalLine }}</span>
|
||||
|
||||
<span v-if="scheduleStopsV2[i + 1].arrivalLineInfo">
|
||||
<span> | {{ scheduleStopsV2[i + 1].arrivalLineInfo!.routeSpeed }} </span>
|
||||
<span v-if="scheduleStops[i + 1].arrivalLineInfo">
|
||||
<span> | {{ scheduleStops[i + 1].arrivalLineInfo!.routeSpeed }} </span>
|
||||
|
||||
<img
|
||||
:src="
|
||||
scheduleStopsV2[i + 1].arrivalLineInfo?.isElectric
|
||||
scheduleStops[i + 1].arrivalLineInfo?.isElectric
|
||||
? '/images/icon-catenary.svg'
|
||||
: '/images/icon-we4a.png'
|
||||
"
|
||||
data-tooltip-type="BaseTooltip"
|
||||
:data-tooltip-content="
|
||||
$t(
|
||||
`trains.${!scheduleStopsV2[i + 1].arrivalLineInfo?.isElectric ? 'no-' : ''}catenary-tooltip`
|
||||
`trains.${!scheduleStops[i + 1].arrivalLineInfo?.isElectric ? 'no-' : ''}catenary-tooltip`
|
||||
)
|
||||
"
|
||||
width="14"
|
||||
/>
|
||||
|
||||
<img
|
||||
v-if="scheduleStopsV2[i + 1].arrivalLineInfo!.isRouteSBL"
|
||||
v-if="scheduleStops[i + 1].arrivalLineInfo!.isRouteSBL"
|
||||
src="/images/icon-sbl-transparent.svg"
|
||||
width="14"
|
||||
data-tooltip-type="BaseTooltip"
|
||||
@@ -206,7 +206,7 @@ export default defineComponent({
|
||||
},
|
||||
|
||||
computed: {
|
||||
scheduleStopsV2() {
|
||||
scheduleStops() {
|
||||
if (!this.train.timetableData) return [];
|
||||
|
||||
const { timetablePath, followingStops } = this.train.timetableData;
|
||||
@@ -224,20 +224,18 @@ export default defineComponent({
|
||||
let isActive = false;
|
||||
|
||||
if (pathData?.departureLineData) {
|
||||
arrivalLineInfo = pathData.departureLineData;
|
||||
// arrivalLineInfo = pathData.departureLineData;
|
||||
departureLineInfo = pathData.departureLineData;
|
||||
}
|
||||
|
||||
for (const stop of followingStops) {
|
||||
let isExternal = false;
|
||||
|
||||
if (
|
||||
stop.arrivalLine &&
|
||||
currentPath.arrivalRouteExt &&
|
||||
stop.arrivalLine == currentPath.arrivalRouteExt
|
||||
) {
|
||||
if (stop.arrivalLine === currentPath.arrivalRouteExt) {
|
||||
isExternal = true;
|
||||
|
||||
departureLineInfo = pathData?.arrivalLineData ?? null;
|
||||
|
||||
if (pathData?.arrivalLineData) {
|
||||
arrivalLineInfo = pathData.arrivalLineData;
|
||||
}
|
||||
@@ -282,8 +280,7 @@ export default defineComponent({
|
||||
departureLineInfo,
|
||||
|
||||
isExternal,
|
||||
|
||||
isActive: isActive,
|
||||
isActive,
|
||||
|
||||
isSBL: /sbl/gi.test(stop.stopName),
|
||||
position: stop.beginsHere ? 'begin' : stop.terminatesHere ? 'end' : 'en-route',
|
||||
@@ -312,11 +309,7 @@ export default defineComponent({
|
||||
|
||||
stopRows.push(rowData);
|
||||
|
||||
if (
|
||||
stop.departureLine &&
|
||||
currentPath.departureRouteExt &&
|
||||
stop.departureLine == currentPath.departureRouteExt
|
||||
) {
|
||||
if (stop.departureLine === currentPath.departureRouteExt) {
|
||||
// Reverse search for last scenery checkpoint
|
||||
if (pathData?.departureLineData) {
|
||||
stopRows[stopRows.length - 1].isExternal = true;
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
{
|
||||
"EU07": {
|
||||
"passenger": {
|
||||
"650000": 125
|
||||
},
|
||||
"cargo": {
|
||||
"2000000": 70
|
||||
},
|
||||
"none": 110
|
||||
},
|
||||
"4E": {
|
||||
"passenger": {
|
||||
"650000": 125
|
||||
},
|
||||
"cargo": {
|
||||
"2000000": 70
|
||||
},
|
||||
"none": 110
|
||||
},
|
||||
"EU07E": {
|
||||
"passenger": {
|
||||
"650000": 125
|
||||
},
|
||||
"cargo": {
|
||||
"2000000": 70
|
||||
},
|
||||
"none": 110
|
||||
},
|
||||
"EP07": {
|
||||
"passenger": {
|
||||
"650000": 125
|
||||
},
|
||||
"cargo": null,
|
||||
"none": 110
|
||||
},
|
||||
"EP08": {
|
||||
"passenger": {
|
||||
"650000": 140
|
||||
},
|
||||
"cargo": null,
|
||||
"none": 110
|
||||
},
|
||||
"EP09": {
|
||||
"passenger": {
|
||||
"650000": 160
|
||||
},
|
||||
"cargo": null,
|
||||
"none": 160
|
||||
},
|
||||
"ET22": {
|
||||
"passenger": {
|
||||
"650000": 125
|
||||
},
|
||||
"cargo": {
|
||||
"1200000": 100,
|
||||
"3100000": 70
|
||||
},
|
||||
"none": 125
|
||||
},
|
||||
"201E": {
|
||||
"passenger": {
|
||||
"650000": 125
|
||||
},
|
||||
"cargo": {
|
||||
"1200000": 100,
|
||||
"3100000": 70
|
||||
},
|
||||
"none": 125
|
||||
},
|
||||
"ET41": {
|
||||
"passenger": {
|
||||
"700000": 125
|
||||
},
|
||||
"cargo": {
|
||||
"4000000": 70,
|
||||
"3500000": 80,
|
||||
"2500000": 90,
|
||||
"2000000": 100
|
||||
},
|
||||
"none": 110
|
||||
},
|
||||
"SM42": {
|
||||
"passenger": {
|
||||
"95000": 90,
|
||||
"200000": 80,
|
||||
"300000": 70,
|
||||
"450000": 60,
|
||||
"750000": 50,
|
||||
"1130000": 40,
|
||||
"1720000": 30,
|
||||
"2400000": 20
|
||||
},
|
||||
"cargo": {
|
||||
"95000": 90,
|
||||
"200000": 80,
|
||||
"300000": 70,
|
||||
"450000": 60,
|
||||
"750000": 50,
|
||||
"1130000": 40,
|
||||
"1720000": 30,
|
||||
"2400000": 20
|
||||
},
|
||||
"none": 90
|
||||
},
|
||||
"M62": {
|
||||
"passenger": {
|
||||
"500000": 100,
|
||||
"800000": 80,
|
||||
"1200000": 60,
|
||||
"2000000": 40,
|
||||
"3000000": 20
|
||||
},
|
||||
"cargo": {
|
||||
"500000": 100,
|
||||
"800000": 80,
|
||||
"1200000": 60,
|
||||
"2000000": 40,
|
||||
"3000000": 20
|
||||
},
|
||||
"none": 100
|
||||
},
|
||||
"ST44": {
|
||||
"passenger": {
|
||||
"500000": 100,
|
||||
"800000": 80,
|
||||
"1200000": 60,
|
||||
"2000000": 40,
|
||||
"3000000": 20
|
||||
},
|
||||
"cargo": {
|
||||
"500000": 100,
|
||||
"800000": 80,
|
||||
"1200000": 60,
|
||||
"2000000": 40,
|
||||
"3000000": 20
|
||||
},
|
||||
"none": 100
|
||||
},
|
||||
"CTLR4C": {
|
||||
"passenger": {
|
||||
"500000": 100,
|
||||
"800000": 80,
|
||||
"1200000": 60,
|
||||
"2000000": 40,
|
||||
"3000000": 20
|
||||
},
|
||||
"cargo": {
|
||||
"500000": 100,
|
||||
"800000": 80,
|
||||
"1200000": 60,
|
||||
"2000000": 40,
|
||||
"3000000": 20
|
||||
},
|
||||
"none": 100
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
export const speedLimits: Record<string, any> = {
|
||||
EU07: {
|
||||
passenger: {
|
||||
'650000': 125
|
||||
},
|
||||
cargo: {
|
||||
'2000000': 70
|
||||
},
|
||||
none: 110
|
||||
},
|
||||
'4E': {
|
||||
passenger: {
|
||||
'650000': 125
|
||||
},
|
||||
cargo: {
|
||||
'2000000': 70
|
||||
},
|
||||
none: 110
|
||||
},
|
||||
EU07E: {
|
||||
passenger: {
|
||||
'650000': 125
|
||||
},
|
||||
cargo: {
|
||||
'2000000': 70
|
||||
},
|
||||
none: 110
|
||||
},
|
||||
EP07: {
|
||||
passenger: {
|
||||
'650000': 125
|
||||
},
|
||||
cargo: null,
|
||||
none: 110
|
||||
},
|
||||
EP08: {
|
||||
passenger: {
|
||||
'650000': 140
|
||||
},
|
||||
cargo: null,
|
||||
none: 110
|
||||
},
|
||||
EP09: {
|
||||
passenger: {
|
||||
'650000': 160
|
||||
},
|
||||
cargo: null,
|
||||
none: 160
|
||||
},
|
||||
ET22: {
|
||||
passenger: {
|
||||
'650000': 125
|
||||
},
|
||||
cargo: {
|
||||
'1200000': 100,
|
||||
'1800000': 90,
|
||||
'2500000': 80,
|
||||
'3100000': 70
|
||||
},
|
||||
none: 100
|
||||
},
|
||||
'201E': {
|
||||
passenger: {
|
||||
'650000': 125
|
||||
},
|
||||
cargo: {
|
||||
'1200000': 100,
|
||||
'3100000': 70
|
||||
},
|
||||
none: 125
|
||||
},
|
||||
ET41: {
|
||||
passenger: {
|
||||
'700000': 125
|
||||
},
|
||||
cargo: {
|
||||
'4000000': 70,
|
||||
'3500000': 80,
|
||||
'2500000': 90,
|
||||
'2000000': 100
|
||||
},
|
||||
none: 110
|
||||
},
|
||||
SM42: {
|
||||
passenger: {
|
||||
'95000': 90,
|
||||
'200000': 80,
|
||||
'300000': 70,
|
||||
'450000': 60,
|
||||
'750000': 50,
|
||||
'1130000': 40,
|
||||
'1720000': 30,
|
||||
'2400000': 20
|
||||
},
|
||||
cargo: {
|
||||
'95000': 90,
|
||||
'200000': 80,
|
||||
'300000': 70,
|
||||
'450000': 60,
|
||||
'750000': 50,
|
||||
'1130000': 40,
|
||||
'1720000': 30,
|
||||
'2400000': 20
|
||||
},
|
||||
none: 90
|
||||
},
|
||||
M62: {
|
||||
passenger: {
|
||||
'500000': 100,
|
||||
'800000': 80,
|
||||
'1200000': 60,
|
||||
'2000000': 40,
|
||||
'3000000': 20
|
||||
},
|
||||
cargo: {
|
||||
'500000': 100,
|
||||
'800000': 80,
|
||||
'1200000': 60,
|
||||
'2000000': 40,
|
||||
'3000000': 20
|
||||
},
|
||||
none: 100
|
||||
},
|
||||
ST44: {
|
||||
passenger: {
|
||||
'500000': 100,
|
||||
'800000': 80,
|
||||
'1200000': 60,
|
||||
'2000000': 40,
|
||||
'3000000': 20
|
||||
},
|
||||
cargo: {
|
||||
'500000': 100,
|
||||
'800000': 80,
|
||||
'1200000': 60,
|
||||
'2000000': 40,
|
||||
'3000000': 20
|
||||
},
|
||||
none: 100
|
||||
},
|
||||
CTLR4C: {
|
||||
passenger: {
|
||||
'500000': 100,
|
||||
'800000': 80,
|
||||
'1200000': 60,
|
||||
'2000000': 40,
|
||||
'3000000': 20
|
||||
},
|
||||
cargo: {
|
||||
'500000': 100,
|
||||
'800000': 80,
|
||||
'1200000': 60,
|
||||
'2000000': 40,
|
||||
'3000000': 20
|
||||
},
|
||||
none: 100
|
||||
}
|
||||
};
|
||||
+19
-10
@@ -271,7 +271,11 @@
|
||||
"minOneWayCatenary": "MIN. CATENARY SINGLE TRACK ROUTES",
|
||||
"minOneWay": "MIN. OTHER SINGLE TRACK ROUTES",
|
||||
"minTwoWayCatenary": "MIN. CATENARY DOUBLE TRACK ROUTES",
|
||||
"minTwoWay": "MIN. OTHER DOUBLE TRACK ROUTES"
|
||||
"minTwoWay": "MIN. OTHER DOUBLE TRACK ROUTES",
|
||||
"minOneWayCatenaryInt": "MIN. INTERNAL CATENARY SINGLE TRACK ROUTES",
|
||||
"minOneWayInt": "MIN. INTERNAL OTHER SINGLE TRACK ROUTES",
|
||||
"minTwoWayCatenaryInt": "MIN. INTERNAL CATENARY DOUBLE TRACK ROUTES",
|
||||
"minTwoWayInt": "MIN. INTERNAL OTHER DOUBLE TRACK ROUTES"
|
||||
},
|
||||
"sceneries-search": "SCENERY SEARCH:",
|
||||
"sceneries-placeholder": "Enter scenery name...",
|
||||
@@ -507,8 +511,10 @@
|
||||
"abbrev": "Station symbol:",
|
||||
"lines-title": "Real lines",
|
||||
"project-title": "Project name",
|
||||
"one-way-routes": "One way routes",
|
||||
"two-way-routes": "Two way routes",
|
||||
"additional-tools-title": "Additional tools",
|
||||
"one-way-routes": "Signle track routes",
|
||||
"two-way-routes": "Double track routes",
|
||||
"no-data": "No available data about this scenery",
|
||||
"option-active-timetables": "Active timetables",
|
||||
"option-timetables-history": "Timetables history PL1",
|
||||
"option-dispatchers-history": "Dispatchers history PL1",
|
||||
@@ -525,7 +531,9 @@
|
||||
"forum-topic": "Official {name} forum topic",
|
||||
"pragotron-link": "Timetable pallet board",
|
||||
"tablice-link": "Timetable summary board (by Thundo)",
|
||||
"bottom-info": "Show full history in the Journal tab"
|
||||
"bottom-info": "Show full history in the Journal tab",
|
||||
"btn-show-internal-routes": "Show internal routes",
|
||||
"btn-hide-internal-routes": "Hide internal routes"
|
||||
},
|
||||
"availability": {
|
||||
"title": "Availability",
|
||||
@@ -543,12 +551,13 @@
|
||||
"terminates": "TERMINATES\nHERE",
|
||||
"from": "FROM",
|
||||
"to": "TO",
|
||||
"desc-arriving": "The train is not here yet. It's going to come from: {prevStationName} (szlak {prevDepartureLine})",
|
||||
"desc-online": "The train is at the station. It's going to leave to: {nextStationName} (szlak {nextArrivalLine})",
|
||||
"desc-stopped": "The train is at the station and is stopped. It's going to leave towards: {nextStationName} (szlak {nextArrivalLine})",
|
||||
"desc-next-arrival": "Leaves towards: {nextStationName} (szlak {nextArrivalLine})",
|
||||
"desc-departed": "The train is at the station and it's been departed. Leaves towards: {nextStationName} (szlak {nextArrivalLine})",
|
||||
"desc-departed-away": "The train has been departed to: {nextStationName} (szlak {nextArrivalLine})",
|
||||
"desc-arriving": "The train is not here yet.\nIt's going to come from: <b>{prevStationName} (route {prevDepartureLine})</b>",
|
||||
"desc-online": "The train is at the station.\nIt's going to leave to: <b>{nextStationName} (route {nextArrivalLine})</b>",
|
||||
"desc-stopped": "The train is at the station and is stopped.\nIt's going to leave towards: <b>{nextStationName} (route {nextArrivalLine})</b>",
|
||||
"desc-next-arrival": "Leaves towards: <b>{nextStationName} (route {nextArrivalLine})</b>",
|
||||
"desc-departed": "The train is at the station and it's been departed.\nLeaves towards: <b>{nextStationName} (route {nextArrivalLine})</b>",
|
||||
"desc-departed-ends": "The train is at the station and it's been departed.\nLeaves towards station: <b>{nextStationName}</b>",
|
||||
"desc-departed-away": "The train has been departed to:\n<b>{nextStationName} (route {nextArrivalLine})</b>",
|
||||
"desc-end": "The train terminates here",
|
||||
"desc-terminated": "The train has been terminated"
|
||||
},
|
||||
|
||||
+17
-8
@@ -269,7 +269,11 @@
|
||||
"minOneWayCatenary": "SZLAKI JEDNOTOROWE ZELEKTR. (MINIMUM)",
|
||||
"minOneWay": "SZLAKI JEDNOTOROWE NIEZELEKTR. (MINIMUM)",
|
||||
"minTwoWayCatenary": "SZLAKI DWUTOROWE ZELEKTR. (MINIMUM)",
|
||||
"minTwoWay": "SZLAKI DWUTOROWE NIEZELEKTR. (MINIMUM)"
|
||||
"minTwoWay": "SZLAKI DWUTOROWE NIEZELEKTR. (MINIMUM)",
|
||||
"minOneWayCatenaryInt": "SZLAKI JEDNOTOROWE ZELEKTR. WEWNĘTRZNE (MINIMUM)",
|
||||
"minOneWayInt": "SZLAKI JEDNOTOROWE NIEZELEKTR. WEWNĘTRZNE (MINIMUM)",
|
||||
"minTwoWayCatenaryInt": "SZLAKI DWUTOROWE ZELEKTR. WEWNĘTRZNE (MINIMUM)",
|
||||
"minTwoWayInt": "SZLAKI DWUTOROWE NIEZELEKTR. WEWNĘTRZNE (MINIMUM)"
|
||||
},
|
||||
"sceneries-search": "WYSZUKAJ SCENERIĘ:",
|
||||
"sceneries-placeholder": "Wpisz nazwę scenerii...",
|
||||
@@ -493,8 +497,10 @@
|
||||
"abbrev": "Skrót posterunku:",
|
||||
"lines-title": "Rzeczywiste linie",
|
||||
"project-title": "Projekt",
|
||||
"additional-tools-title": "Dodatkowe narzędzia",
|
||||
"one-way-routes": "Szlaki jednotorowe",
|
||||
"two-way-routes": "Szlaki dwutorowe",
|
||||
"no-data": "Brak informacji o tej scenerii",
|
||||
"option-active-timetables": "Aktywne rozkłady jazdy",
|
||||
"option-timetables-history": "Historia rozkładów PL1",
|
||||
"option-dispatchers-history": "Historia dyżurów PL1",
|
||||
@@ -511,7 +517,9 @@
|
||||
"forum-topic": "Oficjalny wątek scenerii {name}",
|
||||
"pragotron-link": "Paletowa tablica informacyjna",
|
||||
"tablice-link": "Tablica informacyjna zbiorcza (autorstwa Thundo)",
|
||||
"bottom-info": "Pokaż pełną historię w zakładce Dziennika"
|
||||
"bottom-info": "Pokaż pełną historię w zakładce Dziennika",
|
||||
"btn-show-internal-routes": "Pokazuj szlaki wewnętrzne",
|
||||
"btn-hide-internal-routes": "Ukrywaj szlaki wewnętrzne"
|
||||
},
|
||||
"availability": {
|
||||
"title": "Dostępność",
|
||||
@@ -529,12 +537,13 @@
|
||||
"terminates": "KOŃCZY BIEG",
|
||||
"from": "Z",
|
||||
"to": "DO",
|
||||
"desc-arriving": "Pociągu nie ma jeszcze na tej scenerii. Przyjedzie z: {prevStationName} (szlak {prevDepartureLine})",
|
||||
"desc-online": "Pociąg jest na tej scenerii. Odjedzie do: {nextStationName} (szlak {nextArrivalLine})",
|
||||
"desc-stopped": "Pociąg jest na tej scenerii i odbywa postój. Odjedzie do: {nextStationName} (szlak {nextArrivalLine})",
|
||||
"desc-next-arrival": "Odjeżdża do: {nextStationName} (szlak {nextArrivalLine})",
|
||||
"desc-departed": "Pociąg jest na tej scenerii i został odprawiony. Odjeżdża do: {nextStationName} (szlak {nextArrivalLine})",
|
||||
"desc-departed-away": "Pociąg został odprawiony i odjechał do: {nextStationName} (szlak {nextArrivalLine})",
|
||||
"desc-arriving": "Pociągu nie ma jeszcze na tej scenerii.\nPrzyjedzie z: <b>{prevStationName} (szlak {prevDepartureLine})</b>",
|
||||
"desc-online": "Pociąg jest na tej scenerii.\nOdjedzie w kierunku: <b>{nextStationName} (szlak {nextArrivalLine})</b>",
|
||||
"desc-stopped": "Pociąg jest na tej scenerii i odbywa postój.\nOdjedzie w kierunku: <b>{nextStationName} (szlak {nextArrivalLine})</b>",
|
||||
"desc-next-arrival": "Odjeżdża do:\n<b>{nextStationName} (szlak {nextArrivalLine})</b>",
|
||||
"desc-departed": "Pociąg jest na tej scenerii i został odprawiony.\nOdjeżdża w kierunku: <b>{nextStationName} (szlak {nextArrivalLine})</b>",
|
||||
"desc-departed-ends": "Pociąg jest na tej scenerii i został odprawiony.\nOdjechał w kierunku stacji: <b>{nextStationName}</b>",
|
||||
"desc-departed-away": "Pociąg został odprawiony i odjechał do:\n<b>{nextStationName} (szlak {nextArrivalLine})</b>",
|
||||
"desc-end": "Pociąg kończy bieg",
|
||||
"desc-terminated": "Pociąg skończył bieg"
|
||||
},
|
||||
|
||||
@@ -59,22 +59,29 @@ export const initFilters = {
|
||||
onlineFromHours: 0,
|
||||
minLevel: 0,
|
||||
maxLevel: 20,
|
||||
minOneWayCatenary: 0,
|
||||
minOneWay: 0,
|
||||
minOneWayCatenary: 0,
|
||||
minTwoWayCatenary: 0,
|
||||
minTwoWay: 0,
|
||||
minOneWayInt: 0,
|
||||
minOneWayCatenaryInt: 0,
|
||||
minTwoWayCatenaryInt: 0,
|
||||
// minTwoWay: 0,
|
||||
authors: ''
|
||||
};
|
||||
|
||||
export const initSliders = [
|
||||
export const sliderStates = [
|
||||
{ id: 'maxVmax', minRange: 0, maxRange: 200, step: 10 },
|
||||
{ id: 'minVmax', minRange: 0, maxRange: 200, step: 10 },
|
||||
{ id: 'minLevel', minRange: 0, maxRange: 20, step: 1 },
|
||||
{ id: 'maxLevel', minRange: 0, maxRange: 20, step: 1 },
|
||||
{ id: 'minOneWayCatenary', minRange: 0, maxRange: 5, step: 1 },
|
||||
{ id: 'minOneWay', minRange: 0, maxRange: 5, step: 1 },
|
||||
{ id: 'minOneWayCatenary', minRange: 0, maxRange: 5, step: 1 },
|
||||
{ id: 'minTwoWayCatenary', minRange: 0, maxRange: 5, step: 1 },
|
||||
{ id: 'minTwoWay', minRange: 0, maxRange: 5, step: 1 }
|
||||
{ id: 'minOneWayInt', minRange: 0, maxRange: 5, step: 1 },
|
||||
{ id: 'minOneWayCatenaryInt', minRange: 0, maxRange: 5, step: 1 },
|
||||
{ id: 'minTwoWayCatenaryInt', minRange: 0, maxRange: 5, step: 1 },
|
||||
// { id: 'minTwoWay', minRange: 0, maxRange: 5, step: 1 },
|
||||
// { id: 'minTwoWayInt', minRange: 0, maxRange: 5, step: 1 }
|
||||
];
|
||||
|
||||
export type StationFilter = keyof typeof initFilters;
|
||||
@@ -109,7 +116,7 @@ export function setupFilters(currentFilters: Record<string, any>) {
|
||||
});
|
||||
}
|
||||
|
||||
export function getChangedFilters(currentFilters: Record<string, any>): string[] {
|
||||
export function getChangedFilters(currentFilters: Record<string, any>): string[] {
|
||||
return (
|
||||
Object.keys(currentFilters).filter(
|
||||
(filterKey) =>
|
||||
|
||||
@@ -42,8 +42,13 @@ export const useMainStore = defineStore('mainStore', {
|
||||
checkpointsTrains.clear();
|
||||
sceneriesTrains.clear();
|
||||
|
||||
return (apiStore.activeData?.trains ?? [])
|
||||
.filter((train) => train.timetable || train.lastSeen >= Date.now() - 60000)
|
||||
const dateNow = new Date();
|
||||
|
||||
const x = (apiStore.activeData?.trains ?? [])
|
||||
.filter(
|
||||
(train) =>
|
||||
train.timetable || train.lastSeen >= dateNow.getTime() - 60000 || train.online == 1
|
||||
)
|
||||
.map((train) => {
|
||||
const stock = train.stockString.split(';');
|
||||
const locoType = stock ? stock[0] : train.stockString;
|
||||
@@ -163,6 +168,8 @@ export const useMainStore = defineStore('mainStore', {
|
||||
|
||||
return trainObj;
|
||||
});
|
||||
|
||||
return x;
|
||||
},
|
||||
|
||||
// computed active sceneries
|
||||
|
||||
@@ -7,7 +7,8 @@ export const tooltipKeys = [
|
||||
'BaseTooltip',
|
||||
'VehiclePreviewTooltip',
|
||||
'SpawnsTooltip',
|
||||
'UsersTooltip'
|
||||
'UsersTooltip',
|
||||
'HtmlTooltip'
|
||||
] as const;
|
||||
|
||||
export type TooltipType = (typeof tooltipKeys)[number];
|
||||
|
||||
Reference in New Issue
Block a user