add basic menus

This commit is contained in:
Feross Aboukhadijeh
2016-03-02 02:09:13 -08:00
parent 589b49e8a8
commit 2ff2031ed1
2 changed files with 228 additions and 6 deletions

View File

@@ -1,12 +1,13 @@
/* global URL, Blob */
// var prettyBytes = require('pretty-bytes')
var torrentPoster = require('./lib/torrent-poster')
var createTorrent = require('create-torrent')
var dragDrop = require('drag-drop')
var electron = require('electron')
var path = require('path')
var throttle = require('throttleit')
var thunky = require('thunky')
var torrentPoster = require('./lib/torrent-poster')
var WebTorrent = require('webtorrent')
var xhr = require('xhr')
@@ -77,6 +78,10 @@ function handler (action, ...args) {
}
}
electron.ipcRenderer.on('action', function (e, action, ...args) {
handler(action, ...args)
})
function onFiles (files) {
// .torrent file = start downloading the torrent
files.filter(isTorrentFile).forEach(addTorrent)