mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18: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 } });
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import ScheduledTrain from './ScheduledTrain';
|
||||
export default interface Station {
|
||||
stationName: string;
|
||||
stationHash: string;
|
||||
stationURL: string;
|
||||
|
||||
maxUsers: number;
|
||||
currentUsers: number;
|
||||
|
||||
Reference in New Issue
Block a user