feat(library): "favorites only" filter on Albums, Artists, AdvancedSearch (#466)

* feat(ui): StarFilterButton component + common i18n keys

Reusable toggle button for "favorites only" filtering. Three size
variants for different toolbar contexts:
- default: icon + label (Albums-style)
- compact: icon-only with 0.5rem padding (Artists view-mode buttons)
- small:   icon + label at 12px / 4×14 padding (AdvancedSearch tabs)

Adds common.favorites + favoritesTooltipOff/On in all 8 locales.

* feat(library): "favorites only" filter on Albums, Artists, AdvancedSearch

Client-side filter using the existing useMemo pipelines on each page.
Reads starred state from item.starred + playerStore.starredOverrides
(O(1) Map lookup, picks up live star toggles without refetch).

- Albums: toolbar button (default size) next to compilation filter.
- Artists: toolbar button (compact / icon-only) before the Images toggle.
- AdvancedSearch: toolbar button (small) next to the result-type tabs;
  filters all three result categories (artists / albums / songs) and
  updates the count badges accordingly.

Filter state is ephemeral per-page (not persisted) so users don't get
surprised by hidden items after a restart. Zero extra server calls.

* docs(contributors): credit + changelog entry for #466
This commit is contained in:
Frank Stellmacher
2026-05-05 23:02:22 +02:00
committed by GitHub
parent 0fab2849e5
commit d33abf565c
14 changed files with 151 additions and 18 deletions
+3
View File
@@ -495,6 +495,9 @@ export const deTranslation = {
filterSearchGenres: 'Genres suchen…',
filterNoGenres: 'Keine Genres gefunden',
filterClear: 'Zurücksetzen',
favorites: 'Favoriten',
favoritesTooltipOff: 'Nur Favoriten anzeigen',
favoritesTooltipOn: 'Alle anzeigen',
play: 'Abspielen',
bulkSelected: '{{count}} ausgewählt',
clearSelection: 'Auswahl aufheben',
+3
View File
@@ -497,6 +497,9 @@ export const enTranslation = {
filterSearchGenres: 'Search genres…',
filterNoGenres: 'No genres match',
filterClear: 'Clear',
favorites: 'Favorites',
favoritesTooltipOff: 'Show only favorites',
favoritesTooltipOn: 'Show all',
play: 'Play',
bulkSelected: '{{count}} selected',
clearSelection: 'Clear selection',
+3
View File
@@ -496,6 +496,9 @@ export const esTranslation = {
filterSearchGenres: 'Buscar géneros…',
filterNoGenres: 'Ningún género coincide',
filterClear: 'Limpiar',
favorites: 'Favoritos',
favoritesTooltipOff: 'Mostrar solo favoritos',
favoritesTooltipOn: 'Mostrar todo',
play: 'Reproducir',
bulkSelected: '{{count}} seleccionados',
clearSelection: 'Limpiar selección',
+3
View File
@@ -494,6 +494,9 @@ export const frTranslation = {
filterSearchGenres: 'Rechercher des genres…',
filterNoGenres: 'Aucun genre trouvé',
filterClear: 'Effacer',
favorites: 'Favoris',
favoritesTooltipOff: 'Afficher uniquement les favoris',
favoritesTooltipOn: 'Tout afficher',
play: 'Lire',
bulkSelected: '{{count}} sélectionné(s)',
clearSelection: 'Effacer la sélection',
+3
View File
@@ -494,6 +494,9 @@ export const nbTranslation = {
filterSearchGenres: 'Søk i sjangre…',
filterNoGenres: 'Ingen sjangre samsvarer',
filterClear: 'Tøm',
favorites: 'Favoritter',
favoritesTooltipOff: 'Vis bare favoritter',
favoritesTooltipOn: 'Vis alle',
play: 'Spill',
bulkSelected: '{{count}} valgt',
clearSelection: 'Fjern utvalg',
+3
View File
@@ -493,6 +493,9 @@ export const nlTranslation = {
filterSearchGenres: 'Genres zoeken…',
filterNoGenres: 'Geen genres gevonden',
filterClear: 'Wissen',
favorites: 'Favorieten',
favoritesTooltipOff: 'Alleen favorieten tonen',
favoritesTooltipOn: 'Alles tonen',
play: 'Afspelen',
bulkSelected: '{{count}} geselecteerd',
clearSelection: 'Selectie wissen',
+3
View File
@@ -525,6 +525,9 @@ export const ruTranslation = {
filterSearchGenres: 'Поиск жанров…',
filterNoGenres: 'Нет совпадений',
filterClear: 'Сбросить',
favorites: 'Избранное',
favoritesTooltipOff: 'Показывать только избранное',
favoritesTooltipOn: 'Показать всё',
play: 'Воспроизвести',
bulkSelected: 'Выбрано: {{count}}',
clearSelection: 'Сбросить выбор',
+3
View File
@@ -488,6 +488,9 @@ export const zhTranslation = {
filterSearchGenres: '搜索流派…',
filterNoGenres: '未找到匹配流派',
filterClear: '清除',
favorites: '收藏',
favoritesTooltipOff: '仅显示收藏',
favoritesTooltipOn: '显示全部',
play: '播放',
bulkSelected: '已选 {{count}} 首',
clearSelection: '清除选择',