mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-01 19:47:37 +03:00
UI: Fine tuning the resource navigation
This commit is contained in:
parent
04637b24cd
commit
e5e20750e5
3 changed files with 13 additions and 6 deletions
|
@ -16,9 +16,9 @@ const App = () => (
|
|||
layout={Layout}
|
||||
loginPage={Login}
|
||||
>
|
||||
<Resource name="song" {...song} options={{ subMenu: 'library' }} />
|
||||
<Resource name="album" {...album} options={{ subMenu: 'library' }} />
|
||||
<Resource name="artist" {...artist} options={{ subMenu: 'library' }} />
|
||||
<Resource name="album" {...album} options={{ subMenu: 'library' }} />
|
||||
<Resource name="song" {...song} options={{ subMenu: 'library' }} />
|
||||
<Resource name="user" {...user} />
|
||||
</Admin>
|
||||
)
|
||||
|
|
|
@ -34,8 +34,13 @@ const AlbumDetails = (props) => {
|
|||
)
|
||||
}
|
||||
|
||||
const albumRowClick = (id, basePath, record) =>
|
||||
`/song?filter={"artist":"${record.artist}","album":"${record.name}","album_id":"${record.id}"}&order=ASC&sort=trackNumber`
|
||||
const albumRowClick = (id, basePath, record) => {
|
||||
const filter = { album: record.name, album_id: id }
|
||||
if (!record.compilation) {
|
||||
filter.artist = record.artist
|
||||
}
|
||||
return `/song?filter=${JSON.stringify(filter)}&order=ASC&sort=trackNumber`
|
||||
}
|
||||
|
||||
const AlbumList = (props) => (
|
||||
<List
|
||||
|
|
|
@ -15,8 +15,10 @@ const ArtistFilter = (props) => (
|
|||
</Filter>
|
||||
)
|
||||
|
||||
const artistRowClick = (id, basePath, record) =>
|
||||
`/album?filter={"artist":"${record.name}","artist_id":"${record.id}"}&order=ASC&sort=year`
|
||||
const artistRowClick = (id, basePath, record) => {
|
||||
const filter = { artist_id: id }
|
||||
return `/album?filter=${JSON.stringify(filter)}&order=ASC&sort=year`
|
||||
}
|
||||
|
||||
const ArtistList = (props) => (
|
||||
<List
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue