Refactor main.js: fix Create Torrent modal

This commit is contained in:
DC
2016-07-08 11:57:01 -07:00
parent 7050ee849b
commit 1668c4c614
3 changed files with 11 additions and 13 deletions

View File

@@ -55,6 +55,13 @@ module.exports = class TorrentListController {
findFilesRecursive(files, (allFiles) => this.showCreateTorrent(allFiles))
}
// Switches between the advanced and simple Create Torrent UI
toggleCreateTorrentAdvanced () {
var info = this.state.location.current()
if (info.url !== 'create-torrent') return
info.showAdvanced = !info.showAdvanced
}
// Creates a new torrent and start seeeding
createTorrent (options) {
var state = this.state