Check permissions before adding songs to playlists

This commit is contained in:
Deluan
2021-10-02 13:12:06 -04:00
parent 6c3e45de41
commit 9c29ee3651
6 changed files with 38 additions and 26 deletions
+3 -2
View File
@@ -14,6 +14,7 @@ import clsx from 'clsx'
import { useDrag } from 'react-dnd'
import { playTracks } from '../actions'
import { AlbumContextMenu } from '../common'
import { DraggableTypes } from '../consts'
const useStyles = makeStyles({
subtitle: {
@@ -106,7 +107,7 @@ export const SongDatagridRow = ({
)
const [, dragDiscRef] = useDrag(() => ({
type: 'disc',
type: DraggableTypes.DISC,
item: {
discs: [{ albumId: record.albumId, discNumber: record.discNumber }],
},
@@ -114,7 +115,7 @@ export const SongDatagridRow = ({
}))
const [, dragSongRef] = useDrag(() => ({
type: 'song',
type: DraggableTypes.SONG,
item: { ids: [record.id] },
options: { dropEffect: 'copy' },
}))