Some fixes to #772 (Add play button to song table) (#784)

* Add play button to song table album cover, like it is in grid

* Fix: play button caused error for albums and artists tables

* Fix: play button caused error for some other tables
This commit is contained in:
Egor 2024-10-10 03:40:30 +03:00 committed by GitHub
parent ad34d8553e
commit 5e628d96c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 0 deletions

View file

@ -464,6 +464,7 @@ export const AlbumDetailContent = ({ tableRef, background }: AlbumDetailContentP
context={{ context={{
currentSong, currentSong,
isFocused, isFocused,
itemType: LibraryItem.SONG,
onCellContextMenu, onCellContextMenu,
status, status,
}} }}

View file

@ -550,6 +550,9 @@ export const AlbumArtistDetailContent = ({ background }: AlbumArtistDetailConten
suppressLoadingOverlay suppressLoadingOverlay
suppressRowDrag suppressRowDrag
columnDefs={topSongsColumnDefs} columnDefs={topSongsColumnDefs}
context={{
itemType: LibraryItem.SONG,
}}
enableCellChangeFlash={false} enableCellChangeFlash={false}
getRowId={(data) => data.data.uniqueId} getRowId={(data) => data.data.uniqueId}
rowData={topSongs} rowData={topSongs}

View file

@ -257,6 +257,7 @@ export const PlayQueue = forwardRef(({ type }: QueueProps, ref: Ref<any>) => {
context={{ context={{
currentSong, currentSong,
isFocused, isFocused,
itemType: LibraryItem.SONG,
onCellContextMenu, onCellContextMenu,
status, status,
}} }}

View file

@ -301,6 +301,7 @@ export const PlaylistDetailSongListContent = ({ songs, tableRef }: PlaylistDetai
context={{ context={{
currentSong, currentSong,
isFocused, isFocused,
itemType: LibraryItem.SONG,
onCellContextMenu: handleContextMenu, onCellContextMenu: handleContextMenu,
status, status,
}} }}

View file

@ -66,6 +66,7 @@ export const SimilarSongsList = ({ count, fullScreen, song }: SimilarSongsListPr
columnDefs={columnDefs} columnDefs={columnDefs}
context={{ context={{
count, count,
itemType: LibraryItem.SONG,
onCellContextMenu, onCellContextMenu,
song, song,
}} }}