Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(common): Hide Share/Get Info items in disc context menu - #3204 #3209

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(common): Hide Share/Get Info items in disc context menu - #3204
Signed-off-by: Sunny <[email protected]>
  • Loading branch information
TheLastZombie committed Aug 26, 2024
commit cdef387375d894bf688d7163375ae9fc03592023
17 changes: 10 additions & 7 deletions ui/src/common/ContextMenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 40,7 @@ const ContextMenu = ({
color,
className,
songQueryParams,
hideShare,
hideInfo,
}) => {
const classes = useStyles({ color })
Expand Down Expand Up @@ -80,13 81,15 @@ const ContextMenu = ({
label: translate('resources.album.actions.addToPlaylist'),
action: (data, ids) => dispatch(openAddToPlaylist({ selectedIds: ids })),
},
share: {
enabled: config.enableSharing,
needData: false,
label: translate('ra.action.share'),
action: (record) =>
dispatch(openShareMenu([record.id], resource, record.name)),
},
...(!hideShare && {
share: {
enabled: config.enableSharing,
needData: false,
label: translate('ra.action.share'),
action: (record) =>
dispatch(openShareMenu([record.id], resource, record.name)),
},
}),
download: {
enabled: config.enableDownloads && record.size,
needData: false,
Expand Down
2 changes: 2 additions & 0 deletions ui/src/common/SongDatagrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 136,8 @@ const DiscSubtitleRow = forwardRef(
releaseDate={record.releaseDate}
showLove={false}
className={classes.contextMenu}
hideShare={true}
hideInfo={true}
visible={contextAlwaysVisible}
/>
</TableCell>
Expand Down