Make add button accept non .torrent files

This commit is contained in:
Mathias Rasmussen
2016-05-31 03:04:02 +02:00
parent 1b8f180255
commit 556d0cb1c5
4 changed files with 25 additions and 2 deletions

View File

@@ -227,6 +227,9 @@ function dispatch (action, ...args) {
if (action === 'openTorrentFile') {
ipcRenderer.send('openTorrentFile') /* open torrent file */
}
if (action === 'openAddFiles') {
ipcRenderer.send('openAddFiles') /* add files with dialog */
}
if (action === 'showCreateTorrent') {
showCreateTorrent(args[0] /* paths */)
}

View File

@@ -39,7 +39,7 @@ function Header (state) {
<i
class='icon add'
title='Add torrent'
onclick=${dispatcher('openTorrentFile')}>
onclick=${dispatcher('openAddFiles')}>
add
</i>
`