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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user