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 { withWidth } from '@material-ui/core'
|
||||||
import {
|
import {
|
||||||
List,
|
List,
|
||||||
QuickFilter,
|
|
||||||
Title,
|
Title,
|
||||||
useAlbumsPerPage,
|
useAlbumsPerPage,
|
||||||
useResourceRefresh,
|
useResourceRefresh,
|
||||||
@ -152,10 +151,9 @@ const AlbumFilter = (props) => {
|
|||||||
<NullableBooleanInput source="compilation" />
|
<NullableBooleanInput source="compilation" />
|
||||||
<NumberInput source="year" />
|
<NumberInput source="year" />
|
||||||
{config.enableFavourites && (
|
{config.enableFavourites && (
|
||||||
<QuickFilter
|
<NullableBooleanInput
|
||||||
source="starred"
|
source="starred"
|
||||||
label={<FavoriteIcon fontSize={'small'} />}
|
label={<FavoriteIcon fontSize={'small'} />}
|
||||||
defaultValue={true}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{isAdmin && <NullableBooleanInput source="missing" />}
|
{isAdmin && <NullableBooleanInput source="missing" />}
|
||||||
|
|||||||
@ -24,7 +24,6 @@ import {
|
|||||||
ArtistContextMenu,
|
ArtistContextMenu,
|
||||||
CoverArtAvatar,
|
CoverArtAvatar,
|
||||||
List,
|
List,
|
||||||
QuickFilter,
|
|
||||||
useGetHandleArtistClick,
|
useGetHandleArtistClick,
|
||||||
RatingField,
|
RatingField,
|
||||||
useSelectedFields,
|
useSelectedFields,
|
||||||
@ -88,10 +87,9 @@ const ArtistFilter = (props) => {
|
|||||||
<SearchInput id="search" source="name" alwaysOn />
|
<SearchInput id="search" source="name" alwaysOn />
|
||||||
<SelectInput source="role" choices={roles} alwaysOn />
|
<SelectInput source="role" choices={roles} alwaysOn />
|
||||||
{config.enableFavourites && (
|
{config.enableFavourites && (
|
||||||
<QuickFilter
|
<NullableBooleanInput
|
||||||
source="starred"
|
source="starred"
|
||||||
label={<FavoriteIcon fontSize={'small'} />}
|
label={<FavoriteIcon fontSize={'small'} />}
|
||||||
defaultValue={true}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{isAdmin && <NullableBooleanInput source="missing" />}
|
{isAdmin && <NullableBooleanInput source="missing" />}
|
||||||
|
|||||||
@ -20,7 +20,6 @@ import {
|
|||||||
SongContextMenu,
|
SongContextMenu,
|
||||||
SongDatagrid,
|
SongDatagrid,
|
||||||
SongInfo,
|
SongInfo,
|
||||||
QuickFilter,
|
|
||||||
SongTitleField,
|
SongTitleField,
|
||||||
SongSimpleList,
|
SongSimpleList,
|
||||||
RatingField,
|
RatingField,
|
||||||
@ -119,10 +118,9 @@ const SongFilter = (props) => {
|
|||||||
/>
|
/>
|
||||||
</ReferenceArrayInput>
|
</ReferenceArrayInput>
|
||||||
{config.enableFavourites && (
|
{config.enableFavourites && (
|
||||||
<QuickFilter
|
<NullableBooleanInput
|
||||||
source="starred"
|
source="starred"
|
||||||
label={<FavoriteIcon fontSize={'small'} />}
|
label={<FavoriteIcon fontSize={'small'} />}
|
||||||
defaultValue={true}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{isAdmin && <NullableBooleanInput source="missing" />}
|
{isAdmin && <NullableBooleanInput source="missing" />}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user