Display Test Diffusers checkbox when enabling beta (#1430)

* Display Test Diffusers checkbox when enabling beta

* remove debug
This commit is contained in:
JeLuF 2023-07-25 04:09:30 +02:00 committed by GitHub
parent b408fc7cd2
commit 7b5e2b4a12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -78,6 +78,7 @@
border-bottom-right-radius: 12px; border-bottom-right-radius: 12px;
} }
.parameters-table .fa-fire { .parameters-table .fa-fire,
.parameters-table .fa-bolt {
color: #F7630C; color: #F7630C;
} }

View File

@ -409,7 +409,7 @@ async function getAppConfig() {
useBetaChannelField.checked = true useBetaChannelField.checked = true
document.querySelector("#updateBranchLabel").innerText = "(beta)" document.querySelector("#updateBranchLabel").innerText = "(beta)"
} else { } else {
getParameterSettingsEntry("test_diffusers").style.display = "none" getParameterSettingsEntry("test_diffusers").classList.add("displayNone")
} }
if (config.ui && config.ui.open_browser_on_start === false) { if (config.ui && config.ui.open_browser_on_start === false) {
uiOpenBrowserOnStartField.checked = 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)) 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')
}
})