Skip to content

🎧 Your Personal Streaming Service

feat: add link to album from Songs view

Deluanfc0621646b2b
diff --git a/ui/src/song/SongList.js b/ui/src/song/SongList.js
index 9fdc39098..880ebf7e5 100644
--- a/ui/src/song/SongList.js
+++ b/ui/src/song/SongList.js
@@ -6,6 +6,7 @@ import {
Filter,
List,
NumberField,
+ ReferenceField,
SearchInput,
Show,
SimpleShowLayout,
@@ -80,7 +81,16 @@ const SongList = (props) => {
rowClick={(id, basePath, record) => dispatch(setTrack(record))}
>
<TextField source="title" />
- {isDesktop && <TextField source="album" />}
+ {isDesktop && (
+ <ReferenceField
+ label="Album"
+ source="albumId"
+ reference="album"
+ link="show"
+ >
+ <TextField source="name" />
+ </ReferenceField>
+ )}
<TextField source="artist" />
{isDesktop && <NumberField source="trackNumber" />}
{isDesktop && <TextField source="maxYear" />}