mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-23 10:29:46 +01:00
Add "Play Next" action (finally)
This commit is contained in:
parent
aa133e6b00
commit
7305e3aa17
14 changed files with 130 additions and 23 deletions
|
|
@ -7,7 +7,7 @@ import MenuItem from '@material-ui/core/MenuItem'
|
|||
import MoreVertIcon from '@material-ui/icons/MoreVert'
|
||||
import { makeStyles } from '@material-ui/core/styles'
|
||||
import { useDataProvider, useNotify, useTranslate } from 'react-admin'
|
||||
import { addTracks, playTracks, shuffleTracks } from '../audioplayer'
|
||||
import { playNext, addTracks, playTracks, shuffleTracks } from '../audioplayer'
|
||||
import { openAddToPlaylist } from '../dialogs/dialogState'
|
||||
import subsonic from '../subsonic'
|
||||
import StarButton from './StarButton'
|
||||
|
|
@ -43,6 +43,11 @@ const ContextMenu = ({
|
|||
label: 'resources.album.actions.playAll',
|
||||
action: (data, ids) => dispatch(playTracks(data, ids)),
|
||||
},
|
||||
playNext: {
|
||||
needData: true,
|
||||
label: 'resources.album.actions.playNext',
|
||||
action: (data, ids) => dispatch(playNext(data, ids)),
|
||||
},
|
||||
addToQueue: {
|
||||
needData: true,
|
||||
label: 'resources.album.actions.addToQueue',
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { useTranslate } from 'react-admin'
|
|||
import { IconButton, Menu, MenuItem } from '@material-ui/core'
|
||||
import { makeStyles } from '@material-ui/core/styles'
|
||||
import MoreVertIcon from '@material-ui/icons/MoreVert'
|
||||
import { addTracks, setTrack } from '../audioplayer'
|
||||
import { playNext, addTracks, setTrack } from '../audioplayer'
|
||||
import { openAddToPlaylist } from '../dialogs/dialogState'
|
||||
import subsonic from '../subsonic'
|
||||
import StarButton from './StarButton'
|
||||
|
|
@ -35,6 +35,10 @@ const SongContextMenu = ({
|
|||
label: 'resources.song.actions.playNow',
|
||||
action: (record) => dispatch(setTrack(record)),
|
||||
},
|
||||
playNext: {
|
||||
label: 'resources.song.actions.playNext',
|
||||
action: (record) => dispatch(playNext({ [record.id]: record })),
|
||||
},
|
||||
addToQueue: {
|
||||
label: 'resources.song.actions.addToQueue',
|
||||
action: (record) => dispatch(addTracks({ [record.id]: record })),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue