mirror of
https://github.com/vladmandic/automatic
synced 2026-09-10 23:08:43 +02:00
add settings search
This commit is contained in:
@@ -260,6 +260,19 @@ onUiUpdate(() => {
|
||||
});
|
||||
};
|
||||
}
|
||||
const settings_search = gradioApp().querySelectorAll('#settings_search > label > textarea')[0];
|
||||
settings_search.oninput = (e) => {
|
||||
gradioApp().querySelectorAll('#settings > div').forEach((elem) => {
|
||||
elem.style.display = 'block';
|
||||
});
|
||||
gradioApp().querySelectorAll('#tab_settings .tabitem').forEach((section) => {
|
||||
section.querySelectorAll('.block').forEach((setting) => {
|
||||
const visible = setting.innerText.toLowerCase().includes(e.target.value.toLowerCase()) || setting.id.toLowerCase().includes(e.target.value.toLowerCase());
|
||||
const el = setting.parentElement.classList.contains('form') ? setting.parentElement : setting; // if parent is form use that instead
|
||||
el.style.display = visible ? 'block' : 'none';
|
||||
});
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
onOptionsChanged(() => {
|
||||
|
||||
Reference in New Issue
Block a user