Add "Show in Folder" to context menu

Based on @watson's PR #463.

Differences:

- Remove the "Open Folder" link from expanded torrent view.
- Use showItemInFolder instead of openItem electron API
- Add a separator
- Use IPC to invoke electron.shell.showItemInFolder from main process
This commit is contained in:
Feross Aboukhadijeh
2016-05-09 01:31:41 +02:00
parent 8ebb2349dd
commit facb07cbb1
3 changed files with 29 additions and 24 deletions

View File

@@ -167,7 +167,6 @@ function TorrentList (state) {
// Show files, per-file download status and play buttons, and so on
function renderTorrentDetails (torrentSummary) {
var infoHash = torrentSummary.infoHash
var filesElement
if (!torrentSummary.files) {
// We don't know what files this torrent contains
@@ -182,10 +181,6 @@ function TorrentList (state) {
filesElement = hx`
<div class='files'>
<strong>Files</strong>
<span class='open-folder'
onclick=${dispatcher('openFolder', infoHash)}>
Open folder
</span>
<table>
${fileRows}
</table>