diff options
author | Calum Lind <calumlind@gmail.com> | 2018-10-21 14:07:48 +0100 |
---|---|---|
committer | Calum Lind <calumlind@gmail.com> | 2018-10-25 15:14:07 +0100 |
commit | e2c7716ce256e32eb25c6b8e1c4aa7dfedd72b92 (patch) | |
tree | 32578a18783d3e46bcd30e6ae36ede6c3205c102 /deluge/ui/web | |
parent | e6c61c3f8ccae700da1b88e9f1b4dfde1b53ae7f (diff) | |
download | deluge-e2c7716ce256e32eb25c6b8e1c4aa7dfedd72b92.tar.gz deluge-e2c7716ce256e32eb25c6b8e1c4aa7dfedd72b92.tar.bz2 deluge-e2c7716ce256e32eb25c6b8e1c4aa7dfedd72b92.zip |
[#1903|UI] Add super seeding option to interfaces
- Fix applying the setting to libtorrent, passing the value without
modification so it decide when to enable it.
- Enable super_seeding option when adding torrents to core.
- Update UIs with option in tabs and add dialogs.
Diffstat (limited to 'deluge/ui/web')
-rw-r--r-- | deluge/ui/web/js/deluge-all/Keys.js | 1 | ||||
-rw-r--r-- | deluge/ui/web/js/deluge-all/add/OptionsTab.js | 12 | ||||
-rw-r--r-- | deluge/ui/web/js/deluge-all/details/OptionsTab.js | 8 |
3 files changed, 20 insertions, 1 deletions
diff --git a/deluge/ui/web/js/deluge-all/Keys.js b/deluge/ui/web/js/deluge-all/Keys.js index 28a18a627..25cf38bc3 100644 --- a/deluge/ui/web/js/deluge-all/Keys.js +++ b/deluge/ui/web/js/deluge-all/Keys.js @@ -127,6 +127,7 @@ Deluge.Keys = { 'prioritize_first_last', 'move_completed', 'move_completed_path', + 'super_seeding', ], }; diff --git a/deluge/ui/web/js/deluge-all/add/OptionsTab.js b/deluge/ui/web/js/deluge-all/add/OptionsTab.js index 66a53127d..e897b1783 100644 --- a/deluge/ui/web/js/deluge-all/add/OptionsTab.js +++ b/deluge/ui/web/js/deluge-all/add/OptionsTab.js @@ -113,7 +113,7 @@ Deluge.add.OptionsTab = Ext.extend(Ext.form.FormPanel, { ); fieldset = panel.add({ - title: _('General'), + // title: _('General'), border: false, autoHeight: true, defaultType: 'checkbox', @@ -155,6 +155,15 @@ Deluge.add.OptionsTab = Ext.extend(Ext.form.FormPanel, { }) ); this.optionsManager.bind( + 'super_seeding', + fieldset.add({ + name: 'super_seeding', + boxLabel: _('Super Seed'), + fieldLabel: '', + labelSeparator: '', + }) + ); + this.optionsManager.bind( 'pre_allocate_storage', fieldset.add({ name: 'pre_allocate_storage', @@ -197,6 +206,7 @@ Deluge.add.OptionsTab = Ext.extend(Ext.form.FormPanel, { prioritize_first_last_pieces: config.prioritize_first_last_pieces, seed_mode: false, + super_seeding: false, }; this.optionsManager.options = options; this.optionsManager.resetAll(); diff --git a/deluge/ui/web/js/deluge-all/details/OptionsTab.js b/deluge/ui/web/js/deluge-all/details/OptionsTab.js index 669fbf905..b11486bfd 100644 --- a/deluge/ui/web/js/deluge-all/details/OptionsTab.js +++ b/deluge/ui/web/js/deluge-all/details/OptionsTab.js @@ -48,6 +48,7 @@ Deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, { move_completed_path: '', private: false, prioritize_first_last: false, + super_seeding: false, }, }); @@ -287,6 +288,13 @@ Deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, { id: 'prioritize_first_last', }); + this.fields.super_seeding = this.fieldsets.general.add({ + fieldLabel: '', + labelSeparator: '', + boxLabel: _('Super Seeding'), + id: 'super_seeding', + }); + // Bind the fields so the options manager can manage them. for (var id in this.fields) { this.optionsManager.bind(id, this.fields[id]); |