Make SmartPlaylists read-only

This commit is contained in:
Deluan
2021-10-22 21:11:44 -04:00
committed by Deluan Quintão
parent d169f54e7d
commit 2e2a647e67
9 changed files with 54 additions and 26 deletions
+3 -2
View File
@@ -10,7 +10,8 @@ import { makeStyles } from '@material-ui/core/styles'
import PlaylistDetails from './PlaylistDetails'
import PlaylistSongs from './PlaylistSongs'
import PlaylistActions from './PlaylistActions'
import { Title, isReadOnly } from '../common'
import { Title, canChangeTracks } from '../common'
const useStyles = makeStyles(
(theme) => ({
playlistActions: {
@@ -42,7 +43,7 @@ const PlaylistShowLayout = (props) => {
>
<PlaylistSongs
{...props}
readOnly={isReadOnly(record.owner)}
readOnly={!canChangeTracks(record)}
title={<Title subTitle={record.name} />}
actions={
<PlaylistActions