Add "Play Later" action to AlbumContextMenu
This commit is contained in:
@@ -6,7 +6,7 @@ import MoreVertIcon from '@material-ui/icons/MoreVert'
|
||||
import { makeStyles } from '@material-ui/core/styles'
|
||||
import { useDataProvider, useNotify, useTranslate } from 'react-admin'
|
||||
import { useDispatch } from 'react-redux'
|
||||
import { playAlbum, shuffleAlbum } from '../audioplayer'
|
||||
import { addTracks, playAlbum, shuffleAlbum } from '../audioplayer'
|
||||
|
||||
const useStyles = makeStyles({
|
||||
icon: {
|
||||
@@ -27,6 +27,10 @@ const AlbumContextMenu = ({ record, color }) => {
|
||||
label: translate('resources.album.actions.playAll'),
|
||||
action: (data, id) => playAlbum(id, data),
|
||||
},
|
||||
addToQueue: {
|
||||
label: translate('resources.album.actions.addToQueue'),
|
||||
action: (data) => addTracks(Object.values(data)),
|
||||
},
|
||||
shuffle: {
|
||||
label: translate('resources.album.actions.shuffle'),
|
||||
action: (data) => shuffleAlbum(data),
|
||||
|
||||
Reference in New Issue
Block a user