|
|
@ -634,6 +634,13 @@ export class settingsList {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private _showLogs = () => _get("/logs", null, (req: XMLHttpRequest) => {
|
|
|
|
|
|
|
|
if (req.readyState == 4 && req.status == 200) {
|
|
|
|
|
|
|
|
(document.getElementById("log-area") as HTMLPreElement).textContent = req.response["log"] as string;
|
|
|
|
|
|
|
|
window.modals.logs.show();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
constructor() {
|
|
|
|
this._sections = {};
|
|
|
|
this._sections = {};
|
|
|
|
this._buttons = {};
|
|
|
|
this._buttons = {};
|
|
|
@ -645,7 +652,7 @@ export class settingsList {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this._saveButton.onclick = this._save;
|
|
|
|
this._saveButton.onclick = this._save;
|
|
|
|
document.addEventListener("settings-requires-restart", () => { this._needsRestart = true; });
|
|
|
|
document.addEventListener("settings-requires-restart", () => { this._needsRestart = true; });
|
|
|
|
|
|
|
|
document.getElementById("settings-logs").onclick = this._showLogs;
|
|
|
|
const advancedEnableToggle = document.getElementById("settings-advanced-enabled") as HTMLInputElement;
|
|
|
|
const advancedEnableToggle = document.getElementById("settings-advanced-enabled") as HTMLInputElement;
|
|
|
|
advancedEnableToggle.onchange = () => {
|
|
|
|
advancedEnableToggle.onchange = () => {
|
|
|
|
document.dispatchEvent(new CustomEvent("settings-advancedState", { detail: advancedEnableToggle.checked }));
|
|
|
|
document.dispatchEvent(new CustomEvent("settings-advancedState", { detail: advancedEnableToggle.checked }));
|
|
|
|