diff --git a/src/components/SceneryView/SceneryTimetable.vue b/src/components/SceneryView/SceneryTimetable.vue
index acd0c9e..c61c7e4 100644
--- a/src/components/SceneryView/SceneryTimetable.vue
+++ b/src/components/SceneryView/SceneryTimetable.vue
@@ -63,14 +63,13 @@
{{ $t('scenery.no-timetables') }}
-
@@ -169,7 +168,7 @@
-
+
@@ -196,7 +195,7 @@ export default defineComponent({
components: { Loading, ScheduledTrainStatus },
- mixins: [dateMixin, routerMixin, trainCategoryMixin, driverViewMixin],
+ mixins: [dateMixin, routerMixin, trainCategoryMixin],
props: {
station: {
@@ -391,7 +390,6 @@ export default defineComponent({
background: #353535;
- cursor: pointer;
z-index: 10;
&.empty {
diff --git a/src/components/TrainsView/TrainTable.vue b/src/components/TrainsView/TrainTable.vue
index 505361a..2be3642 100644
--- a/src/components/TrainsView/TrainTable.vue
+++ b/src/components/TrainsView/TrainTable.vue
@@ -18,7 +18,7 @@
v-for="train in trains"
:key="train.id"
>
-
+
@@ -64,17 +64,6 @@ export default defineComponent({
};
},
- methods: {
- getTrainRoute(trainId: string) {
- return {
- name: 'DriverView',
- query: {
- trainId,
- }
- }
- }
- },
-
computed: {
dataStatus() {
if (this.store.isOffline) return Status.Data.Offline;
diff --git a/src/router/index.ts b/src/router/index.ts
index 49cd8e1..524bc0b 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -7,7 +7,7 @@ const routes: Array = [
component: () => import('../views/StationsView.vue'),
props: (route) => ({
region: route.query.region
- })
+ }),
},
{
path: '/trains',
@@ -55,7 +55,7 @@ const routes: Array = [
component: () => import('../views/JournalDispatchers.vue'),
props: (route) => ({
region: route.query.region
- })
+ }),
},
{
path: '/:catchAll(.*)',
diff --git a/src/store/mainStore.ts b/src/store/mainStore.ts
index 129e5bb..1434165 100644
--- a/src/store/mainStore.ts
+++ b/src/store/mainStore.ts
@@ -86,6 +86,13 @@ export const useMainStore = defineStore('mainStore', {
isSupporter: train.driverIsSupporter,
driverLevel: train.driverLevel,
+ driverRouteLocation: {
+ name: 'DriverView',
+ query: {
+ trainId: train.id
+ }
+ },
+
timetableData: timetable
? {
timetableId: timetable.timetableId,
diff --git a/src/typings/common.ts b/src/typings/common.ts
index a8e049a..97f7ad4 100644
--- a/src/typings/common.ts
+++ b/src/typings/common.ts
@@ -1,3 +1,5 @@
+import { RouteLocationRaw } from 'vue-router';
+
export type Availability = 'default' | 'unavailable' | 'nonPublic' | 'abandoned' | 'nonDefault';
export type ScenerySpawnType = 'passenger' | 'freight' | 'loco' | 'all';
@@ -70,6 +72,8 @@ export interface Train {
isTimeout: boolean;
isSupporter: boolean;
+ driverRouteLocation: RouteLocationRaw,
+
timetableData?: {
timetableId: number;
category: string;