mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 21:38:13 +00:00
Zmiany w wyświetlaniu trasy pocągu, poprawki w wyglądzie tabel
This commit is contained in:
@@ -14,8 +14,12 @@
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
class="stop-line arrival"
|
class="stop-line arrival"
|
||||||
v-if="i > 0 && followingStops[i - 1].departureLine != stop.arrivalLine"
|
v-if="
|
||||||
>{{ stop.arrivalLine }}</div>
|
i > 0 && followingStops[i - 1].departureLine != stop.arrivalLine
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ stop.arrivalLine }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<span class="stop-info">
|
<span class="stop-info">
|
||||||
<div class="info-indicator"></div>
|
<div class="info-indicator"></div>
|
||||||
@@ -25,20 +29,35 @@
|
|||||||
<span
|
<span
|
||||||
class="date-arrival"
|
class="date-arrival"
|
||||||
v-if="!stop.beginsHere"
|
v-if="!stop.beginsHere"
|
||||||
:class="{delayed: stop.arrivalDelay > 0, preponed: stop.arrivalDelay < 0}"
|
:class="{
|
||||||
>p. {{stylizeTime(stop.arrivalRealTimeString, stop.arrivalDelay)}}</span>
|
delayed: stop.arrivalDelay > 0,
|
||||||
|
preponed: stop.arrivalDelay < 0,
|
||||||
|
}"
|
||||||
|
>p.
|
||||||
|
{{
|
||||||
|
stylizeTime(stop.arrivalRealTimeString, stop.arrivalDelay)
|
||||||
|
}}</span
|
||||||
|
>
|
||||||
|
|
||||||
<span
|
<span
|
||||||
class="date-stop"
|
class="date-stop"
|
||||||
v-if="stop.stopTime"
|
v-if="stop.stopTime"
|
||||||
:class="stop.stopType.replace(', ', '-')"
|
:class="stop.stopType.replace(', ', '-')"
|
||||||
>{{ stop.stopTime }} {{ stop.stopType }}</span>
|
>{{ stop.stopTime }} {{ stop.stopType }}</span
|
||||||
|
>
|
||||||
|
|
||||||
<span
|
<span
|
||||||
class="date-departure"
|
class="date-departure"
|
||||||
v-if="!stop.terminatesHere && stop.stopTime != 0"
|
v-if="!stop.terminatesHere && stop.stopTime != 0"
|
||||||
:class="{delayed: stop.departureDelay > 0, preponed: stop.departureDelay < 0}"
|
:class="{
|
||||||
>o. {{ stylizeTime(stop.departureRealTimeString, stop.departureDelay) }}</span>
|
delayed: stop.departureDelay > 0,
|
||||||
|
preponed: stop.departureDelay < 0,
|
||||||
|
}"
|
||||||
|
>o.
|
||||||
|
{{
|
||||||
|
stylizeTime(stop.departureRealTimeString, stop.departureDelay)
|
||||||
|
}}</span
|
||||||
|
>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@@ -185,7 +204,8 @@ li.schedule-item > .stop-info {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.pt,
|
&.pt,
|
||||||
&.pm {
|
&.pm,
|
||||||
|
&.pt-pm {
|
||||||
background: #252525;
|
background: #252525;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -171,6 +171,7 @@ import Train from "@/scripts/interfaces/Train";
|
|||||||
import Station from "@/scripts/interfaces/Station";
|
import Station from "@/scripts/interfaces/Station";
|
||||||
|
|
||||||
import TrainSchedule from "@/components/TrainsView/TrainSchedule.vue";
|
import TrainSchedule from "@/components/TrainsView/TrainSchedule.vue";
|
||||||
|
import TrainStop from '@/scripts/interfaces/TrainStop';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: { TrainSchedule }
|
components: { TrainSchedule }
|
||||||
@@ -202,11 +203,10 @@ export default class TrainTable extends Vue {
|
|||||||
|
|
||||||
generateStopList(stops: any): string | undefined {
|
generateStopList(stops: any): string | undefined {
|
||||||
if (!stops) return "";
|
if (!stops) return "";
|
||||||
return stops.reduce((acc, stop, i) => {
|
return stops.reduce((acc, stop: TrainStop, i) => {
|
||||||
|
if (stop.stopType.includes("ph")) acc.push(`<strong style='color:${stop.confirmed ? "springgreen" : "white"}'>${stop.stopName}</strong>`);
|
||||||
if (stop.stopType.includes("ph")) acc.push(`<strong>${stop.stopName}</strong>`);
|
else if (i > 0 && i < stops.length - 1)
|
||||||
else if (i > 0 && i < stops.length - 1 && !stop.stopName.includes("po."))
|
acc.push(`<span style='color:${stop.confirmed ? "springgreen" : "lightgray"}'>${stop.stopName}</span>`);
|
||||||
acc.push(`<span style='color: #ccc;'>${stop.stopName.includes("podg.") ? stop.stopName.split(",")[0] : stop.stopName}</span>`);
|
|
||||||
return acc;
|
return acc;
|
||||||
}, []).join(" * ");
|
}, []).join(" * ");
|
||||||
}
|
}
|
||||||
@@ -360,6 +360,10 @@ export default class TrainTable extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.stats {
|
.stats {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-around;
|
||||||
|
|
||||||
&-main {
|
&-main {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 1.5em;
|
margin-bottom: 1.5em;
|
||||||
|
|||||||
+25
-1
@@ -264,7 +264,7 @@
|
|||||||
},
|
},
|
||||||
"default": true,
|
"default": true,
|
||||||
"nonPublic": false,
|
"nonPublic": false,
|
||||||
"stops": ["Głowno"]
|
"stops": ["Głowno, Domaniewice"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"stationName": "LCS Ozorków",
|
"stationName": "LCS Ozorków",
|
||||||
@@ -1933,5 +1933,29 @@
|
|||||||
},
|
},
|
||||||
"default": false,
|
"default": false,
|
||||||
"nonPublic": false
|
"nonPublic": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stationName": "Ciechany",
|
||||||
|
"stationURL": "https://td2.info.pl/w-trakcie-prac/ciechany/",
|
||||||
|
"stationLines": "",
|
||||||
|
"reqLevel": "3",
|
||||||
|
"supportersOnly": "NIE",
|
||||||
|
"signalType": "współczesna",
|
||||||
|
"controlType": "SCS",
|
||||||
|
"SBL": "",
|
||||||
|
"twoWayBlock": "",
|
||||||
|
"routes": {
|
||||||
|
"oneWay": {
|
||||||
|
"catenary": 1,
|
||||||
|
"noCatenary": 0
|
||||||
|
},
|
||||||
|
"twoWay": {
|
||||||
|
"catenary": 0,
|
||||||
|
"noCatenary": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default": false,
|
||||||
|
"nonPublic": false,
|
||||||
|
"stops": ["Pawonki"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ export default interface Station {
|
|||||||
driverName: string;
|
driverName: string;
|
||||||
driverId: number;
|
driverId: number;
|
||||||
currentStationName: string;
|
currentStationName: string;
|
||||||
|
currentStationHash: string;
|
||||||
category: string;
|
category: string;
|
||||||
stopInfo: TrainStop;
|
stopInfo: TrainStop;
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export default interface Train {
|
|||||||
trainNo: number;
|
trainNo: number;
|
||||||
driverName: string;
|
driverName: string;
|
||||||
currentStationName: string;
|
currentStationName: string;
|
||||||
|
currentStationHash: string;
|
||||||
locoURL: string;
|
locoURL: string;
|
||||||
locoType: string;
|
locoType: string;
|
||||||
online: boolean;
|
online: boolean;
|
||||||
|
|||||||
+5
-2
@@ -183,6 +183,7 @@ export default class Store extends VuexModule {
|
|||||||
driverName: train.driverName,
|
driverName: train.driverName,
|
||||||
driverId: train.driverId,
|
driverId: train.driverId,
|
||||||
currentStationName: train.currentStationName,
|
currentStationName: train.currentStationName,
|
||||||
|
currentStationHash: train.currentStationHash,
|
||||||
timetableId: trainInfo.timetableId,
|
timetableId: trainInfo.timetableId,
|
||||||
category: trainInfo.trainCategoryCode,
|
category: trainInfo.trainCategoryCode,
|
||||||
route: trainInfo.route,
|
route: trainInfo.route,
|
||||||
@@ -253,6 +254,7 @@ export default class Store extends VuexModule {
|
|||||||
driverId: train.driverId,
|
driverId: train.driverId,
|
||||||
driverName: train.driverName,
|
driverName: train.driverName,
|
||||||
currentStationName: train.station.stationName,
|
currentStationName: train.station.stationName,
|
||||||
|
currentStationHash: train.station.stationHash,
|
||||||
connectedTrack: train.dataSceneryConnection,
|
connectedTrack: train.dataSceneryConnection,
|
||||||
locoType,
|
locoType,
|
||||||
locoURL: getLocoURL(locoType),
|
locoURL: getLocoURL(locoType),
|
||||||
@@ -375,11 +377,11 @@ export default class Store extends VuexModule {
|
|||||||
? timetableData.followingStops.findIndex((stop: any) => {
|
? timetableData.followingStops.findIndex((stop: any) => {
|
||||||
const stationName = station.stationName.toLowerCase();
|
const stationName = station.stationName.toLowerCase();
|
||||||
const stopName = stop.stopNameRAW.toLowerCase();
|
const stopName = stop.stopNameRAW.toLowerCase();
|
||||||
|
//stationName.includes('lcs') &&
|
||||||
return (
|
return (
|
||||||
stationName.includes(stopName) ||
|
stationName.includes(stopName) ||
|
||||||
(stopName.includes('podg.') && stopName.split(', podg.')[0] && stationName.includes(stopName.split(', podg.')[0])) ||
|
(stopName.includes('podg.') && stopName.split(', podg.')[0] && stationName.includes(stopName.split(', podg.')[0])) ||
|
||||||
(stationName.includes('lcs') && JSONStationData.some(data => data.stationName.includes(station.stationName) && data.stops && data.stops.includes(stop.stopNameRAW)))
|
(JSONStationData.some(data => data.stationName.includes(station.stationName) && data.stops && data.stops.includes(stop.stopNameRAW)))
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
: -1;
|
: -1;
|
||||||
@@ -401,6 +403,7 @@ export default class Store extends VuexModule {
|
|||||||
driverName: timetableData.driverName,
|
driverName: timetableData.driverName,
|
||||||
driverId: timetableData.driverId,
|
driverId: timetableData.driverId,
|
||||||
currentStationName: timetableData.currentStationName,
|
currentStationName: timetableData.currentStationName,
|
||||||
|
currentStationHash: timetableData.currentStationHash,
|
||||||
category: timetableData.category,
|
category: timetableData.category,
|
||||||
stopInfo,
|
stopInfo,
|
||||||
stopLabel,
|
stopLabel,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
$no-timetable: #aaa;
|
$no-timetable: #aaa;
|
||||||
$departed: lime;
|
$departed: springgreen;
|
||||||
$stopped: #ffa600;
|
$stopped: #ffa600;
|
||||||
$online: gold;
|
$online: gold;
|
||||||
$terminated: red;
|
$terminated: red;
|
||||||
|
|||||||
Reference in New Issue
Block a user