From 65ae7dfc0c54671aa5adf62e8d39319bceafe1b7 Mon Sep 17 00:00:00 2001 From: Flupsi Date: Fri, 6 Jun 2025 20:51:16 +0200 Subject: [PATCH] fix(front): allow users to temporarily hide previously added tags #2448 #2390 --- front/src/components/library/Albums.vue | 2 +- front/src/components/library/Artists.vue | 2 +- front/src/components/library/EditForm.vue | 2 +- front/src/components/library/Podcasts.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/front/src/components/library/Albums.vue b/front/src/components/library/Albums.vue index 05f0d616f..d8441781b 100644 --- a/front/src/components/library/Albums.vue +++ b/front/src/components/library/Albums.vue @@ -156,7 +156,7 @@ const paginateOptions = computed(() => sortedUniq([12, 30, 50, paginateBy.value] :get="model => { tags = model.currents.map(({ label }) => label) }" :set="model => ({ currents: tags.map(tag => ({ type: 'custom' as const, label: tag })), - others: dataStore.tags().value.map(({ name }) => ({ type: 'preset' as const, label: name })), + others: dataStore.tags().value.map(({ name }) => ({ type: 'custom' as const, label: name })), })" :label="t('components.library.Albums.label.tags')" style="max-width: 150px;" diff --git a/front/src/components/library/Artists.vue b/front/src/components/library/Artists.vue index 197c0d387..413dbed28 100644 --- a/front/src/components/library/Artists.vue +++ b/front/src/components/library/Artists.vue @@ -156,7 +156,7 @@ const paginateOptions = computed(() => sortedUniq([12, 30, 50, paginateBy.value] :get="model => { tags = model.currents.map(({ label }) => label) }" :set="model => ({ currents: tags.map(tag => ({ type: 'custom' as const, label: tag })), - others: dataStore.tags().value.map(({ name }) => ({ type: 'preset' as const, label: name })), + others: dataStore.tags().value.map(({ name }) => ({ type: 'custom' as const, label: name })), })" :label="t('components.library.Artists.label.tags')" style="max-width: 150px;" diff --git a/front/src/components/library/EditForm.vue b/front/src/components/library/EditForm.vue index 509bb0116..2cbb319a8 100644 --- a/front/src/components/library/EditForm.vue +++ b/front/src/components/library/EditForm.vue @@ -319,7 +319,7 @@ const resetField = (fieldId: string) => { :set="model => ({ ...model, currents: (values[fieldConfig.id] as string[]).map(tag => ({ type: 'custom' as const, label: tag })), - others: dataStore.tags().value.map(({ name }) => ({ type: 'preset' as const, label: name })), + others: dataStore.tags().value.map(({ name }) => ({ type: 'custom' as const, label: name })), })" :label="fieldConfig.label" :required="fieldConfig.required" diff --git a/front/src/components/library/Podcasts.vue b/front/src/components/library/Podcasts.vue index 902760934..718043b26 100644 --- a/front/src/components/library/Podcasts.vue +++ b/front/src/components/library/Podcasts.vue @@ -177,7 +177,7 @@ const { to: upload } = useModal('upload') :get="model => { tags = model.currents.map(({ label }) => label) }" :set="model => ({ currents: tags.map(tag => ({ type: 'custom' as const, label: tag })), - others: dataStore.tags().value.map(({ name }) => ({ type: 'preset' as const, label: name })), + others: dataStore.tags().value.map(({ name }) => ({ type: 'custom' as const, label: name })), })" :label="t('components.library.Podcasts.label.tags')" style="max-width: 150px;"