mirror of
https://github.com/navidrome/navidrome.git
synced 2026-05-03 06:51:16 +00:00
feat(ui): add Not Starred filter option (#5362)
* feat(ui): add Not Starred filter option - #5108 Signed-off-by: Daniel Banariba <banaribad@gmail.com> * fix(ui): apply notStarred translation to playlistTrack resource - #5108 Signed-off-by: Daniel Banariba <banaribad@gmail.com> * refactor(ui): use NullableBooleanInput for starred filter - #5108 Replace QuickFilter approach with NullableBooleanInput per maintainer review feedback. Single tri-state filter (Yes/No/Any) instead of two separate buttons + dataProvider translation. Matches the existing pattern used by the 'missing' filter. Signed-off-by: Daniel Banariba <banaribad@gmail.com> --------- Signed-off-by: Daniel Banariba <banaribad@gmail.com> Co-authored-by: Deluan Quintão <deluan@navidrome.org>
This commit is contained in:
parent
259c1a9484
commit
0fe08bfa74
@ -20,7 +20,6 @@ import FavoriteIcon from '@material-ui/icons/Favorite'
|
||||
import { withWidth } from '@material-ui/core'
|
||||
import {
|
||||
List,
|
||||
QuickFilter,
|
||||
Title,
|
||||
useAlbumsPerPage,
|
||||
useResourceRefresh,
|
||||
@ -152,10 +151,9 @@ const AlbumFilter = (props) => {
|
||||
<NullableBooleanInput source="compilation" />
|
||||
<NumberInput source="year" />
|
||||
{config.enableFavourites && (
|
||||
<QuickFilter
|
||||
<NullableBooleanInput
|
||||
source="starred"
|
||||
label={<FavoriteIcon fontSize={'small'} />}
|
||||
defaultValue={true}
|
||||
/>
|
||||
)}
|
||||
{isAdmin && <NullableBooleanInput source="missing" />}
|
||||
|
||||
@ -24,7 +24,6 @@ import {
|
||||
ArtistContextMenu,
|
||||
CoverArtAvatar,
|
||||
List,
|
||||
QuickFilter,
|
||||
useGetHandleArtistClick,
|
||||
RatingField,
|
||||
useSelectedFields,
|
||||
@ -88,10 +87,9 @@ const ArtistFilter = (props) => {
|
||||
<SearchInput id="search" source="name" alwaysOn />
|
||||
<SelectInput source="role" choices={roles} alwaysOn />
|
||||
{config.enableFavourites && (
|
||||
<QuickFilter
|
||||
<NullableBooleanInput
|
||||
source="starred"
|
||||
label={<FavoriteIcon fontSize={'small'} />}
|
||||
defaultValue={true}
|
||||
/>
|
||||
)}
|
||||
{isAdmin && <NullableBooleanInput source="missing" />}
|
||||
|
||||
@ -20,7 +20,6 @@ import {
|
||||
SongContextMenu,
|
||||
SongDatagrid,
|
||||
SongInfo,
|
||||
QuickFilter,
|
||||
SongTitleField,
|
||||
SongSimpleList,
|
||||
RatingField,
|
||||
@ -119,10 +118,9 @@ const SongFilter = (props) => {
|
||||
/>
|
||||
</ReferenceArrayInput>
|
||||
{config.enableFavourites && (
|
||||
<QuickFilter
|
||||
<NullableBooleanInput
|
||||
source="starred"
|
||||
label={<FavoriteIcon fontSize={'small'} />}
|
||||
defaultValue={true}
|
||||
/>
|
||||
)}
|
||||
{isAdmin && <NullableBooleanInput source="missing" />}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user