mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-23 15:20:33 +03:00
Add PlayCount and PlayDate columns to PlaylistSongs
This commit is contained in:
parent
947353610c
commit
d0ce030386
@ -25,6 +25,7 @@ import {
|
||||
QualityInfo,
|
||||
useSelectedFields,
|
||||
useResourceRefresh,
|
||||
DateField,
|
||||
} from '../common'
|
||||
import { AddToPlaylistDialog } from '../dialogs'
|
||||
import { AlbumLinkField } from '../song/AlbumLinkField'
|
||||
@ -146,6 +147,10 @@ const PlaylistSongs = ({ playlistId, readOnly, actions, ...props }) => {
|
||||
sortByOrder={'DESC'}
|
||||
/>
|
||||
),
|
||||
playCount: isDesktop && (
|
||||
<NumberField source="playCount" sortByOrder={'DESC'} />
|
||||
),
|
||||
playDate: <DateField source="playDate" sortByOrder={'DESC'} showTime />,
|
||||
quality: isDesktop && <QualityInfo source="quality" sortable={false} />,
|
||||
channels: isDesktop && <NumberField source="channels" sortable={true} />,
|
||||
bpm: isDesktop && <NumberField source="bpm" />,
|
||||
@ -155,7 +160,7 @@ const PlaylistSongs = ({ playlistId, readOnly, actions, ...props }) => {
|
||||
const columns = useSelectedFields({
|
||||
resource: 'playlistTrack',
|
||||
columns: toggleableFields,
|
||||
defaultOff: ['channels', 'bpm', 'year'],
|
||||
defaultOff: ['channels', 'bpm', 'year', 'playCount', 'playDate'],
|
||||
})
|
||||
|
||||
return (
|
||||
|
Loading…
x
Reference in New Issue
Block a user