mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-23 15:20:33 +03:00
Adding playlist button to Playlist actions
This commit is contained in:
parent
8549451ee7
commit
8fe335ed97
@ -9,9 +9,10 @@ import {
|
||||
import PlayArrowIcon from '@material-ui/icons/PlayArrow'
|
||||
import ShuffleIcon from '@material-ui/icons/Shuffle'
|
||||
import CloudDownloadOutlinedIcon from '@material-ui/icons/CloudDownloadOutlined'
|
||||
import AddToQueueIcon from '@material-ui/icons/AddToQueue'
|
||||
import QueueMusicIcon from '@material-ui/icons/QueueMusic'
|
||||
import { httpClient } from '../dataProvider'
|
||||
import { playTracks, shuffleTracks } from '../audioplayer'
|
||||
import { addTracks, playTracks, shuffleTracks } from '../audioplayer'
|
||||
import { M3U_MIME_TYPE, REST_URL } from '../consts'
|
||||
import subsonic from '../subsonic'
|
||||
|
||||
@ -31,6 +32,10 @@ const PlaylistActions = ({
|
||||
dispatch(playTracks(data, ids))
|
||||
}, [dispatch, data, ids])
|
||||
|
||||
const handlePlayLater = React.useCallback(() => {
|
||||
dispatch(addTracks(data, ids))
|
||||
}, [dispatch, data, ids])
|
||||
|
||||
const handleShuffle = React.useCallback(() => {
|
||||
dispatch(shuffleTracks(data, ids))
|
||||
}, [dispatch, data, ids])
|
||||
@ -77,6 +82,12 @@ const PlaylistActions = ({
|
||||
>
|
||||
<CloudDownloadOutlinedIcon />
|
||||
</Button>
|
||||
<Button
|
||||
onClick={handlePlayLater}
|
||||
label={translate('resources.album.actions.addToQueue')}
|
||||
>
|
||||
<AddToQueueIcon />
|
||||
</Button>
|
||||
<Button
|
||||
onClick={handleExport}
|
||||
label={translate('resources.playlist.actions.export')}
|
||||
|
Loading…
x
Reference in New Issue
Block a user