[READ-ONLY] Mirror of https://github.com/probablykasper/ferrum. Music library app for Mac, Linux and Windows ferrum.kasper.space
electron linux macos music music-library music-player napi windows
0

Configure Feed

Select the types of activity you want to include in your feed.

Add row click handling

Kasper (May 27, 2025, 9:39 AM +0200) 6bfd4785 1c4ab038

+23 -8
+23 -8
src/components/TrackList.svelte
··· 122 122 group_album_tracks.set(checked) 123 123 }) 124 124 125 - // function double_click(e: MouseEvent, index: number) { 126 - // if (e.button === 0 && check_mouse_shortcut(e)) { 127 - // play_row(index) 128 - // } 129 - // } 125 + function double_click(e: MouseEvent, index: number) { 126 + if (e.button === 0 && check_mouse_shortcut(e)) { 127 + play_row(index) 128 + } 129 + } 130 130 async function delete_tracks(item_ids: ItemId[]) { 131 131 const s = selection.items.size > 1 ? 's' : '' 132 132 const result = await ipc_renderer.invoke('showMessageBox', false, { ··· 558 558 return 559 559 } 560 560 }} 561 + onclick={(e) => { 562 + const row = get_row(e) 563 + if (row) { 564 + selection.handle_click(e, row.index) 565 + } 566 + }} 567 + ondblclick={(e) => { 568 + const row = get_row(e) 569 + if (row) { 570 + double_click(e, row.index) 571 + } 572 + }} 573 + oncontextmenu={(e) => { 574 + const row = get_row(e) 575 + if (row) { 576 + selection.handle_contextmenu(e, row.index) 577 + } 578 + }} 561 579 ></div> 562 580 563 581 <!-- <div ··· 628 646 <div 629 647 class="row" 630 648 role="row" 631 - on:dblclick={(e) => double_click(e, i)} 632 - on:contextmenu={(e) => selection.handle_contextmenu(e, i)} 633 - on:click={(e) => selection.handle_click(e, i)} 634 649 draggable="true" 635 650 on:dragstart={on_drag_start} 636 651 on:dragover={(e) => on_drag_over(e, i)}