diff --git a/src/components/StationsView/FilterOption.vue b/src/components/StationsView/FilterOption.vue index 2dc6af9..0f57cf9 100644 --- a/src/components/StationsView/FilterOption.vue +++ b/src/components/StationsView/FilterOption.vue @@ -5,6 +5,7 @@ :data-selected="option.value" @click="handleLeftClick" @dblclick="handleDbClick" + :aria-disabled="option.value" > {{ $t(`filters.${option.id}`) }} diff --git a/src/components/StationsView/StationFilterCard.vue b/src/components/StationsView/StationFilterCard.vue index 3b4d8e2..c0f2152 100644 --- a/src/components/StationsView/StationFilterCard.vue +++ b/src/components/StationsView/StationFilterCard.vue @@ -30,6 +30,21 @@

+
+

{{ $t('filters.sections.quick') }}

+
+ +
+ + + +
+
+

{{ $t(`filters.sections.${section}`) }} @@ -431,26 +446,30 @@ export default defineComponent({ } } -.card_options { - .option-section h3 { - display: flex; - align-items: center; - margin-bottom: 0.25em; +.option-section h3 { + display: flex; + align-items: center; + margin-bottom: 0.25em; - gap: 0.5em; + gap: 0.5em; - button { - padding: 0.15em; - color: coral; - } + button { + padding: 0.15em; + color: coral; } +} - .section-inputs { - display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); - gap: 0.5em; - margin: 1em 0; - } +.section-inputs { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 0.5em; + margin: 1em 0; +} + +.quick-actions div { + display: flex; + margin: 1em 0; + gap: 1em; } .slider { diff --git a/src/locales/en.json b/src/locales/en.json index 803c783..404f722 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -146,6 +146,7 @@ "desc": " • Left mouse click: select / unselect chosen filter
• Double left click: unselect all filters but chosen from a group
RESET: reset all filters from a group", "sections": { + "quick": "QUICK FILTERS", "reality": "SCENERY REALITY", "package-access": "IN-GAME AVAILABILITY", "access": "GENERAL AVAILABILITY", @@ -156,6 +157,9 @@ "status": "ONLINE STATUS" }, + "all-available": "ALL AVAILABLE", + "all-free": "CURRENTLY FREE", + "endingStatus": "ENDS SOON", "afkStatus": "AFK", "noSpaceStatus": "NO SPACE", diff --git a/src/locales/pl.json b/src/locales/pl.json index b053f57..4e23274 100644 --- a/src/locales/pl.json +++ b/src/locales/pl.json @@ -147,6 +147,7 @@ "desc": " • Kliknięcie: zaznaczenie / odznaczenie filtru
• Podwójne kliknięcie: odznaczenie reszty filtrów z grupy
RESET: zresetowanie filtrów z grupy", "sections": { + "quick": "SZYBKIE FILTRY", "reality": "FIKCYJNOŚĆ SCENERII", "package-access": "DOSTĘPNOŚĆ W PACZCE", "access": "DOSTĘPNOŚĆ OGÓLNA", @@ -157,6 +158,9 @@ "status": "STATUS ONLINE" }, + "all-available": "WSZYSTKIE DOSTĘPNE", + "all-free": "WSZYSTKIE WOLNE", + "endingStatus": "KOŃCZY", "afkStatus": "Z/W", "noSpaceStatus": "BRAK MIEJSCA", diff --git a/src/store/stationFiltersStore.ts b/src/store/stationFiltersStore.ts index ad8d812..33b9365 100644 --- a/src/store/stationFiltersStore.ts +++ b/src/store/stationFiltersStore.ts @@ -58,6 +58,19 @@ export const useStationFiltersStore = defineStore('stationFiltersStore', { }); }, + handleQuickAction(actionName: string) { + switch (actionName) { + case 'all-available': + this.resetFilters(); + + this.changeFilterValue({ name: 'non-public', value: false }); + break; + + default: + break; + } + }, + changeFilterValue(filter: { name: string; value: any }) { this.filters[filter.name] = filter.value;