Browse Source

Add WebUI Random port button and proxy unencrypted password notice

adaptive-webui-19844
Thomas Piccirello 6 years ago
parent
commit
b9229babfc
  1. 14
      src/webui/www/private/preferences_content.html

14
src/webui/www/private/preferences_content.html

@ -159,7 +159,9 @@
<fieldset class="settings"> <fieldset class="settings">
<legend>QBT_TR(Listening Port)QBT_TR[CONTEXT=OptionsDialog]</legend> <legend>QBT_TR(Listening Port)QBT_TR[CONTEXT=OptionsDialog]</legend>
<label for="port_value">QBT_TR(Port used for incoming connections:)QBT_TR[CONTEXT=OptionsDialog]</label> <label for="port_value">QBT_TR(Port used for incoming connections:)QBT_TR[CONTEXT=OptionsDialog]</label>
<input type="text" id="port_value" style="width: 4em;" /><br/> <input type="text" id="port_value" style="width: 4em;" />
<button style="margin-left: 1em;" onclick="generateRandomPort();">Random</button>
<br/>
<input type="checkbox" id="upnp_checkbox" /> <input type="checkbox" id="upnp_checkbox" />
<label for="upnp_checkbox">QBT_TR(Use UPnP / NAT-PMP port forwarding from my router)QBT_TR[CONTEXT=OptionsDialog]</label><br/> <label for="upnp_checkbox">QBT_TR(Use UPnP / NAT-PMP port forwarding from my router)QBT_TR[CONTEXT=OptionsDialog]</label><br/>
<input type="checkbox" id="random_port_checkbox" /> <input type="checkbox" id="random_port_checkbox" />
@ -262,6 +264,9 @@
</td> </td>
</tr> </tr>
</table> </table>
<div class="formRow">
<span>Info: The password is saved unencrypted</span>
</div>
</fieldset> </fieldset>
</fieldset> </fieldset>
@ -891,6 +896,13 @@
} }
}; };
generateRandomPort = function() {
var min = 1024;
var max = 65535;
var port = Math.floor(Math.random() * (max - min + 1) + min);
$('port_value').setProperty('value', port);
};
time_padding = function(val) { time_padding = function(val) {
var ret = val.toString(); var ret = val.toString();
if (ret.length == 1) if (ret.length == 1)

Loading…
Cancel
Save