add context menu with share/save actions

This commit is contained in:
Dan Flettre
2016-03-26 22:23:50 -05:00
parent ba74aac7bf
commit a91dc4e1ea
2 changed files with 45 additions and 1 deletions

View File

@@ -47,7 +47,9 @@ function TorrentList (state, dispatch) {
if (isSelected) classes.push('selected')
classes = classes.join(' ')
return hx`
<div style=${style} class=${classes} onclick=${() => dispatch('toggleSelectTorrent', infoHash)}>
<div style=${style} class=${classes}
oncontextmenu=${() => dispatch('openTorrentContextMenu', torrentSummary)}
onclick=${() => dispatch('toggleSelectTorrent', infoHash)}>
${renderTorrentMetadata(torrent, torrentSummary)}
${renderTorrentButtons(torrentSummary)}
${isSelected ? renderTorrentDetails(torrent, torrentSummary) : ''}