Rev3747. Dont show tor meek proxy on configuration page if it's not supported

This commit is contained in:
shortcutme 2019-01-04 14:33:27 +01:00
parent 859c81c81b
commit 1ab9bc40a5
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
4 changed files with 16 additions and 3 deletions

View File

@ -71,6 +71,8 @@ class ConfigStorage extends Class
key: "tor_use_bridges"
type: "checkbox"
description: "Use obfuscated bridge relays to avoid network level Tor block (even slower)"
isHidden: ->
return not Page.server_info.tor_has_meek_bridges
section.items.push
title: "Trackers"

View File

@ -14,6 +14,8 @@ class UiConfig extends ZeroFrame
onOpenWebsocket: =>
@cmd("wrapperSetTitle", "Config - ZeroNet")
@cmd "serverInfo", {}, (server_info) =>
@server_info = server_info
@restart_loading = false
@updateConfig()

View File

@ -1383,7 +1383,10 @@
title: "Use Tor bridges",
key: "tor_use_bridges",
type: "checkbox",
description: "Use obfuscated bridge relays to avoid network level Tor block (even slower)"
description: "Use obfuscated bridge relays to avoid network level Tor block (even slower)",
isHidden: function() {
return !Page.server_info.tor_has_meek_bridges;
}
});
section.items.push({
title: "Trackers",
@ -1450,6 +1453,7 @@
}).call(this);
/* ---- plugins/UiConfig/media/js/ConfigView.coffee ---- */
@ -1701,6 +1705,11 @@
UiConfig.prototype.onOpenWebsocket = function() {
this.cmd("wrapperSetTitle", "Config - ZeroNet");
this.cmd("serverInfo", {}, (function(_this) {
return function(server_info) {
return _this.server_info = server_info;
};
})(this));
this.restart_loading = false;
return this.updateConfig();
};
@ -1882,4 +1891,4 @@
window.Page.createProjector();
}).call(this);
}).call(this);

View File

@ -13,7 +13,7 @@ class Config(object):
def __init__(self, argv):
self.version = "0.6.4"
self.rev = 3746
self.rev = 3747
self.argv = argv
self.action = None
self.pending_changes = {}