Add Share to Context menus, also share artist

This commit is contained in:
Deluan
2023-01-24 13:35:51 -05:00
parent 051e9c556d
commit 433da37982
5 changed files with 50 additions and 8 deletions

View File

@@ -14,6 +14,7 @@ import {
openExtendedInfoDialog,
openDownloadMenu,
DOWNLOAD_MENU_SONG,
openShareMenu,
} from '../actions'
import { LoveButton } from './LoveButton'
import config from '../config'
@@ -63,11 +64,16 @@ export const SongContextMenu = ({
})
),
},
share: {
enabled: config.devEnableShare,
label: translate('ra.action.share'),
action: (record) => {
dispatch(openShareMenu([record.id], 'song', record.title))
},
},
download: {
enabled: config.enableDownloads,
label: `${translate('resources.song.actions.download')} (${formatBytes(
record.size
)})`,
label: `${translate('ra.action.download')} (${formatBytes(record.size)})`,
action: (record) => {
dispatch(openDownloadMenu(record, DOWNLOAD_MENU_SONG))
},