mirror of
https://github.com/markuryy/shark.git
synced 2025-12-12 11:41:02 +00:00
refactor(ui): update albums interaction to double click for consistency
This commit is contained in:
@@ -124,8 +124,11 @@
|
||||
selectedArtistIndex = index;
|
||||
}
|
||||
|
||||
function handleAlbumClick(album: Album, index: number) {
|
||||
function handleAlbumClick(index: number) {
|
||||
selectedAlbumIndex = index;
|
||||
}
|
||||
|
||||
function handleAlbumDoubleClick(album: Album) {
|
||||
const artistEncoded = encodeURIComponent(album.artist);
|
||||
const albumEncoded = encodeURIComponent(album.title);
|
||||
goto(`/albums/${artistEncoded}/${albumEncoded}`);
|
||||
@@ -238,7 +241,8 @@
|
||||
{#each albums as album, i}
|
||||
<tr
|
||||
class:highlighted={selectedAlbumIndex === i}
|
||||
onclick={() => handleAlbumClick(album, i)}
|
||||
onclick={() => handleAlbumClick(i)}
|
||||
ondblclick={() => handleAlbumDoubleClick(album)}
|
||||
>
|
||||
<td class="cover-cell">
|
||||
{#if album.coverArtPath}
|
||||
|
||||
Reference in New Issue
Block a user