mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-18 04:47:42 +03:00
Goto album page when clicking on player's album cover
This commit is contained in:
parent
53b2cdd33d
commit
af4609727c
@ -250,6 +250,12 @@ const Player = () => {
|
||||
[dispatch, dataProvider]
|
||||
)
|
||||
|
||||
const onCoverClick = useCallback((mode, audioLists, audioInfo) => {
|
||||
if (mode === 'full') {
|
||||
window.location.href = `#/album/${audioInfo.albumId}/show`
|
||||
}
|
||||
}, [])
|
||||
|
||||
const onBeforeDestroy = useCallback(() => {
|
||||
return new Promise((resolve, reject) => {
|
||||
dispatch(clearQueue())
|
||||
@ -272,6 +278,7 @@ const Player = () => {
|
||||
onAudioPause={onAudioPause}
|
||||
onAudioEnded={onAudioEnded}
|
||||
onAudioVolumeChange={onAudioVolumeChange}
|
||||
onCoverClick={onCoverClick}
|
||||
onBeforeDestroy={onBeforeDestroy}
|
||||
getAudioInstance={(instance) => {
|
||||
audioInstance = instance
|
||||
|
Loading…
x
Reference in New Issue
Block a user