diff --git a/.gitignore b/.gitignore
index b4c4f95..2976f5b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,7 +31,11 @@ node_modules
.firebase
.firebaserc
+# Env
.env
+# Mock data
+mockWebsocketData.json
+
.fake
.ionide
\ No newline at end of file
diff --git a/src/assets/icon-unknown.png b/src/assets/icon-unknown.png
deleted file mode 100644
index 0a930b9..0000000
Binary files a/src/assets/icon-unknown.png and /dev/null differ
diff --git a/src/assets/unknown.png b/src/assets/icon-vehicle-unknown.png
similarity index 100%
rename from src/assets/unknown.png
rename to src/assets/icon-vehicle-unknown.png
diff --git a/src/components/Global/TrainThumbnail.vue b/src/components/Global/TrainThumbnail.vue
index 6245134..0d57a2f 100644
--- a/src/components/Global/TrainThumbnail.vue
+++ b/src/components/Global/TrainThumbnail.vue
@@ -1,22 +1,37 @@
-
+
+
+
+
+
+
+
+
diff --git a/src/components/JournalView/JournalTimetables/TimetableExtra.vue b/src/components/JournalView/JournalTimetables/TimetableExtra.vue
index ebe9b78..b5db63a 100644
--- a/src/components/JournalView/JournalTimetables/TimetableExtra.vue
+++ b/src/components/JournalView/JournalTimetables/TimetableExtra.vue
@@ -17,12 +17,18 @@
{{ $t('journal.stock-length') }}
- {{ currentHistoryIndex == 0 ? timetable.stockLength : stockHistory[currentHistoryIndex].stockLength || timetable.stockLength }}m
+
+ {{ currentHistoryIndex == 0 ? timetable.stockLength : stockHistory[currentHistoryIndex].stockLength || timetable.stockLength }}m
+
{{ $t('journal.stock-mass') }}
- {{ Math.floor((currentHistoryIndex == 0 ? timetable.stockMass! : stockHistory[currentHistoryIndex].stockMass || timetable.stockMass) / 1000) }}t
+
+ {{
+ Math.floor((currentHistoryIndex == 0 ? timetable.stockMass! : stockHistory[currentHistoryIndex].stockMass || timetable.stockMass) / 1000)
+ }}t
+
@@ -34,9 +40,9 @@
- -
-
-
{{ car.replace(/_/g, ' ').split(':')[0] }}
+ -
+
+
{{ stockName.split(':')[0].split('_').splice(0, 2).join(' ') }} {{ stockName.split(':')[1] }}
@@ -146,6 +152,5 @@ ul.stock-list {
color: #aaa;
font-size: 0.9em;
}
-
}
diff --git a/src/components/SceneryView/SceneryInfo.vue b/src/components/SceneryView/SceneryInfo.vue
index 1e62113..a7a2a56 100644
--- a/src/components/SceneryView/SceneryInfo.vue
+++ b/src/components/SceneryView/SceneryInfo.vue
@@ -2,7 +2,7 @@
-
+
-
+
-
- {{
- $t(
- 'scenery.authors-title',
- { authors: station.generalInfo.authors.length },
- station.generalInfo.authors.length
- )
- }}:
-
+ {{ $t('scenery.authors-title', { authors: station.generalInfo.authors.length }, station.generalInfo.authors.length) }}:
{{ station.generalInfo.authors.join(', ') }}
@@ -55,14 +43,14 @@
-
+
-
+
-
+
diff --git a/src/components/SceneryView/SceneryTimetable.vue b/src/components/SceneryView/SceneryTimetable.vue
index 82f1a36..2385167 100644
--- a/src/components/SceneryView/SceneryTimetable.vue
+++ b/src/components/SceneryView/SceneryTimetable.vue
@@ -14,19 +14,11 @@
@@ -39,8 +31,8 @@
@@ -106,15 +98,12 @@
- {{
- timestampToString(scheduledTrain.stopInfo.arrivalTimestamp)
- }}
+ {{ timestampToString(scheduledTrain.stopInfo.arrivalTimestamp) }}
{{ timestampToString(scheduledTrain.stopInfo.arrivalRealTimestamp) }}
- ({{ scheduledTrain.stopInfo.arrivalDelay > 0 ? '+' : ''
- }}{{ scheduledTrain.stopInfo.arrivalDelay }})
+ ({{ scheduledTrain.stopInfo.arrivalDelay > 0 ? '+' : '' }}{{ scheduledTrain.stopInfo.arrivalDelay }})
@@ -146,15 +135,12 @@
- {{
- timestampToString(scheduledTrain.stopInfo.departureTimestamp)
- }}
+ {{ timestampToString(scheduledTrain.stopInfo.departureTimestamp) }}
{{ timestampToString(scheduledTrain.stopInfo.departureRealTimestamp) }}
- ({{ scheduledTrain.stopInfo.departureDelay > 0 ? '+' : ''
- }}{{ scheduledTrain.stopInfo.departureDelay }})
+ ({{ scheduledTrain.stopInfo.departureDelay > 0 ? '+' : '' }}{{ scheduledTrain.stopInfo.departureDelay }})
@@ -203,16 +189,22 @@ export default defineComponent({
listOpen: false,
}),
+ mounted() {
+ this.loadSelectedOption();
+ },
+
+ activated() {
+ this.loadSelectedOption();
+ },
+
setup(props) {
const route = useRoute();
const currentURL = computed(() => `${location.origin}${route.fullPath}`);
const store = useStore();
- const selectedCheckpoint = ref(
- props.station?.generalInfo?.checkpoints?.length == 0
- ? ''
- : props.station?.generalInfo?.checkpoints[0].checkpointName || ''
+ const chosenCheckpoint = ref(
+ props.station?.generalInfo?.checkpoints?.length == 0 ? '' : props.station?.generalInfo?.checkpoints[0].checkpointName || null
);
const computedScheduledTrains = computed(() => {
@@ -221,8 +213,7 @@ export default defineComponent({
const station = props.station as Station;
let scheduledTrains =
- station.generalInfo?.checkpoints.find((cp) => cp.checkpointName === selectedCheckpoint.value)
- ?.scheduledTrains ||
+ station.generalInfo?.checkpoints.find((cp) => cp.checkpointName === chosenCheckpoint.value)?.scheduledTrains ||
station.onlineInfo?.scheduledTrains ||
[];
@@ -243,12 +234,21 @@ export default defineComponent({
return {
currentURL,
- selectedCheckpoint,
+ chosenCheckpoint,
computedScheduledTrains,
store,
};
},
+ computed: {
+ tabliceZbiorczeHref() {
+ let url = `https://tablice-td2.web.app/?station=${this.station.name}`;
+ if (this.chosenCheckpoint) url += `&checkpoint=${this.chosenCheckpoint}`;
+
+ return url;
+ },
+ },
+
methods: {
loadSelectedOption() {
if (!this.station) return;
@@ -256,27 +256,19 @@ export default defineComponent({
if (!this.station.generalInfo.checkpoints) return;
if (this.station.generalInfo.checkpoints.length == 0) return;
- if (this.selectedCheckpoint != '') return;
+ if (this.chosenCheckpoint != '') return;
- this.selectedCheckpoint = this.station.generalInfo.checkpoints[0].checkpointName;
+ this.chosenCheckpoint = this.station.generalInfo.checkpoints[0].checkpointName;
},
- selectCheckpoint(cp: { checkpointName: string }) {
- this.selectedCheckpoint = cp.checkpointName;
+ setCheckpoint(cp: { checkpointName: string }) {
+ this.chosenCheckpoint = cp.checkpointName;
},
showTimetableOnlyView() {
this.$router.push(`${this.$route.fullPath}&timetableOnly=1`);
},
},
-
- mounted() {
- this.loadSelectedOption();
- },
-
- activated() {
- this.loadSelectedOption();
- },
});
diff --git a/src/components/TrainsView/TrainInfo.vue b/src/components/TrainsView/TrainInfo.vue
index 26f740f..2bcf6f3 100644
--- a/src/components/TrainsView/TrainInfo.vue
+++ b/src/components/TrainsView/TrainInfo.vue
@@ -107,7 +107,14 @@ export default defineComponent({
});
+
+
+