add the extra fields to bandwidth and network
add the required changes to the css and javascript
This commit is contained in:
parent
5eaf9dd259
commit
f9dadd215d
|
@ -1,16 +1,51 @@
|
||||||
<form>
|
<form id="bandwidth_preferences">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>$_('Global Bandwidth Usage')</legend>
|
<legend>$_('Global Bandwidth Usage')</legend>
|
||||||
<label>$_('Max Connections'):</label><input type="text" name="max_connections_global" class="mooui-spinner" /><br/>
|
<label>$_('Max Connections'):</label>
|
||||||
<label>$_('Max Upload Slots'):</label><input type="text" name="max_upload_slots_global" class="mooui-spinner" /><br/>
|
<input type="text" name="max_connections_global" class="mooui-spinner" />
|
||||||
<label>$_('Max Download Speed') (KiB/s):</label><input type="text" name="max_download_speed" class="mooui-spinner" /><br/>
|
<br/>
|
||||||
<label>$_('Max Upload Speed') (KiB/s):</label><input type="text" name="max_upload_speed" class="mooui-spinner" /><br/>
|
|
||||||
|
<label>$_('Max Upload Slots'):</label>
|
||||||
|
<input type="text" name="max_upload_slots_global" class="mooui-spinner" />
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<label>$_('Max Download Speed') (KiB/s):</label>
|
||||||
|
<input type="text" name="max_download_speed" class="mooui-spinner" />
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<label>$_('Max Upload Speed') (KiB/s):</label>
|
||||||
|
<input type="text" name="max_upload_speed" class="mooui-spinner" />
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<label>$_('Max Half-Open Connections'):</label>
|
||||||
|
<input type="text" name="max_half_open_connections" class="mooui-spinner" />
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<label>$_('Max Conection Attempts per Second'):</label>
|
||||||
|
<input type="text" name="max_connections_per_second" class="mooui-spinner" />
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<label class="fluid">
|
||||||
|
<input type="checkbox" name="ignore_limits_on_local_network"/>
|
||||||
|
$_('Ignore limits on local network')
|
||||||
|
</label><br/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>$_('Per Torrent Bandwidth Usage')</legend>
|
<legend>$_('Per Torrent Bandwidth Usage')</legend>
|
||||||
<label>$_('Max Connections'):</label><input type="text" name="max_connections_per_torrent" class="mooui-spinner" /><br/>
|
<label>$_('Max Connections'):</label>
|
||||||
<label>$_('Max Upload Slots'):</label><input type="text" name="max_upload_slots_per_torrent" class="mooui-spinner" /><br/>
|
<input type="text" name="max_connections_per_torrent" class="mooui-spinner" />
|
||||||
<label>$_('Max Download Speed') (KiB/s):</label><input type="text" name="max_download_speed_per_torrent" class="mooui-spinner" /><br/>
|
<br/>
|
||||||
<label>$_('Max Upload Speed') (KiB/s):</label><input type="text" name="max_upload_speed_per_torrent" class="mooui-spinner" /><br/>
|
|
||||||
|
<label>$_('Max Upload Slots'):</label>
|
||||||
|
<input type="text" name="max_upload_slots_per_torrent" class="mooui-spinner" />
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<label>$_('Max Download Speed') (KiB/s):</label>
|
||||||
|
<input type="text" name="max_download_speed_per_torrent" class="mooui-spinner" />
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<label>$_('Max Upload Speed') (KiB/s):</label>
|
||||||
|
<input type="text" name="max_upload_speed_per_torrent" class="mooui-spinner" />
|
||||||
|
<br/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,40 +1,94 @@
|
||||||
<form>
|
<form>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>$_('Ports')</legend>
|
<legend>$_('Incoming Ports')</legend>
|
||||||
<label class="fluid">$_('From'):</label><input type="text" name="start_listen_port" class="mooui-spinner" /><label class="fluid">$_('To'):</label><input type="text" name="end_listen_port" class="mooui-spinner" /><br/>
|
<label>
|
||||||
<label><input type="checkbox" name="random_port" />$_('Use Random Ports')</label>
|
<input type="checkbox" name="random_port" />
|
||||||
|
$_('Use Random Ports')
|
||||||
|
</label><br/>
|
||||||
|
|
||||||
|
<label class="fluid">
|
||||||
|
$_('From'):
|
||||||
|
</label>
|
||||||
|
<input type="text" name="start_listen_port" class="mooui-spinner" />
|
||||||
|
<label class="fluid">
|
||||||
|
$_('To'):
|
||||||
|
</label>
|
||||||
|
<input type="text" name="end_listen_port" class="mooui-spinner" /><br/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>$_('DHT')</legend>
|
<legend>$_('Outgoing Ports')</legend>
|
||||||
<label><input type="checkbox" name="dht" />$_('Enable Mainline DHT')</label>
|
<label>
|
||||||
|
<input type="checkbox" name="random_outgoing_ports" />
|
||||||
|
$_('Use Random Ports')
|
||||||
|
</label><br/>
|
||||||
|
|
||||||
|
<label class="fluid">
|
||||||
|
$_('From'):
|
||||||
|
</label>
|
||||||
|
<input type="text" name="start_outgoing_port" class="mooui-spinner" />
|
||||||
|
<label class="fluid">
|
||||||
|
$_('To'):
|
||||||
|
</label>
|
||||||
|
<input type="text" name="end_outgoing_port" class="mooui-spinner" /><br/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<legend>$_('TOS')</legend>
|
||||||
|
<label>$_('Peer TOS Byte'):</label>
|
||||||
|
<input type="text" name="peer_tos" />
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>$_('Network Extras')</legend>
|
<legend>$_('Network Extras')</legend>
|
||||||
<label><input type="checkbox" name="upnp" />$_('UPnP')</label>
|
<label>
|
||||||
<label><input type="checkbox" name="natpmp" />$_('NAT-PMP')</label>
|
<input type="checkbox" name="upnp" />
|
||||||
<label><input type="checkbox" name="utpex" />$_('Peer Exchange')</label>
|
$_('UPnP')
|
||||||
<label><input type="checkbox" name="lsd" />$_('LSD')</label>
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="natpmp" />
|
||||||
|
$_('NAT-PMP')
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="dht" />
|
||||||
|
$_('Enable Mainline DHT')
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="utpex" />
|
||||||
|
$_('Peer Exchange')
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="lsd" />
|
||||||
|
$_('LSD')
|
||||||
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset id="encryption">
|
||||||
<legend>$_('Encryption')</legend>
|
<legend>$_('Encryption')</legend>
|
||||||
|
|
||||||
<label>$_('Inbound'):</label>
|
<label>$_('Inbound'):</label>
|
||||||
<select name="enc_in_policy">
|
<select name="enc_in_policy">
|
||||||
<option value="0">$_('Forced')</option>
|
<option value="0">$_('Forced')</option>
|
||||||
<option value="1">$_('Enabled')</option>
|
<option value="1">$_('Enabled')</option>
|
||||||
<option value="2">$_('Disabled')</option>
|
<option value="2">$_('Disabled')</option>
|
||||||
</select><br/>
|
</select>
|
||||||
|
|
||||||
<label>$_('Outbound'):</label>
|
<label>$_('Outbound'):</label>
|
||||||
<select name="enc_out_policy">
|
<select name="enc_out_policy">
|
||||||
<option value="0">$_('Forced')</option>
|
<option value="0">$_('Forced')</option>
|
||||||
<option value="1">$_('Enabled')</option>
|
<option value="1">$_('Enabled')</option>
|
||||||
<option value="2">$_('Disabled')</option>
|
<option value="2">$_('Disabled')</option>
|
||||||
</select><br/>
|
</select><br/>
|
||||||
|
|
||||||
<label>$_('Level'):</label>
|
<label>$_('Level'):</label>
|
||||||
<select name="enc_level">
|
<select name="enc_level">
|
||||||
<option value="0">$_('Handshake')</option>
|
<option value="0">$_('Handshake')</option>
|
||||||
<option value="1">$_('Full Stream')</option>
|
<option value="1">$_('Full Stream')</option>
|
||||||
<option value="2">$_('Either')</option>
|
<option value="2">$_('Either')</option>
|
||||||
</select><br/>
|
</select>
|
||||||
<label><input type="checkbox" name="enc_prefer_rc4" />$_('Encrypt entire stream')</label>
|
|
||||||
|
<label class="fluid">
|
||||||
|
<input type="checkbox" name="enc_prefer_rc4" />
|
||||||
|
$_('Encrypt entire stream')
|
||||||
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -929,6 +929,7 @@ Deluge.Widgets.PreferencesWindow = new Class({
|
||||||
this.categories.each(function(category) {
|
this.categories.each(function(category) {
|
||||||
config = $merge(config, category.getConfig());
|
config = $merge(config, category.getConfig());
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($defined(config['end_listen_port']) || $defined(config['start_listen_port'])) {
|
if ($defined(config['end_listen_port']) || $defined(config['start_listen_port'])) {
|
||||||
var startport = $pick(config['start_listen_port'], this.config['listen_ports'][0]);
|
var startport = $pick(config['start_listen_port'], this.config['listen_ports'][0]);
|
||||||
var endport = $pick(config['end_listen_port'], this.config['listen_ports'][1]);
|
var endport = $pick(config['end_listen_port'], this.config['listen_ports'][1]);
|
||||||
|
@ -936,6 +937,15 @@ Deluge.Widgets.PreferencesWindow = new Class({
|
||||||
delete config['start_listen_port'];
|
delete config['start_listen_port'];
|
||||||
config['listen_ports'] = [startport, endport];
|
config['listen_ports'] = [startport, endport];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($defined(config['end_outgoing_port']) || $defined(config['start_outgoing_port'])) {
|
||||||
|
var startport = $pick(config['start_outgoing_port'], this.config['outgoing_ports'][0]);
|
||||||
|
var endport = $pick(config['end_outgoing_port'], this.config['outgoing_ports'][1]);
|
||||||
|
delete config['end_outgoing_port'];
|
||||||
|
delete config['start_outgoing_port'];
|
||||||
|
config['outgoing_ports'] = [startport, endport];
|
||||||
|
}
|
||||||
|
|
||||||
Deluge.Client.set_config(config, {
|
Deluge.Client.set_config(config, {
|
||||||
onSuccess: function(e) {
|
onSuccess: function(e) {
|
||||||
this.hide();
|
this.hide();
|
||||||
|
@ -952,6 +962,9 @@ Deluge.Widgets.PreferencesWindow = new Class({
|
||||||
// in order to not have to modify the generic preferences class.
|
// in order to not have to modify the generic preferences class.
|
||||||
this.config['start_listen_port'] = this.config['listen_ports'][0];
|
this.config['start_listen_port'] = this.config['listen_ports'][0];
|
||||||
this.config['end_listen_port'] = this.config['listen_ports'][1];
|
this.config['end_listen_port'] = this.config['listen_ports'][1];
|
||||||
|
|
||||||
|
this.config['start_outgoing_port'] = this.config['outgoing_ports'][0];
|
||||||
|
this.config['end_outgoing_port'] = this.config['outgoing_ports'][1];
|
||||||
|
|
||||||
// Iterate through the pages and set the fields
|
// Iterate through the pages and set the fields
|
||||||
this.categories.each(function(category) {
|
this.categories.each(function(category) {
|
||||||
|
|
|
@ -282,6 +282,22 @@ form br {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#preferences #bandwidth_preferences label {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#preferences #encryption label {
|
||||||
|
width: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#preferences #encryption label.fluid {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#preferences #encryption select {
|
||||||
|
width: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
.deluge-prefs-active {
|
.deluge-prefs-active {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
@ -295,3 +311,7 @@ label.fluid {
|
||||||
width: auto;
|
width: auto;
|
||||||
margin-right: 30px;
|
margin-right: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.deluge-prefs-page {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
|
@ -133,13 +133,17 @@ html, body {
|
||||||
|
|
||||||
.mooui-window-content #preferences .categories {
|
.mooui-window-content #preferences .categories {
|
||||||
float: left;
|
float: left;
|
||||||
width: 130px;
|
width: 100px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mooui-window-content #preferences .pref_pages h3 {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.mooui-window-content #preferences .pref_pages {
|
.mooui-window-content #preferences .pref_pages {
|
||||||
float: left;
|
float: left;
|
||||||
width: 350px;
|
width: 380px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mooui-window-content #preferences .categories ul {
|
.mooui-window-content #preferences .categories ul {
|
||||||
|
|
Loading…
Reference in New Issue