diff --git a/app/classes/web/panel_handler.py b/app/classes/web/panel_handler.py index 582517db..3e7699c8 100644 --- a/app/classes/web/panel_handler.py +++ b/app/classes/web/panel_handler.py @@ -897,6 +897,13 @@ class PanelHandler(BaseHandler): template = "panel/panel_config.html" + elif page == "config_json": + with open(self.helper.settings_file, "r", encoding="utf-8") as f: + data = json.load(f) + page_data["config-json"] = data + + template = "panel/config_json.html" + elif page == "add_user": page_data["new_user"] = True page_data["user"] = {} diff --git a/app/frontend/templates/panel/config_json.html b/app/frontend/templates/panel/config_json.html new file mode 100644 index 00000000..68f42b7b --- /dev/null +++ b/app/frontend/templates/panel/config_json.html @@ -0,0 +1,229 @@ +{% extends ../base.html %} + +{% block meta %} +{% end %} + +{% block title %}Crafty Controller - {{ translate('panelConfig', 'pageTitle', data['lang']) }}{% end %} + +{% block content %} + +
+ {% if data['superuser'] %} + + {% end %} + + +
+
+ +
+ +
+ + +
+
+
+
+
+ {% for item in data['config-json'].items() %} + + {% if isinstance(item[1], bool) %} + + {% if item[1] == True %} +
+ +  
+ +  
+
+ {% else %} +
+ +  
+ +  
+
+ {% end %} + {% elif isinstance(item[1], int) %} + + {% else %} + + {% end %} + {% end %} +
+
+
+
+
+ + +
+ + + + +{% end %} + +{% block js %} + + + +{% end %} \ No newline at end of file diff --git a/app/frontend/templates/panel/panel_config.html b/app/frontend/templates/panel/panel_config.html index a4ee9f66..15f0a269 100644 --- a/app/frontend/templates/panel/panel_config.html +++ b/app/frontend/templates/panel/panel_config.html @@ -8,6 +8,18 @@ {% block content %}
+ {% if data['superuser'] %} + + {% end %}