From 7b5e2b4a1217a100126b98c0cef397eab90e598f Mon Sep 17 00:00:00 2001 From: JeLuF Date: Tue, 25 Jul 2023 04:09:30 +0200 Subject: [PATCH] Display Test Diffusers checkbox when enabling beta (#1430) * Display Test Diffusers checkbox when enabling beta * remove debug --- ui/media/css/auto-save.css | 3 ++- ui/media/js/parameters.js | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ui/media/css/auto-save.css b/ui/media/css/auto-save.css index 119a7e10..94790740 100644 --- a/ui/media/css/auto-save.css +++ b/ui/media/css/auto-save.css @@ -78,6 +78,7 @@ border-bottom-right-radius: 12px; } -.parameters-table .fa-fire { +.parameters-table .fa-fire, +.parameters-table .fa-bolt { color: #F7630C; } diff --git a/ui/media/js/parameters.js b/ui/media/js/parameters.js index ea273b88..60f053b9 100644 --- a/ui/media/js/parameters.js +++ b/ui/media/js/parameters.js @@ -409,7 +409,7 @@ async function getAppConfig() { useBetaChannelField.checked = true document.querySelector("#updateBranchLabel").innerText = "(beta)" } else { - getParameterSettingsEntry("test_diffusers").style.display = "none" + getParameterSettingsEntry("test_diffusers").classList.add("displayNone") } if (config.ui && config.ui.open_browser_on_start === false) { uiOpenBrowserOnStartField.checked = false @@ -743,3 +743,11 @@ navigator.permissions.query({ name: "clipboard-write" }).then(function(result) { }) document.addEventListener("system_info_update", (e) => setDeviceInfo(e.detail)) + +useBetaChannelField.addEventListener('change', (e) => { + if (e.target.checked) { + getParameterSettingsEntry("test_diffusers").classList.remove('displayNone') + } else { + getParameterSettingsEntry("test_diffusers").classList.add('displayNone') + } +})