fix(front): allow users to temporarily hide previously added tags #2448 #2390

This commit is contained in:
Flupsi 2025-06-06 20:51:16 +02:00
parent a97a8d53d1
commit 65ae7dfc0c
4 changed files with 4 additions and 4 deletions

View File

@ -156,7 +156,7 @@ const paginateOptions = computed(() => sortedUniq([12, 30, 50, paginateBy.value]
:get="model => { tags = model.currents.map(({ label }) => label) }" :get="model => { tags = model.currents.map(({ label }) => label) }"
:set="model => ({ :set="model => ({
currents: tags.map(tag => ({ type: 'custom' as const, label: tag })), 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')" :label="t('components.library.Albums.label.tags')"
style="max-width: 150px;" style="max-width: 150px;"

View File

@ -156,7 +156,7 @@ const paginateOptions = computed(() => sortedUniq([12, 30, 50, paginateBy.value]
:get="model => { tags = model.currents.map(({ label }) => label) }" :get="model => { tags = model.currents.map(({ label }) => label) }"
:set="model => ({ :set="model => ({
currents: tags.map(tag => ({ type: 'custom' as const, label: tag })), 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')" :label="t('components.library.Artists.label.tags')"
style="max-width: 150px;" style="max-width: 150px;"

View File

@ -319,7 +319,7 @@ const resetField = (fieldId: string) => {
:set="model => ({ :set="model => ({
...model, ...model,
currents: (values[fieldConfig.id] as string[]).map(tag => ({ type: 'custom' as const, label: tag })), 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" :label="fieldConfig.label"
:required="fieldConfig.required" :required="fieldConfig.required"

View File

@ -177,7 +177,7 @@ const { to: upload } = useModal('upload')
:get="model => { tags = model.currents.map(({ label }) => label) }" :get="model => { tags = model.currents.map(({ label }) => label) }"
:set="model => ({ :set="model => ({
currents: tags.map(tag => ({ type: 'custom' as const, label: tag })), 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')" :label="t('components.library.Podcasts.label.tags')"
style="max-width: 150px;" style="max-width: 150px;"