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)) {