+
+
{{ $t('filters.title') }}
@@ -40,6 +21,31 @@
{{ $t('filters.no-changed-filters') }}
+
+
-
+
@@ -269,20 +275,11 @@ export default defineComponent({
},
watch: {
- chosenSearchScenery(value: string) {
- const chosenStation = this.store.stationList.find(({ name }) => name == value);
-
- if (chosenStation) {
- this.$router.push(`/scenery?station=${chosenStation.name.replace(/ /g, '_')}`);
- this.chosenSearchScenery = '';
- }
- },
-
isVisible(value: boolean) {
this.$nextTick(() => {
if (value) {
- (this.$refs['cardRef'] as HTMLDivElement).focus();
(this.$refs['cardContentRef'] as HTMLDivElement).scrollTop = this.scrollTop;
+ (this.$refs['cardContentRef'] as HTMLDivElement).focus();
}
});
}
@@ -300,7 +297,18 @@ export default defineComponent({
handleAuthorsInput() {
this.filters['authors'] = this.authors;
- // if (this.saveOptions) StorageManager.setStringValue('authors', target.value);
+ },
+
+ handleSceneriesInput() {
+ const chosenStation = this.store.stationList.find(
+ ({ name }) => name == this.chosenSearchScenery
+ );
+
+ if (chosenStation) {
+ this.$router.push(`/scenery?station=${chosenStation.name.replace(/ /g, '_')}`);
+ this.chosenSearchScenery = '';
+ this.isVisible = false;
+ }
},
subHour() {
@@ -329,6 +337,8 @@ export default defineComponent({
},
resetFilters() {
+ if (this.preventKeyDown) return;
+
// Reset local model values
this.minimumHours = 0;
this.authors = '';
@@ -382,6 +392,7 @@ h3.section-header {
.card {
display: grid;
grid-template-rows: 1fr auto;
+ padding: 1px;
}
.card_info {
@@ -451,8 +462,12 @@ h3.section-header {
}
}
-.card_authors-search {
+.card_authors-search,
+.card_sceneries-search {
margin: 1em 0;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
form {
display: flex;
diff --git a/src/components/StationsView/StationStats.vue b/src/components/StationsView/StationStats.vue
index ba8552a..fd6a8fc 100644
--- a/src/components/StationsView/StationStats.vue
+++ b/src/components/StationsView/StationStats.vue
@@ -1,56 +1,70 @@
-
-
+
+
-
-
-
{{ $t('station-stats.u-factor') }}
- (?):
-
+
-
- {{ uFactor.toFixed(2) }}
-
+
+
+
+
+
+ {{ $t('train-stats.title') }}
+
+
+
+
+
+
+
{{ $t('station-stats.u-factor') }}
+ (?):
+
+
+ {{ uFactor.toFixed(2) }}
+
+
+
+ {{ $t('station-stats.avg-timetable-count') }}
+ {{ avgTimetableCount.toFixed(2) }}
+
+
+ {{ $t('station-stats.single-track-count') }}
+ {{ trackCount.oneWay }} ({{ trackCount.oneWayElectric }} ⚡)
+
+
+ {{ $t('station-stats.double-track-count') }}
+ {{ trackCount.twoWay }}
+ ({{ trackCount.twoWayElectric }} ⚡)
+
+
+ {{ $t('station-stats.cross-sceneries') }}
+ {{ trackCount.crossTrack }} ({{ trackCount.crossTrackElectric }} ⚡)
+
+
+ {{ $t('station-stats.open-spawns') }} {{ spawnCount.passenger }} - PAS /
+ {{ spawnCount.freight }} - TOW / {{ spawnCount.loco }} - LUZ /
+ {{ spawnCount.all }} - ALL
+
+
+
+
+
(showDropdown = false)">
-
-
- •
- {{ $t('station-stats.avg-timetable-count') }}
- {{ avgTimetableCount.toFixed(2) }}
-
-
-
- •
- {{ $t('station-stats.single-track-count') }}
- {{ trackCount.oneWay }} ({{ trackCount.oneWayElectric }} ⚡)
-
-
-
- •
- {{ $t('station-stats.double-track-count') }}
- {{ trackCount.twoWay }}
- ({{ trackCount.twoWayElectric }} ⚡)
-
-
-
- • {{ $t('station-stats.cross-sceneries') }} {{ trackCount.crossTrack }} ({{ trackCount.crossTrackElectric }} ⚡)
-
-
-
- •
- {{ $t('station-stats.open-spawns') }} {{ spawnCount.passenger }} - PAS /
- {{ spawnCount.freight }} - TOW / {{ spawnCount.loco }} - LUZ /
- {{ spawnCount.all }} - ALL
-
-
+
@@ -61,11 +75,16 @@ import { useMainStore } from '../../store/mainStore';
export default defineComponent({
data() {
return {
- mainStore: useMainStore()
+ mainStore: useMainStore(),
+ showDropdown: false
};
},
methods: {
+ toggleDropdown() {
+ this.showDropdown = !this.showDropdown;
+ },
+
calculateFactorStyle() {
if (this.uFactor == 0) return '';
@@ -171,26 +190,24 @@ export default defineComponent({