Add "PlayNow" button to bulk actions
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import React, { Fragment, useEffect } from 'react'
|
||||
import { useUnselectAll } from 'react-admin'
|
||||
import { playNext } from '../audioplayer'
|
||||
import { playNext, playTracks } from '../audioplayer'
|
||||
import { RiPlayList2Fill } from 'react-icons/ri'
|
||||
import AddToQueueButton from '../song/AddToQueueButton'
|
||||
import PlayArrowIcon from '@material-ui/icons/PlayArrow'
|
||||
import { BatchPlayButton } from '../common'
|
||||
import AddToPlaylistButton from '../song/AddToPlaylistButton'
|
||||
|
||||
export const AlbumSongBulkActions = (props) => {
|
||||
@@ -13,13 +14,19 @@ export const AlbumSongBulkActions = (props) => {
|
||||
}, [])
|
||||
return (
|
||||
<Fragment>
|
||||
<AddToQueueButton
|
||||
<BatchPlayButton
|
||||
{...props}
|
||||
action={playTracks}
|
||||
label={'resources.song.actions.playNow'}
|
||||
icon={<PlayArrowIcon />}
|
||||
/>
|
||||
<BatchPlayButton
|
||||
{...props}
|
||||
action={playNext}
|
||||
label={'resources.song.actions.playNext'}
|
||||
icon={<RiPlayList2Fill />}
|
||||
/>
|
||||
<AddToQueueButton {...props} />
|
||||
<BatchPlayButton {...props} />
|
||||
<AddToPlaylistButton {...props} />
|
||||
</Fragment>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user