mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 21:38:13 +00:00
Poprawki struktury projektu
This commit is contained in:
+5
-4
@@ -41,8 +41,8 @@ git <template>
|
|||||||
<Clock />
|
<Clock />
|
||||||
<div class="info_counter">
|
<div class="info_counter">
|
||||||
<img src="@/assets/icon-dispatcher.svg" alt="icon dispatcher" />
|
<img src="@/assets/icon-dispatcher.svg" alt="icon dispatcher" />
|
||||||
<span>{{ data.stationCount }}</span>
|
<span>{{ data.activeStationCount }}</span>
|
||||||
<span>{{ data.trainCount }}</span>
|
<span>{{ data.activeTrainCount }}</span>
|
||||||
<img src="@/assets/icon-train.svg" alt="icon train" />
|
<img src="@/assets/icon-train.svg" alt="icon train" />
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
@@ -89,14 +89,15 @@ import { Action, Getter } from "vuex-class";
|
|||||||
import UpdateModal from "@/components/Global/UpdateModal.vue";
|
import UpdateModal from "@/components/Global/UpdateModal.vue";
|
||||||
import Clock from "@/components/App/Clock.vue";
|
import Clock from "@/components/App/Clock.vue";
|
||||||
|
|
||||||
import StorageManager from "@/scripts/storageManager";
|
import StorageManager from "@/scripts/managers/storageManager";
|
||||||
|
import { StoreData } from "./scripts/interfaces/StoreData";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: { Clock, UpdateModal },
|
components: { Clock, UpdateModal },
|
||||||
})
|
})
|
||||||
export default class App extends Vue {
|
export default class App extends Vue {
|
||||||
@Action("synchronizeData") synchronizeData;
|
@Action("synchronizeData") synchronizeData;
|
||||||
@Getter("getAllData") data;
|
@Getter("getAllData") data!: StoreData;
|
||||||
|
|
||||||
private VERSION = "1.4.5";
|
private VERSION = "1.4.5";
|
||||||
|
|
||||||
|
|||||||
@@ -12,11 +12,16 @@
|
|||||||
|
|
||||||
<span v-else>{{ stationInfo.stationName }}</span>
|
<span v-else>{{ stationInfo.stationName }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="scenery-hash">#{{ stationInfo.stationHash }}</div>
|
<div class="scenery-hash" v-if="stationInfo.stationHash">
|
||||||
|
#{{ stationInfo.stationHash }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<section v-if="!timetableOnly">
|
<section v-if="!timetableOnly">
|
||||||
<div class="info-stats">
|
<div
|
||||||
|
class="info-stats"
|
||||||
|
:class="!stationInfo.stationHash ? 'no-stats' : ''"
|
||||||
|
>
|
||||||
<span class="likes">
|
<span class="likes">
|
||||||
<img :src="likeIcon" alt="icon-like" />
|
<img :src="likeIcon" alt="icon-like" />
|
||||||
<span>{{ stationInfo.dispatcherRate }}</span>
|
<span>{{ stationInfo.dispatcherRate }}</span>
|
||||||
@@ -106,7 +111,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="info-dispatcher">
|
<div class="info-dispatcher">
|
||||||
<div class="dispatcher">
|
<div class="dispatcher" v-if="stationInfo.stationHash">
|
||||||
<span
|
<span
|
||||||
class="dispatcher_level"
|
class="dispatcher_level"
|
||||||
:style="
|
:style="
|
||||||
@@ -124,12 +129,12 @@
|
|||||||
<span class="dispatcher_name">{{ stationInfo.dispatcherName }}</span>
|
<span class="dispatcher_name">{{ stationInfo.dispatcherName }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="status-badge" :class="stationInfo.statusID"
|
<span class="status-badge" :class="stationInfo.statusID">
|
||||||
>{{ $t(`status.${stationInfo.statusID}`) }}
|
{{ $t(`status.${stationInfo.statusID}`) }}
|
||||||
{{
|
{{
|
||||||
stationInfo.statusID == "online" ? stationInfo.statusTimeString : ""
|
stationInfo.statusID == "online" ? stationInfo.statusTimeString : ""
|
||||||
}}</span
|
}}
|
||||||
>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="info-lists">
|
<div class="info-lists">
|
||||||
@@ -276,6 +281,10 @@ h3 {
|
|||||||
|
|
||||||
font-size: 1.65em;
|
font-size: 1.65em;
|
||||||
|
|
||||||
|
&.no-stats {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
& > span {
|
& > span {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ import { Vue, Component, Prop } from "vue-property-decorator";
|
|||||||
|
|
||||||
import inputData from "@/data/options.json";
|
import inputData from "@/data/options.json";
|
||||||
|
|
||||||
import StorageManager from "@/scripts/storageManager";
|
import StorageManager from "@/scripts/managers/storageManager";
|
||||||
import ActionButton from "../Global/ActionButton.vue";
|
import ActionButton from "../Global/ActionButton.vue";
|
||||||
|
|
||||||
@Component({ components: { ActionButton } })
|
@Component({ components: { ActionButton } })
|
||||||
|
|||||||
@@ -281,14 +281,9 @@ export default class StationTable extends styleMixin {
|
|||||||
|
|
||||||
if (!station) return;
|
if (!station) return;
|
||||||
|
|
||||||
if (!station.online) {
|
|
||||||
window.location.href = station.stationURL;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "SceneryView",
|
name: "SceneryView",
|
||||||
query: { hash: station.stationHash },
|
query: { station: station.stationName.replaceAll(" ", "_") },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -118,7 +118,7 @@
|
|||||||
"no-timetables": "No active timetables!",
|
"no-timetables": "No active timetables!",
|
||||||
"no-users": "NO ACTIVE PLAYERS",
|
"no-users": "NO ACTIVE PLAYERS",
|
||||||
"no-spawns": "NO OPEN SPAWNS",
|
"no-spawns": "NO OPEN SPAWNS",
|
||||||
"no-scenery": "Oops! This scenery doesn't exist or is offline!",
|
"no-scenery": "Oops! This scenery doesn't exist!",
|
||||||
"return-btn": "Return to main site"
|
"return-btn": "Return to main site"
|
||||||
},
|
},
|
||||||
"timetables": {
|
"timetables": {
|
||||||
|
|||||||
+1
-1
@@ -118,7 +118,7 @@
|
|||||||
"no-timetables": "Brak aktywnych rozkładów!",
|
"no-timetables": "Brak aktywnych rozkładów!",
|
||||||
"no-users": "BRAK AKTYWNYCH GRACZY",
|
"no-users": "BRAK AKTYWNYCH GRACZY",
|
||||||
"no-spawns": "BRAK OTWARTYCH SPAWNÓW",
|
"no-spawns": "BRAK OTWARTYCH SPAWNÓW",
|
||||||
"no-scenery": "Ups! Nie znaleziono danej stacji bądź jest ona offline!",
|
"no-scenery": "Ups! Ta sceneria nie istnieje!",
|
||||||
"return-btn": "Wróć na stronę główną"
|
"return-btn": "Wróć na stronę główną"
|
||||||
},
|
},
|
||||||
"timetables": {
|
"timetables": {
|
||||||
|
|||||||
+20
-20
@@ -1,40 +1,40 @@
|
|||||||
import Vue from 'vue';
|
import Vue from "vue";
|
||||||
import VueRouter, { RouteConfig } from 'vue-router';
|
import VueRouter, { RouteConfig } from "vue-router";
|
||||||
|
|
||||||
import StationsView from '../views/StationsView.vue';
|
import StationsView from "../views/StationsView.vue";
|
||||||
import TrainsView from '../views/TrainsView.vue';
|
import TrainsView from "../views/TrainsView.vue";
|
||||||
|
|
||||||
Vue.use(VueRouter);
|
Vue.use(VueRouter);
|
||||||
|
|
||||||
const routes: Array<RouteConfig> = [
|
const routes: Array<RouteConfig> = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: "/",
|
||||||
name: 'StationsView',
|
name: "StationsView",
|
||||||
component: StationsView,
|
component: StationsView
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/trains',
|
path: "/trains",
|
||||||
name: 'TrainsView',
|
name: "TrainsView",
|
||||||
component: TrainsView,
|
component: TrainsView,
|
||||||
props: true,
|
props: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/scenery',
|
path: "/scenery",
|
||||||
name: 'SceneryView',
|
name: "SceneryView",
|
||||||
component: () => import('@/views/SceneryView.vue'),
|
component: () => import("@/views/SceneryView.vue"),
|
||||||
props: true,
|
props: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/history',
|
path: "/history",
|
||||||
name: 'HistoryView',
|
name: "HistoryView",
|
||||||
component: () => import('@/views/HistoryView.vue'),
|
component: () => import("@/views/HistoryView.vue")
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
const router = new VueRouter({
|
const router = new VueRouter({
|
||||||
mode: 'history',
|
mode: "history",
|
||||||
base: process.env.BASE_URL,
|
base: process.env.BASE_URL,
|
||||||
routes,
|
routes
|
||||||
});
|
});
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
const enum DataStatus {
|
||||||
|
Initialized = -1,
|
||||||
|
Loading = 0,
|
||||||
|
Error = 1,
|
||||||
|
Loaded = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
export default DataStatus;
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
import DataStatus from "../enums/DataStatus";
|
||||||
|
import Station from "./Station";
|
||||||
|
import Train from "./Train";
|
||||||
|
|
||||||
|
export interface StoreData {
|
||||||
|
stationList: Station[];
|
||||||
|
trainList: Train[];
|
||||||
|
|
||||||
|
activeTrainCount: number;
|
||||||
|
activeStationCount: number;
|
||||||
|
|
||||||
|
dataConnectionStatus: DataStatus;
|
||||||
|
timetableDataStatus: DataStatus;
|
||||||
|
}
|
||||||
+17
-20
@@ -8,13 +8,8 @@ import Train from "@/scripts/interfaces/Train";
|
|||||||
import TrainStop from "@/scripts/interfaces/TrainStop";
|
import TrainStop from "@/scripts/interfaces/TrainStop";
|
||||||
|
|
||||||
import utils from "@/scripts/utils/storeUtils";
|
import utils from "@/scripts/utils/storeUtils";
|
||||||
|
import DataStatus from "@/scripts/enums/DataStatus";
|
||||||
enum Status {
|
import { StoreData } from "@/scripts/interfaces/StoreData";
|
||||||
Initialized = -1,
|
|
||||||
Loading = 0,
|
|
||||||
Error = 1,
|
|
||||||
Loaded = 2
|
|
||||||
}
|
|
||||||
|
|
||||||
interface TimetableData {
|
interface TimetableData {
|
||||||
trainNo: number;
|
trainNo: number;
|
||||||
@@ -62,20 +57,22 @@ export default class Store extends VuexModule {
|
|||||||
private trainCount: number = 0;
|
private trainCount: number = 0;
|
||||||
private stationCount: number = 0;
|
private stationCount: number = 0;
|
||||||
|
|
||||||
private dataConnectionStatus: Status = Status.Loading;
|
private dataConnectionStatus: DataStatus = DataStatus.Loading;
|
||||||
private sceneryDataStatus: Status = Status.Loading;
|
private sceneryDataStatus: DataStatus = DataStatus.Loading;
|
||||||
private timetableLoaded: Status = Status.Loading;
|
private timetableLoaded: DataStatus = DataStatus.Loading;
|
||||||
|
|
||||||
private stationList: Station[] = [];
|
private stationList: Station[] = [];
|
||||||
private trainList: Train[] = [];
|
private trainList: Train[] = [];
|
||||||
|
|
||||||
//GETTERS
|
//GETTERS
|
||||||
get getAllData() {
|
get getAllData(): StoreData {
|
||||||
return {
|
return {
|
||||||
stationList: this.stationList,
|
stationList: this.stationList,
|
||||||
trainList: this.trainList,
|
trainList: this.trainList,
|
||||||
trainCount: this.trainCount,
|
|
||||||
stationCount: this.stationCount,
|
activeTrainCount: this.trainCount,
|
||||||
|
activeStationCount: this.stationCount,
|
||||||
|
|
||||||
dataConnectionStatus: this.dataConnectionStatus,
|
dataConnectionStatus: this.dataConnectionStatus,
|
||||||
timetableDataStatus: this.timetableLoaded
|
timetableDataStatus: this.timetableLoaded
|
||||||
};
|
};
|
||||||
@@ -104,7 +101,7 @@ export default class Store extends VuexModule {
|
|||||||
@Action
|
@Action
|
||||||
async synchronizeData() {
|
async synchronizeData() {
|
||||||
this.context.commit("setSceneryData");
|
this.context.commit("setSceneryData");
|
||||||
this.context.commit("setSceneryDataStatus", Status.Loaded);
|
this.context.commit("setSceneryDataStatus", DataStatus.Loaded);
|
||||||
|
|
||||||
this.context.dispatch("fetchOnlineData");
|
this.context.dispatch("fetchOnlineData");
|
||||||
setInterval(() => this.context.dispatch("fetchOnlineData"), 20000);
|
setInterval(() => this.context.dispatch("fetchOnlineData"), 20000);
|
||||||
@@ -249,18 +246,18 @@ export default class Store extends VuexModule {
|
|||||||
this.context.dispatch("fetchTimetableData");
|
this.context.dispatch("fetchTimetableData");
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
this.context.commit("setDataConnectionStatus", Status.Error);
|
this.context.commit("setDataConnectionStatus", DataStatus.Error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//MUTATIONS
|
//MUTATIONS
|
||||||
@Mutation
|
@Mutation
|
||||||
private setDataConnectionStatus(status: Status) {
|
private setDataConnectionStatus(status: DataStatus) {
|
||||||
this.dataConnectionStatus = status;
|
this.dataConnectionStatus = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mutation
|
@Mutation
|
||||||
private setSceneryDataStatus(status: Status) {
|
private setSceneryDataStatus(status: DataStatus) {
|
||||||
this.sceneryDataStatus = status;
|
this.sceneryDataStatus = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -385,7 +382,7 @@ export default class Store extends VuexModule {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.stationCount = this.stationList.filter(station => station.online).length;
|
this.stationCount = this.stationList.filter(station => station.online).length;
|
||||||
this.dataConnectionStatus = Status.Loaded;
|
this.dataConnectionStatus = DataStatus.Loaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mutation
|
@Mutation
|
||||||
@@ -400,7 +397,7 @@ export default class Store extends VuexModule {
|
|||||||
}, [] as Train[]);
|
}, [] as Train[]);
|
||||||
|
|
||||||
this.trainCount = this.trainList.filter(train => train.online).length;
|
this.trainCount = this.trainList.filter(train => train.online).length;
|
||||||
this.dataConnectionStatus = Status.Loaded;
|
this.dataConnectionStatus = DataStatus.Loaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mutation
|
@Mutation
|
||||||
@@ -495,6 +492,6 @@ export default class Store extends VuexModule {
|
|||||||
return acc;
|
return acc;
|
||||||
}, [] as Train[]);
|
}, [] as Train[]);
|
||||||
|
|
||||||
this.timetableLoaded = Status.Loaded;
|
this.timetableLoaded = DataStatus.Loaded;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-19
@@ -2,12 +2,13 @@
|
|||||||
<div class="scenery-view">
|
<div class="scenery-view">
|
||||||
<div
|
<div
|
||||||
class="scenery-offline"
|
class="scenery-offline"
|
||||||
v-if="!stationInfo && dataStatus == 2 && currentPath === '/scenery'"
|
v-if="!stationInfo && isDataLoaded && isComponentVisible"
|
||||||
>
|
>
|
||||||
{{ $t("scenery.no-scenery") }}
|
{{ $t("scenery.no-scenery") }}
|
||||||
<button class="button">
|
|
||||||
|
<action-button>
|
||||||
<router-link to="/">{{ $t("scenery.return-btn") }}</router-link>
|
<router-link to="/">{{ $t("scenery.return-btn") }}</router-link>
|
||||||
</button>
|
</action-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="scenery-wrapper" v-if="stationInfo">
|
<div class="scenery-wrapper" v-if="stationInfo">
|
||||||
@@ -16,7 +17,7 @@
|
|||||||
<SceneryTimetable
|
<SceneryTimetable
|
||||||
:stationInfo="stationInfo"
|
:stationInfo="stationInfo"
|
||||||
:timetableOnly="timetableOnly"
|
:timetableOnly="timetableOnly"
|
||||||
:dataStatus="timetableDataStatus"
|
:dataStatus="data.timetableDataStatus"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -31,14 +32,15 @@ import Station from "@/scripts/interfaces/Station";
|
|||||||
|
|
||||||
import SceneryInfo from "@/components/SceneryView/SceneryInfo.vue";
|
import SceneryInfo from "@/components/SceneryView/SceneryInfo.vue";
|
||||||
import SceneryTimetable from "@/components/SceneryView/SceneryTimetable.vue";
|
import SceneryTimetable from "@/components/SceneryView/SceneryTimetable.vue";
|
||||||
|
import { StoreData } from "@/scripts/interfaces/StoreData";
|
||||||
|
import DataStatus from "@/scripts/enums/DataStatus";
|
||||||
|
import ActionButton from "@/components/Global/ActionButton.vue";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: { SceneryInfo, SceneryTimetable },
|
components: { SceneryInfo, SceneryTimetable, ActionButton },
|
||||||
})
|
})
|
||||||
export default class SceneryView extends Vue {
|
export default class SceneryView extends Vue {
|
||||||
@Getter("getStationList") storeStationList!: Station[];
|
@Getter("getAllData") data!: StoreData;
|
||||||
@Getter("getTimetableDataStatus") timetableDataStatus!: number;
|
|
||||||
@Getter("getDataStatus") dataStatus!: number;
|
|
||||||
|
|
||||||
timetableOnly: boolean = false;
|
timetableOnly: boolean = false;
|
||||||
|
|
||||||
@@ -47,19 +49,22 @@ export default class SceneryView extends Vue {
|
|||||||
this.$route.query["timetable_only"] == "1" ? true : false;
|
this.$route.query["timetable_only"] == "1" ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
get currentPath() {
|
get isComponentVisible() {
|
||||||
return this.$route.path;
|
return this.$route.path === "/scenery";
|
||||||
}
|
}
|
||||||
|
|
||||||
get stationInfo(): Station | null {
|
get isDataLoaded() {
|
||||||
if (!this.$route.query.hash || !this.storeStationList) return null;
|
return this.data.dataConnectionStatus == DataStatus.Loaded;
|
||||||
|
}
|
||||||
|
|
||||||
const info =
|
get stationInfo(): Station | undefined {
|
||||||
this.storeStationList.find(
|
if (!this.$route.query.station) return;
|
||||||
(station) => station.stationHash === this.$route.query.hash.toString()
|
|
||||||
) || null;
|
|
||||||
|
|
||||||
return info;
|
return this.data.stationList.find(
|
||||||
|
(station) =>
|
||||||
|
station.stationName ===
|
||||||
|
this.$route.query.station.toString().replaceAll("_", " ")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -89,9 +94,8 @@ $sceneryBgCol: #333;
|
|||||||
|
|
||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
|
|
||||||
.button {
|
button {
|
||||||
margin: 1em auto;
|
margin: 1em auto;
|
||||||
font-size: 0.85em;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,12 +59,13 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Vue, Component } from "vue-property-decorator";
|
import { Vue, Component } from "vue-property-decorator";
|
||||||
|
|
||||||
import { Getter } from "vuex-class";
|
import { Getter } from "vuex-class";
|
||||||
|
|
||||||
import Station from "@/scripts/interfaces/Station";
|
import Station from "@/scripts/interfaces/Station";
|
||||||
|
|
||||||
import StorageManager from "@/scripts/storageManager";
|
import StorageManager from "@/scripts/managers/storageManager";
|
||||||
import StationFilterManager from "@/scripts/stationFilterManager";
|
import StationFilterManager from "@/scripts/managers/stationFilterManager";
|
||||||
|
|
||||||
import inputData from "@/data/options.json";
|
import inputData from "@/data/options.json";
|
||||||
|
|
||||||
@@ -72,6 +73,8 @@ import StationTable from "@/components/StationsView/StationTable.vue";
|
|||||||
import FilterCard from "@/components/StationsView/FilterCard.vue";
|
import FilterCard from "@/components/StationsView/FilterCard.vue";
|
||||||
import DonationModal from "@/components/Global/DonationModal.vue";
|
import DonationModal from "@/components/Global/DonationModal.vue";
|
||||||
import ActionButton from "@/components/Global/ActionButton.vue";
|
import ActionButton from "@/components/Global/ActionButton.vue";
|
||||||
|
import { StoreData } from "@/scripts/interfaces/StoreData";
|
||||||
|
import DataStatus from "@/scripts/enums/DataStatus";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: {
|
components: {
|
||||||
@@ -98,18 +101,18 @@ export default class StationsView extends Vue {
|
|||||||
inputs = inputData;
|
inputs = inputData;
|
||||||
|
|
||||||
@Getter("getStationList") stationList!: Station[];
|
@Getter("getStationList") stationList!: Station[];
|
||||||
@Getter("getAllData") data;
|
@Getter("getAllData") data!: StoreData;
|
||||||
|
|
||||||
get dataStatusClass() {
|
get dataStatusClass() {
|
||||||
if (this.data.dataConnectionStatus == 0) return "loading";
|
if (this.data.dataConnectionStatus == DataStatus.Loading) return "loading";
|
||||||
if (this.data.dataConnectionStatus == 1) return "error";
|
if (this.data.dataConnectionStatus == DataStatus.Error) return "error";
|
||||||
|
|
||||||
return "success";
|
return "success";
|
||||||
}
|
}
|
||||||
|
|
||||||
get timetableDataStatusClass() {
|
get timetableDataStatusClass() {
|
||||||
if (this.data.timetableDataStatus == 0) return "loading";
|
if (this.data.timetableDataStatus == DataStatus.Loading) return "loading";
|
||||||
if (this.data.timetableDataStatus == 1) return "error";
|
if (this.data.timetableDataStatus == DataStatus.Error) return "error";
|
||||||
|
|
||||||
return "success";
|
return "success";
|
||||||
}
|
}
|
||||||
@@ -186,8 +189,7 @@ export default class StationsView extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setFocusedStation(name: string) {
|
setFocusedStation(name: string) {
|
||||||
if (this.focusedStationName == name) this.focusedStationName = "";
|
this.focusedStationName = this.focusedStationName == name ? "" : name;
|
||||||
else this.focusedStationName = name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get focusedStationInfo() {
|
get focusedStationInfo() {
|
||||||
|
|||||||
Reference in New Issue
Block a user