mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
Dodano support przy kliknięciu scenerii offline.
This commit is contained in:
@@ -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 } });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user