Always show song context menu on tablets

This commit is contained in:
Deluan 2020-05-26 22:02:15 -04:00
parent 7170485d08
commit 26dba27778
2 changed files with 12 additions and 15 deletions

View File

@ -131,7 +131,7 @@ const AlbumSongs = (props) => {
{...controllerProps}
hasBulkActions={hasBulkActions}
multiDisc={multiDisc}
contextAlwaysVisible={isXsmall}
contextAlwaysVisible={!isDesktop}
>
{isDesktop && (
<TextField

View File

@ -76,6 +76,7 @@ const SongList = (props) => {
<SongDatagrid
expand={<SongDetails />}
rowClick={(id, basePath, record) => dispatch(setTrack(record))}
contextAlwaysVisible={!isDesktop}
>
<TextField source="title" />
{isDesktop && <AlbumLinkField source="album" />}
@ -86,20 +87,16 @@ const SongList = (props) => {
<FunctionField source="year" render={(r) => r.year || ''} />
)}
<DurationField source="duration" />
{isDesktop ? (
<SongContextMenu
source={'starred'}
label={
<StarBorderIcon
fontSize={'small'}
className={classes.columnIcon}
/>
}
sortBy={'starred DESC, starredAt DESC'}
/>
) : (
<SongContextMenu showStar={false} />
)}
<SongContextMenu
source={'starred'}
sortBy={'starred DESC, starredAt DESC'}
label={
<StarBorderIcon
fontSize={'small'}
className={classes.columnIcon}
/>
}
/>
</SongDatagrid>
)}
</List>