From b75db3d6a54f4ac99221595ec6f24ebe2dc6dfb6 Mon Sep 17 00:00:00 2001 From: Creeperkatze <178587183+Creeperkatze@users.noreply.github.com> Date: Mon, 12 Jan 2026 22:32:10 +0100 Subject: [PATCH 1/4] fix category parsing on discover --- packages/ui/src/utils/search.ts | 45 +++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/packages/ui/src/utils/search.ts b/packages/ui/src/utils/search.ts index edfd73248f..379bd6e910 100644 --- a/packages/ui/src/utils/search.ts +++ b/packages/ui/src/utils/search.ts @@ -558,32 +558,45 @@ export function useSearch( }) for (const key of Object.keys(route.query).filter((key) => !readParams.has(key))) { - const type = filters.value.find((type) => type.query_param === key) - if (type) { - const values = getParamValuesAsArray(route.query[key]) + const types = filters.value.filter((type) => type.query_param === key) + if (types.length === 0) { + console.error(`Unknown filter type: ${key}`) + continue + } + + const values = getParamValuesAsArray(route.query[key]) - for (const value of values) { - const negative = !value.includes(':') && value.includes('!=') + for (const value of values) { + const negative = !value.includes(':') && value.includes('!=') + let matched = false + + for (const type of types) { const option = type.options.find((option) => getOptionValue(option, negative) === value) + if (!option) { + continue + } + + currentFilters.value.push({ + type: type.id, + option: option.id, + negative: negative, + }) + matched = true + break + } - if (!option && type.allows_custom_options) { + if (!matched) { + const customType = types.find((type) => type.allows_custom_options) + if (customType) { currentFilters.value.push({ - type: type.id, + type: customType.id, option: value.replace('!=', ':'), negative: negative, }) - } else if (option) { - currentFilters.value.push({ - type: type.id, - option: option.id, - negative: negative, - }) } else { - console.error(`Unknown filter option: ${value}`) + console.error(`Unknown filter option for ${key}: ${value}`) } } - } else { - console.error(`Unknown filter type: ${key}`) } } } From 6451e3f220c9e6c4f140427117a4feafdd57c1d2 Mon Sep 17 00:00:00 2001 From: Creeperkatze <178587183+Creeperkatze@users.noreply.github.com> Date: Mon, 12 Jan 2026 22:40:49 +0100 Subject: [PATCH 2/4] Make categories (loader, platform, etc) colored in discover, also add i18n --- .../components/search/SearchFilterOption.vue | 13 +++- .../components/search/SearchSidebarFilter.vue | 59 +++++++++++++++++-- 2 files changed, 65 insertions(+), 7 deletions(-) diff --git a/packages/ui/src/components/search/SearchFilterOption.vue b/packages/ui/src/components/search/SearchFilterOption.vue index f30c4b0866..0e42d9135a 100644 --- a/packages/ui/src/components/search/SearchFilterOption.vue +++ b/packages/ui/src/components/search/SearchFilterOption.vue @@ -23,7 +23,7 @@ >