!isFiltered && handleRowMouseEnter(i, e)}
+ onMouseDown={e => handleRowMouseDown(e, realIdx)}
+ onClick={e => {
+ if ((e.target as HTMLElement).closest('button, a, input')) return;
+ if (e.ctrlKey || e.metaKey) {
+ toggleSelect(song.id, i, false);
+ } else if (selectedIds.size > 0) {
+ toggleSelect(song.id, i, e.shiftKey);
+ } else if (orbitActive) {
+ queueHint();
+ } else {
+ playTrack(displayedTracks[i], displayedTracks);
+ }
+ }}
+ onDoubleClick={orbitActive ? e => {
+ if ((e.target as HTMLElement).closest('button, a, input')) return;
+ if (e.ctrlKey || e.metaKey || selectedIds.size > 0) return;
+ addTrackToOrbit(song.id);
+ } : undefined}
+ onContextMenu={e => {
+ e.preventDefault();
+ setContextMenuSongId(song.id);
+ openContextMenu(e.clientX, e.clientY, songToTrack(song), 'album-song', undefined, id, realIdx);
+ }}
+ >
+ {visibleCols.map(colDef => {
+ const inSelectMode = selectedIds.size > 0;
+ switch (colDef.key) {
+ case 'num': return (
+
+
{ e.stopPropagation(); toggleSelect(song.id, i, e.shiftKey); }} />
+ {currentTrack?.id === song.id && isPlaying ? (
+
+ ) : (
+ {i + 1}
+ )}
+
+ );
+ case 'title': return (
+
+
+
+
{song.title}
+
+ );
+ case 'artist': return (
+
+ { if (song.artistId) { e.stopPropagation(); navigate(`/artist/${song.artistId}`); } }}>{song.artist}
+
+ );
+ case 'album': return (
+
+ { if (song.albumId) { e.stopPropagation(); navigate(`/album/${song.albumId}`); } }}>{song.album}
+
+ );
+ case 'favorite': return (
+
+
+
+ );
+ case 'rating': return
handleRate(song.id, r)} />;
+ case 'duration': return {formatDuration(song.duration ?? 0)}
;
+ case 'format': return (
+
+ {(song.suffix || (showBitrate && song.bitRate)) && {codecLabel(song, showBitrate)}}
+
+ );
+ case 'delete': return (
+
+
+
+ );
+ default: return null;
+ }
+ })}
+
+ {!isFiltered && isDragging && dropTargetIdx?.idx === i && !dropTargetIdx.before && (
+