mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 12:40:20 +02:00
handle context menu on playlist songs
This commit is contained in:
@@ -22,7 +22,11 @@ export const PlayAction = ({ ids, itemType, songs }: PlayActionProps) => {
|
|||||||
(playType: Play) => {
|
(playType: Play) => {
|
||||||
if (ids.length === 0 || !serverId) return;
|
if (ids.length === 0 || !serverId) return;
|
||||||
|
|
||||||
if (itemType === LibraryItem.SONG) {
|
if (
|
||||||
|
itemType === LibraryItem.SONG ||
|
||||||
|
itemType === LibraryItem.PLAYLIST_SONG ||
|
||||||
|
itemType === LibraryItem.QUEUE_SONG
|
||||||
|
) {
|
||||||
player.addToQueueByData(songs || [], playType);
|
player.addToQueueByData(songs || [], playType);
|
||||||
} else {
|
} else {
|
||||||
player.addToQueueByFetch(serverId, ids, itemType, playType);
|
player.addToQueueByFetch(serverId, ids, itemType, playType);
|
||||||
|
|||||||
@@ -26,19 +26,19 @@ export const PlaylistSongContextMenu = ({ items, type }: PlaylistSongContextMenu
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ContextMenu.Content
|
<ContextMenu.Content
|
||||||
bottomStickyContent={<ContextMenuPreview items={items} itemType={LibraryItem.SONG} />}
|
bottomStickyContent={<ContextMenuPreview items={items} itemType={type} />}
|
||||||
>
|
>
|
||||||
<PlayAction ids={ids} itemType={LibraryItem.SONG} />
|
<PlayAction ids={ids} itemType={type} songs={items} />
|
||||||
<ContextMenu.Divider />
|
<ContextMenu.Divider />
|
||||||
<RemoveFromPlaylistAction items={items} />
|
<RemoveFromPlaylistAction items={items} />
|
||||||
<ContextMenu.Divider />
|
<ContextMenu.Divider />
|
||||||
<AddToPlaylistAction items={ids} itemType={LibraryItem.SONG} />
|
<AddToPlaylistAction items={ids} itemType={type} />
|
||||||
<ContextMenu.Divider />
|
<ContextMenu.Divider />
|
||||||
<SetFavoriteAction ids={ids} itemType={LibraryItem.SONG} />
|
<SetFavoriteAction ids={ids} itemType={type} />
|
||||||
<SetRatingAction ids={ids} itemType={LibraryItem.SONG} />
|
<SetRatingAction ids={ids} itemType={type} />
|
||||||
<ContextMenu.Divider />
|
<ContextMenu.Divider />
|
||||||
<DownloadAction ids={ids} />
|
<DownloadAction ids={ids} />
|
||||||
<ShareAction ids={ids} itemType={LibraryItem.SONG} />
|
<ShareAction ids={ids} itemType={type} />
|
||||||
<ContextMenu.Divider />
|
<ContextMenu.Divider />
|
||||||
<GoToAction items={items} />
|
<GoToAction items={items} />
|
||||||
<ContextMenu.Divider />
|
<ContextMenu.Divider />
|
||||||
|
|||||||
Reference in New Issue
Block a user