mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-16 07:12:24 +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]
|
[dispatch, dataProvider]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const onCoverClick = useCallback((mode, audioLists, audioInfo) => {
|
||||||
|
if (mode === 'full') {
|
||||||
|
window.location.href = `#/album/${audioInfo.albumId}/show`
|
||||||
|
}
|
||||||
|
}, [])
|
||||||
|
|
||||||
const onBeforeDestroy = useCallback(() => {
|
const onBeforeDestroy = useCallback(() => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
dispatch(clearQueue())
|
dispatch(clearQueue())
|
||||||
@ -272,6 +278,7 @@ const Player = () => {
|
|||||||
onAudioPause={onAudioPause}
|
onAudioPause={onAudioPause}
|
||||||
onAudioEnded={onAudioEnded}
|
onAudioEnded={onAudioEnded}
|
||||||
onAudioVolumeChange={onAudioVolumeChange}
|
onAudioVolumeChange={onAudioVolumeChange}
|
||||||
|
onCoverClick={onCoverClick}
|
||||||
onBeforeDestroy={onBeforeDestroy}
|
onBeforeDestroy={onBeforeDestroy}
|
||||||
getAudioInstance={(instance) => {
|
getAudioInstance={(instance) => {
|
||||||
audioInstance = instance
|
audioInstance = instance
|
||||||
|
Loading…
x
Reference in New Issue
Block a user