diff --git a/src/components/StationsView/StationFilterCard.vue b/src/components/StationsView/StationFilterCard.vue index 00663cb..876e3ed 100644 --- a/src/components/StationsView/StationFilterCard.vue +++ b/src/components/StationsView/StationFilterCard.vue @@ -6,30 +6,11 @@

[F] {{ $t('options.filters') }}

- - -
-
+
+
{{ $t('filters.title') }}

@@ -40,6 +21,31 @@
+ +
- +
@@ -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 @@ @@ -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({