mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-23 07:10:31 +03:00
Better defaults to sort orders in List views
This commit is contained in:
parent
b54d4c75ae
commit
82d437f004
@ -84,9 +84,9 @@ const AlbumListView = ({ hasShow, hasEdit, hasList, ...rest }) => {
|
||||
<AlbumDatagrid expand={<AlbumDetails />} rowClick={'show'} {...rest}>
|
||||
<TextField source="name" />
|
||||
<ArtistLinkField />
|
||||
{isDesktop && <NumberField source="songCount" />}
|
||||
{isDesktop && <NumberField source="playCount" />}
|
||||
<RangeField source={'year'} sortBy={'maxYear'} />
|
||||
{isDesktop && <NumberField source="songCount" sortByOrder={'DESC'} />}
|
||||
{isDesktop && <NumberField source="playCount" sortByOrder={'DESC'} />}
|
||||
<RangeField source={'year'} sortBy={'maxYear'} sortByOrder={'DESC'} />
|
||||
{isDesktop && <DurationField source="duration" />}
|
||||
<AlbumContextMenu />
|
||||
</AlbumDatagrid>
|
||||
|
@ -24,8 +24,8 @@ const ArtistList = (props) => (
|
||||
>
|
||||
<Datagrid rowClick={artistLink}>
|
||||
<TextField source="name" />
|
||||
<NumberField source="albumCount" />
|
||||
<NumberField source="songCount" />
|
||||
<NumberField source="albumCount" sortByOrder={'DESC'} />
|
||||
<NumberField source="songCount" sortByOrder={'DESC'} />
|
||||
</Datagrid>
|
||||
</List>
|
||||
)
|
||||
|
@ -29,7 +29,7 @@ const PlayerList = (props) => {
|
||||
source="maxBitRate"
|
||||
render={(r) => (r.maxBitRate ? r.maxBitRate : '-')}
|
||||
/>
|
||||
<DateField source="lastSeen" showTime />
|
||||
<DateField source="lastSeen" showTime sortByOrder={'DESC'} />
|
||||
</Datagrid>
|
||||
)}
|
||||
</List>
|
||||
|
@ -63,8 +63,12 @@ const PlaylistList = ({ permissions, ...props }) => (
|
||||
<TextField source="owner" />
|
||||
<NumberField source="songCount" />
|
||||
<DurationField source="duration" />
|
||||
<DateField source="updatedAt" />
|
||||
<TogglePublicInput source="public" permissions={permissions} />
|
||||
<DateField source="updatedAt" sortByOrder={'DESC'} />
|
||||
<TogglePublicInput
|
||||
source="public"
|
||||
permissions={permissions}
|
||||
sortByOrder={'DESC'}
|
||||
/>
|
||||
<Writable>
|
||||
<EditButton />
|
||||
</Writable>
|
||||
|
@ -87,14 +87,21 @@ const SongList = (props) => {
|
||||
{isDesktop && <AlbumLinkField source="album" />}
|
||||
<TextField source="artist" />
|
||||
{isDesktop && <NumberField source="trackNumber" />}
|
||||
{isDesktop && <NumberField source="playCount" />}
|
||||
{isDesktop && (
|
||||
<FunctionField source="year" render={(r) => r.year || ''} />
|
||||
<NumberField source="playCount" sortByOrder={'DESC'} />
|
||||
)}
|
||||
{isDesktop && (
|
||||
<FunctionField
|
||||
source="year"
|
||||
render={(r) => r.year || ''}
|
||||
sortByOrder={'DESC'}
|
||||
/>
|
||||
)}
|
||||
<DurationField source="duration" />
|
||||
<SongContextMenu
|
||||
source={'starred'}
|
||||
sortBy={'starred DESC, starredAt DESC'}
|
||||
sortBy={'starred ASC, starredAt ASC'}
|
||||
sortByOrder={'DESC'}
|
||||
label={
|
||||
<StarBorderIcon
|
||||
fontSize={'small'}
|
||||
|
@ -40,8 +40,8 @@ const UserList = (props) => {
|
||||
<TextField source="userName" />
|
||||
<TextField source="name" />
|
||||
<BooleanField source="isAdmin" />
|
||||
<DateField source="lastLoginAt" locales="pt-BR" />
|
||||
<DateField source="updatedAt" locales="pt-BR" />
|
||||
<DateField source="lastLoginAt" sortByOrder={'DESC'} />
|
||||
<DateField source="updatedAt" sortByOrder={'DESC'} />
|
||||
</Datagrid>
|
||||
)}
|
||||
</List>
|
||||
|
Loading…
x
Reference in New Issue
Block a user