mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-04 22:08:12 +00:00
1.3.5->.6: aktualizacja scenerii, poprawki w filtrowaniu
This commit is contained in:
+2
-2
@@ -38,7 +38,7 @@
|
|||||||
<footer class="app_footer">
|
<footer class="app_footer">
|
||||||
©
|
©
|
||||||
<a href="https://td2.info.pl/profile/?u=20777" target="_blank">Spythere</a>
|
<a href="https://td2.info.pl/profile/?u=20777" target="_blank">Spythere</a>
|
||||||
2020-2021 | v{{VERSION}}
|
2021 | v{{VERSION}}
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -59,7 +59,7 @@ export default class App extends Vue {
|
|||||||
@Action("synchronizeData") synchronizeData;
|
@Action("synchronizeData") synchronizeData;
|
||||||
@Getter("getAllData") data;
|
@Getter("getAllData") data;
|
||||||
|
|
||||||
private VERSION = "1.3.5";
|
private VERSION = "1.3.6";
|
||||||
|
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.synchronizeData();
|
this.synchronizeData();
|
||||||
|
|||||||
@@ -197,5 +197,6 @@
|
|||||||
["Buskowo Zdrój", "https://td2.info.pl/scenerie/buskowo-zdroj/", "", null, "4", "NIE", "mieszana", "mechaniczne", "", "", 1, 0, 0, 0, null, null, false, false, false],
|
["Buskowo Zdrój", "https://td2.info.pl/scenerie/buskowo-zdroj/", "", null, "4", "NIE", "mieszana", "mechaniczne", "", "", 1, 0, 0, 0, null, null, false, false, false],
|
||||||
["Bełchów", "https://td2.info.pl/scenerie/belchow-projekt-lka/", "11", "ŁKA", "2", "NIE", "współczesna", "SPK", "", "TAK", 0, 0, 2, 0, null, null, false, false, false],
|
["Bełchów", "https://td2.info.pl/scenerie/belchow-projekt-lka/", "11", "ŁKA", "2", "NIE", "współczesna", "SPK", "", "TAK", 0, 0, 2, 0, null, null, false, false, false],
|
||||||
["Modlinków", "https://td2.info.pl/scenerie/podg-modlinkow/", "", null, "6", "NIE", "współczesna", "SPK", "", "TAK", 3, 0, 2, 0, null, null, false, false, false],
|
["Modlinków", "https://td2.info.pl/scenerie/podg-modlinkow/", "", null, "6", "NIE", "współczesna", "SPK", "", "TAK", 3, 0, 2, 0, null, null, false, false, false],
|
||||||
["Arkadia Zdrój 2019", "https://td2.info.pl/scenerie/arkadia-zdroj-2016/", "", null, "", "NIE", "współczesna", "SCS", "TAK (szlak wewn.)", "TAK", 1, 0, 2, 0, null, null, false, false, false]
|
["Arkadia Zdrój 2019", "https://td2.info.pl/scenerie/arkadia-zdroj-2016/", "", null, "", "NIE", "współczesna", "SCS", "TAK (szlak wewn.)", "TAK", 1, 0, 2, 0, null, null, false, false, false],
|
||||||
|
["Łaskarzew", "https://td2.info.pl/scenerie/laskarzew-6516/", "7", null, "0", "NIE", "współczesna", "SPK", "", "TAK", 0, 0, 2, 0, null, null, false, false, false]
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ export default class StationFilterManager {
|
|||||||
if (station.default && this.filters['default']) return false;
|
if (station.default && this.filters['default']) return false;
|
||||||
if (!station.default && this.filters['notDefault']) return false;
|
if (!station.default && this.filters['notDefault']) return false;
|
||||||
|
|
||||||
|
if (station.reqLevel == '-1') return true;
|
||||||
if (parseInt(station.reqLevel) < this.filters['minLevel']) return false;
|
if (parseInt(station.reqLevel) < this.filters['minLevel']) return false;
|
||||||
|
|
||||||
if (this.filters['no-1track'] && (station.routes.oneWay.catenary != 0 || station.routes.oneWay.noCatenary != 0)) return false;
|
if (this.filters['no-1track'] && (station.routes.oneWay.catenary != 0 || station.routes.oneWay.noCatenary != 0)) return false;
|
||||||
|
|||||||
+24
-17
@@ -412,13 +412,11 @@ export default class Store extends VuexModule {
|
|||||||
return acc;
|
return acc;
|
||||||
}, [] as Station[]);
|
}, [] as Station[]);
|
||||||
|
|
||||||
// Dodawanie do listy online potencjalnych scenerii niewpisanych do bazy
|
updatedStationList
|
||||||
updatedStationList.forEach(updatedStation => {
|
.filter(uStation => !this.stationList.some(station => uStation.stationName === station.stationName))
|
||||||
const alreadyInList: any = this.stationList.some(station => station.stationName === updatedStation.stationName);
|
.forEach(uStation => {
|
||||||
|
|
||||||
if (!alreadyInList) {
|
|
||||||
this.stationList.push({
|
this.stationList.push({
|
||||||
...updatedStation,
|
...uStation,
|
||||||
scheduledTrains: [],
|
scheduledTrains: [],
|
||||||
stationTrains: [],
|
stationTrains: [],
|
||||||
subStations: [],
|
subStations: [],
|
||||||
@@ -426,8 +424,26 @@ export default class Store extends VuexModule {
|
|||||||
reqLevel: '-1',
|
reqLevel: '-1',
|
||||||
nonPublic: true,
|
nonPublic: true,
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
});
|
|
||||||
|
// Dodawanie do listy online potencjalnych scenerii niewpisanych do bazy
|
||||||
|
// updatedStationList.forEach(updatedStation => {
|
||||||
|
// const alreadyInList: any = this.stationList.some(station => station.stationName === updatedStation.stationName);
|
||||||
|
|
||||||
|
// console.log(updatedStation, alreadyInList);
|
||||||
|
|
||||||
|
// if (!alreadyInList) {
|
||||||
|
// this.stationList.push({
|
||||||
|
// ...updatedStation,
|
||||||
|
// scheduledTrains: [],
|
||||||
|
// stationTrains: [],
|
||||||
|
// subStations: [],
|
||||||
|
// online: true,
|
||||||
|
// reqLevel: '-1',
|
||||||
|
// nonPublic: true,
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
this.stationCount = this.stationList.filter(station => station.online).length;
|
this.stationCount = this.stationList.filter(station => station.online).length;
|
||||||
this.dataConnectionStatus = Status.Loaded;
|
this.dataConnectionStatus = Status.Loaded;
|
||||||
@@ -574,15 +590,6 @@ export default class Store extends VuexModule {
|
|||||||
stopStatusID = 3;
|
stopStatusID = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// for (let i = stopInfoIndex; i < data.followingStops.length - 1; i++){
|
|
||||||
// const stop = data.followingStops[i];
|
|
||||||
|
|
||||||
// if (stop.mainStop && stop.stopType.includes("ph")) {
|
|
||||||
// nearestStop = stop.stopNameRAW;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
checkpoint.scheduledTrains.push({
|
checkpoint.scheduledTrains.push({
|
||||||
trainNo: data.trainNo,
|
trainNo: data.trainNo,
|
||||||
driverName: data.driverName,
|
driverName: data.driverName,
|
||||||
|
|||||||
Reference in New Issue
Block a user