Replace expanded with a dialog (#1258)

* Replace expanded with a dialog

* Change `info` label to "Get Info"

* Rename things for consistency

Co-authored-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Samarjeet
2021-09-21 06:00:43 +05:30
committed by GitHub
parent 15ae3d47cf
commit 0c0bd2967d
18 changed files with 223 additions and 89 deletions
+11
View File
@@ -14,6 +14,7 @@ import {
playTracks,
shuffleTracks,
openAddToPlaylist,
openExtendedInfoDialog,
} from '../actions'
import subsonic from '../subsonic'
import { LoveButton } from './LoveButton'
@@ -36,6 +37,7 @@ const ContextMenu = ({
color,
className,
songQueryParams,
hideInfo,
}) => {
const classes = useStyles({ color })
const dataProvider = useDataProvider()
@@ -83,6 +85,14 @@ const ContextMenu = ({
)})`,
action: () => subsonic.download(record.id),
},
...(!hideInfo && {
info: {
enabled: true,
needData: true,
label: translate('resources.album.actions.info'),
action: () => dispatch(openExtendedInfoDialog(record)),
},
}),
}
const handleClick = (e) => {
@@ -195,6 +205,7 @@ export const ArtistContextMenu = (props) =>
props.record ? (
<ContextMenu
{...props}
hideInfo={true}
resource={'artist'}
songQueryParams={{
pagination: { page: 1, perPage: 200 },