double click album to play
This commit is contained in:
@@ -264,6 +264,15 @@ export class CoverGrid extends LitElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async onAlbumDblClick(album: library.Album) {
|
||||||
|
const filePaths = await this.getAlbumFilePaths(album);
|
||||||
|
|
||||||
|
if (filePaths.length === 0) return;
|
||||||
|
|
||||||
|
this.selectedAlbums = new Set();
|
||||||
|
this.queue.setQueue(filePaths, 0);
|
||||||
|
}
|
||||||
|
|
||||||
private onAlbumContextMenu(e: MouseEvent, album: library.Album) {
|
private onAlbumContextMenu(e: MouseEvent, album: library.Album) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@@ -403,6 +412,7 @@ export class CoverGrid extends LitElement {
|
|||||||
aria-label="${album.Name} by ${album.ArtistName}"
|
aria-label="${album.Name} by ${album.ArtistName}"
|
||||||
@click=${(e: MouseEvent) =>
|
@click=${(e: MouseEvent) =>
|
||||||
this.onAlbumClick(e, album, index)}
|
this.onAlbumClick(e, album, index)}
|
||||||
|
@dblclick=${() => this.onAlbumDblClick(album)}
|
||||||
@keydown=${(e: KeyboardEvent) =>
|
@keydown=${(e: KeyboardEvent) =>
|
||||||
this.onAlbumKeydown(e, album, index)}
|
this.onAlbumKeydown(e, album, index)}
|
||||||
@contextmenu=${(e: MouseEvent) =>
|
@contextmenu=${(e: MouseEvent) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user