From 31e5d93a01c465a80bce88f6bc90005ff1b5cd6c Mon Sep 17 00:00:00 2001 From: "Victor \"multun\" Collod" Date: Tue, 18 Jun 2024 16:38:07 +0200 Subject: [PATCH] frontend: add filter toggle buttons --- frontend/components/viewer/FilterConfig.vue | 45 +++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/frontend/components/viewer/FilterConfig.vue b/frontend/components/viewer/FilterConfig.vue index 3e2f183..44fb3fd 100644 --- a/frontend/components/viewer/FilterConfig.vue +++ b/frontend/components/viewer/FilterConfig.vue @@ -35,6 +35,30 @@ {{ category.title }} + + +
tag.title.toLowerCase().includes(tagSearch.value.toLowerCase())) } +function invertFilteringCategories() { + props.filteringCategories.forEach((category) => { + category.active = !category.active + }) + categoryFiltersChanged() +} + +function resetFilteringCategories() { + props.filteringCategories.forEach((category) => { + category.active = category.default_status + }) + categoryFiltersChanged() +} + +function selectAllFilteringCategories() { + props.filteringCategories.forEach((category) => { + category.active = true + }) + categoryFiltersChanged() +} + function tagFiltersChanged() { emit('filtersChanged') }