mirror of
https://github.com/hexparrot/mineos
synced 2025-10-06 00:02:56 +02:00
generalized webui config access
mask_password replaced with webui_config that returns ALL webui.attributes for future web-ui settings.
This commit is contained in:
@@ -175,7 +175,7 @@
|
||||
$('input[name=password]').attr('type', 'password');
|
||||
}
|
||||
|
||||
$.getJSON('/mask_password', function(data) {
|
||||
$.getJSON('/webui_config', function(data) {
|
||||
if (data.mask_password)
|
||||
$('input[name=hide]').iCheck('check');
|
||||
})
|
||||
|
@@ -175,7 +175,7 @@
|
||||
$('input[name=password]').attr('type', 'password');
|
||||
}
|
||||
|
||||
$.getJSON('/mask_password', function(data) {
|
||||
$.getJSON('/webui_config', function(data) {
|
||||
if (data.mask_password)
|
||||
$('input[name=hide]').iCheck('check');
|
||||
})
|
||||
|
@@ -16,4 +16,5 @@ misc.pid_file = "/var/run/mineos.pid"
|
||||
misc.require_https = True
|
||||
misc.base_directory = "/var/games/minecraft"
|
||||
misc.localization = "en"
|
||||
misc.mask_password = False
|
||||
|
||||
webui.mask_password = False
|
@@ -219,11 +219,8 @@ class Root(object):
|
||||
|
||||
@cherrypy.expose
|
||||
@cherrypy.tools.json_out()
|
||||
def mask_password(self):
|
||||
try:
|
||||
return {'mask_password': cherrypy.config['misc.mask_password']}
|
||||
except KeyError:
|
||||
return {'mask_password': False}
|
||||
def webui_config(self):
|
||||
return {k.lstrip('webui.'):v for k,v in cherrypy.config.iteritems() if k.startswith('webui.')}
|
||||
|
||||
@property
|
||||
def login(self):
|
||||
|
Reference in New Issue
Block a user