From 755c729a9b34628e8c6b49f2475d3e575f9006fb Mon Sep 17 00:00:00 2001 From: Spythere Date: Mon, 12 Feb 2024 14:58:59 +0100 Subject: [PATCH] =?UTF-8?q?brakuj=C4=85ce=20t=C5=82umaczenia;=20poprawki?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/en.json | 7 ++++++- src/store/mainStore.ts | 4 ---- src/store/utils.ts | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index c918dd9..d3b0ec4 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -176,7 +176,8 @@ "signals": "SIGNALLING", "addons": "ADDITIONAL PROGRAMS", "blockades": "BLOCK SIGNALLING", - "status": "ONLINE STATUS" + "status": "ONLINE STATUS", + "timetables": "ACTIVE TIMETABLES" }, "all-available": "ALL AVAILABLE", @@ -219,6 +220,10 @@ "historical": "HISTORICAL", "free": "FREE", "occupied": "OCCUPIED", + + "withActiveTimetables": "ACTIVE", + "withoutActiveTimetables": "NO ACTIVE", + "sliders": { "min-lvl": "MIN. REQUIRED DISPATCHER LEVEL", "max-lvl": "MAX. REQUIRED DISPATCHER LEVEL", diff --git a/src/store/mainStore.ts b/src/store/mainStore.ts index c9d7fd6..ff7ca19 100644 --- a/src/store/mainStore.ts +++ b/src/store/mainStore.ts @@ -99,8 +99,6 @@ export const useMainStore = defineStore('store', { if (!apiStore.activeData?.activeSceneries) return []; - console.time('d'); - const offlineActiveSceneries = this.trainList.reduce((acc, train) => { if (!train.timetableData) return acc; @@ -223,8 +221,6 @@ export const useMainStore = defineStore('store', { }; } - console.timeEnd('d'); - return allActiveSceneries; }, diff --git a/src/store/utils.ts b/src/store/utils.ts index 7f29fcf..3b7535d 100644 --- a/src/store/utils.ts +++ b/src/store/utils.ts @@ -110,7 +110,7 @@ export function getCheckpointTrain( for (let i = trainStopIndex; i >= 0; i--) { const stop = followingStops[i]; - if (/strong|podg/g.test(stop.stopName) && !prevStationName && i <= trainStopIndex - 1) + if (/strong|podg\.|pe\./g.test(stop.stopName) && !prevStationName && i <= trainStopIndex - 1) prevStationName = stop.stopNameRAW.replace(/,.*/g, ''); if (stop.arrivalLine != null && !arrivingLine && !/-|_|it|sbl/gi.test(stop.arrivalLine)) { @@ -122,7 +122,7 @@ export function getCheckpointTrain( for (let i = trainStopIndex; i < followingStops.length; i++) { const stop = followingStops[i]; - if (/strong|podg/g.test(stop.stopName) && !nextStationName && i > trainStopIndex) + if (/strong|podg\.|pe\./g.test(stop.stopName) && !nextStationName && i > trainStopIndex) nextStationName = stop.stopNameRAW.replace(/,.*/g, ''); if (stop.departureLine && !departureLine && !/-|_|it|sbl/gi.test(stop.departureLine)) {