mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-30 23:17:51 +01:00
feat(ui): add 'Show in Playlist' context menu (#4139)
* Update song playlist menu and endpoint * feat(ui): show submenu on click, not on hover Signed-off-by: Deluan <deluan@navidrome.org> * feat(ui): integrate dataProvider for fetching playlists in song context menu Signed-off-by: Deluan <deluan@navidrome.org> * feat(ui): update song context menu to use dataProvider for fetching playlists and inspecting songs Signed-off-by: Deluan <deluan@navidrome.org> * feat(ui): stop event propagation when closing playlist submenu Signed-off-by: Deluan <deluan@navidrome.org> * feat(ui): add 'show in playlist' option to options object Signed-off-by: Deluan <deluan@navidrome.org> --------- Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
6dd98e0bed
commit
ded8cf236e
9 changed files with 249 additions and 8 deletions
|
|
@ -90,6 +90,16 @@ const wrapperDataProvider = {
|
|||
body: JSON.stringify(data),
|
||||
}).then(({ json }) => ({ data: json }))
|
||||
},
|
||||
getPlaylists: (songId) => {
|
||||
return httpClient(`${REST_URL}/song/${songId}/playlists`).then(
|
||||
({ json }) => ({ data: json }),
|
||||
)
|
||||
},
|
||||
inspect: (songId) => {
|
||||
return httpClient(`${REST_URL}/inspect?id=${songId}`).then(({ json }) => ({
|
||||
data: json,
|
||||
}))
|
||||
},
|
||||
}
|
||||
|
||||
export default wrapperDataProvider
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue