made some updates and moved some stuff to auto-save js

This commit is contained in:
Malcolm Diller
2022-10-18 20:49:58 -07:00
parent 946dfdf7b8
commit 0922349344
5 changed files with 81 additions and 162 deletions

View File

@ -29,7 +29,14 @@ var SETTINGS_IDS_LIST = [
"upscale_model",
"preview-image",
"modifier-card-size-slider",
"theme"
"theme",
"save_to_disk",
"diskPath",
"sound_toggle",
"turbo",
"use_cpu",
"use_full_precision",
"auto_save_settings"
]
async function initSettings() {
@ -46,6 +53,9 @@ async function initSettings() {
}
function getSetting(element) {
if (element instanceof String) {
element = SETTINGS_TO_SAVE.find(e => e.id == element);
}
if (element.type == "checkbox") {
return element.checked
}