feat(ui): add composer field to table views (#4857)
* feat(ui): Add composer field to datatables In order to make the UI a bit more useful for classical music, where the recorded artist isn't the composer of the work, add the composer field to the song and album datatables. To not affect existing users, the field is default off. * Fix typo * Remove composer field for albums Albums can have more than one composer. Showing all or just one of them in a list doesn't really make sense. * Format code
This commit is contained in:
@@ -108,6 +108,9 @@ const AlbumSongs = (props) => {
|
||||
/>
|
||||
),
|
||||
artist: isDesktop && <ArtistLinkField source="artist" sortable={false} />,
|
||||
composer: isDesktop && (
|
||||
<ArtistLinkField source="composer" sortable={false} />
|
||||
),
|
||||
duration: <DurationField source="duration" sortable={false} />,
|
||||
year: isDesktop && (
|
||||
<FunctionField
|
||||
@@ -148,6 +151,7 @@ const AlbumSongs = (props) => {
|
||||
columns: toggleableFields,
|
||||
omittedColumns: ['title'],
|
||||
defaultOff: [
|
||||
'composer',
|
||||
'channels',
|
||||
'bpm',
|
||||
'year',
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"playCount": "Plays",
|
||||
"title": "Title",
|
||||
"artist": "Artist",
|
||||
"composer": "Composer",
|
||||
"album": "Album",
|
||||
"path": "File path",
|
||||
"libraryName": "Library",
|
||||
|
||||
@@ -145,6 +145,7 @@ const SongList = (props) => {
|
||||
return {
|
||||
album: isDesktop && <AlbumLinkField source="album" sortByOrder={'ASC'} />,
|
||||
artist: <ArtistLinkField source="artist" />,
|
||||
composer: <ArtistLinkField source="composer" />,
|
||||
albumArtist: <ArtistLinkField source="albumArtist" />,
|
||||
trackNumber: isDesktop && <NumberField source="trackNumber" />,
|
||||
playCount: isDesktop && (
|
||||
@@ -192,6 +193,7 @@ const SongList = (props) => {
|
||||
resource: 'song',
|
||||
columns: toggleableFields,
|
||||
defaultOff: [
|
||||
'composer',
|
||||
'channels',
|
||||
'bpm',
|
||||
'playDate',
|
||||
|
||||
Reference in New Issue
Block a user