diff --git a/src/confighttp.cpp b/src/confighttp.cpp index f0a53becded..486cf588722 100644 --- a/src/confighttp.cpp +++ b/src/confighttp.cpp @@ -554,10 +554,11 @@ namespace confighttp { outputTree.push_back(std::make_pair("displays", displays)); auto vars = config::parse_config(file_handler::read_file(config::sunshine.config_file.c_str())); - + pt::ptree config_file; for (auto &[name, value] : vars) { - outputTree.put(std::move(name), std::move(value)); + config_file.put(std::move(name), std::move(value)); } + outputTree.push_back(std::make_pair("config_file", config_file)); } void diff --git a/src_assets/common/assets/web/config.html b/src_assets/common/assets/web/config.html index 34f20d8acae..71cad628ed3 100644 --- a/src_assets/common/assets/web/config.html +++ b/src_assets/common/assets/web/config.html @@ -1247,10 +1247,9 @@

fetch("/api/config") .then((r) => r.json()) .then((r) => { - this.config = r; - this.platform = this.config.platform; - - this.displays = this.config.displays; + this.config = r.config_file; + this.platform = r.platform; + this.displays = r.displays; var app = document.getElementById("app"); if (this.platform === "windows") { @@ -1269,11 +1268,6 @@

}); } - // remove values we don't want in the config file - delete this.config.platform; - delete this.config.status; - delete this.config.version; - // Populate default values from tabs options this.tabs.forEach(tab => { Object.keys(tab.options).forEach(optionKey => {