Dodano support przy kliknięciu scenerii offline.

This commit is contained in:
2020-12-02 21:28:52 +01:00
parent a072e6d42e
commit 555384aaec
2 changed files with 10 additions and 5 deletions
+9 -5
View File
@@ -202,12 +202,16 @@ export default class StationTable extends styleMixin {
@Prop() readonly changeSorter!: () => void;
setScenery(sceneryHash: string) {
if (
this.stations.findIndex(
(station) => station.stationHash === sceneryHash && station.online
) == -1
)
const station = this.stations.find(
(station) => station.stationHash === sceneryHash
);
if (!station) return;
if (!station.online) {
location.href = station.stationURL;
return;
}
this.$router.push({ name: "SceneryView", query: { hash: sceneryHash } });
}