From 305f5c245c62f634ff308a7561b0b1def70d8b56 Mon Sep 17 00:00:00 2001 From: Luminarys Date: Mon, 16 Apr 2018 11:18:59 -0700 Subject: [PATCH] Add Rarest/Sequential toggle to torrents --- src/ui/torrent_details.js | 3 +++ src/ui/torrent_options.js | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/ui/torrent_details.js b/src/ui/torrent_details.js index 940f269..1042a4c 100644 --- a/src/ui/torrent_details.js +++ b/src/ui/torrent_details.js @@ -251,8 +251,11 @@ class Torrent extends Component { dispatch(updateResource({ id: torrent.id, priority }))} + strategyChanged={strategy => + dispatch(updateResource({ id: torrent.id, strategy }))} downloadThrottle={torrent.throttle_down} downloadThrottleChanged={throttle_down => dispatch(updateResource({ id: torrent.id, throttle_down }))} diff --git a/src/ui/torrent_options.js b/src/ui/torrent_options.js index ad47d5a..21e5919 100644 --- a/src/ui/torrent_options.js +++ b/src/ui/torrent_options.js @@ -11,6 +11,7 @@ export default class TorrentOptions extends Component { const { id, start, + strategy, startChanged, path, pathChanged, @@ -18,6 +19,7 @@ export default class TorrentOptions extends Component { priorityChanged, downloadThrottle, downloadThrottleChanged, + strategyChanged, uploadThrottle, uploadThrottleChanged, } = this.props; @@ -60,6 +62,18 @@ export default class TorrentOptions extends Component { + + + strategyChanged(e.target.value)} + > + + + +