diff --git a/src/renderer.ts b/src/renderer.ts index b572e04..b24b992 100644 --- a/src/renderer.ts +++ b/src/renderer.ts @@ -59,7 +59,7 @@ document.querySelector("#save-app-config").addEventListener("click", (e) => { const backgroundColor = (closeUserConfig.querySelector("#background-color") as HTMLInputElement).value; const textColor = (closeUserConfig.querySelector("#text-color") as HTMLInputElement).value; const cachePath = (closeUserConfig.querySelector("#cache-path") as HTMLInputElement).value; - const autoCacheClear = (closeUserConfig.querySelector("#cache-path") as HTMLInputElement).checked; + const autoCacheClear = (closeUserConfig.querySelector("#clear-cache-on-close") as HTMLInputElement).checked; const ignoreCertificateErrors = (closeUserConfig.querySelector("#insecure-ssl") as HTMLInputElement).checked; const config = { accentColor, @@ -145,6 +145,12 @@ function applyAppConfig(config: AppConfig) { (document.querySelector("#cache-path") as HTMLInputElement).value = config.cachePath; window.api.setCachePath(config.cachePath); } + if (config.ignoreCertificateErrors) { + (document.querySelector("#insecure-ssl") as HTMLInputElement).checked = config.ignoreCertificateErrors; + } + if (config.autoCacheClear) { + (document.querySelector("#clear-cache-on-close") as HTMLInputElement).checked = config.autoCacheClear; + } }