mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
add settings search
This commit is contained in:
Submodule extensions-builtin/sd-webui-controlnet updated: cdba83b6e1...2e0dc37d22
@@ -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(() => {
|
||||
|
||||
+1
-1
@@ -444,7 +444,7 @@ options_templates.update(options_section(('ui', "Live previews"), {
|
||||
"live_previews_enable": OptionInfo(True, "Show live previews of the created image"),
|
||||
"show_progress_grid": OptionInfo(True, "Show previews of all images generated in a batch as a grid"),
|
||||
"notification_audio_enable": OptionInfo(False, "Play a sound when images are finished generating"),
|
||||
"notification_audio_path": OptionInfo("html/notification.mp3","Path to notification sound",component_args=hide_dirs),
|
||||
"notification_audio_path": OptionInfo("html/notification.mp3","Path to notification sound", component_args=hide_dirs),
|
||||
"show_progress_every_n_steps": OptionInfo(1, "Show new live preview image every N sampling steps. Set to -1 to show after completion of batch.", gr.Slider, {"minimum": -1, "maximum": 32, "step": 1}),
|
||||
"show_progress_type": OptionInfo("Approx NN", "Image creation progress preview mode", gr.Radio, {"choices": ["Full", "Approx NN", "Approx cheap"]}),
|
||||
"live_preview_content": OptionInfo("Combined", "Live preview subject", gr.Radio, {"choices": ["Combined", "Prompt", "Negative prompt"]}),
|
||||
|
||||
+2
-1
@@ -1323,9 +1323,10 @@ def create_ui():
|
||||
unload_sd_model = gr.Button(value='Unload checkpoint', variant='primary', elem_id="sett_unload_sd_model")
|
||||
reload_sd_model = gr.Button(value='Reload checkpoint', variant='primary', elem_id="sett_reload_sd_model")
|
||||
# reload_script_bodies = gr.Button(value='Reload scripts', variant='primary', elem_id="settings_reload_script_bodies")
|
||||
with gr.Row():
|
||||
_settings_search = gr.Text(label="Search", elem_id="settings_search") # TODO settings search
|
||||
|
||||
result = gr.HTML(elem_id="settings_result")
|
||||
|
||||
quicksettings_names = opts.quicksettings_list
|
||||
quicksettings_names = {x: i for i, x in enumerate(quicksettings_names) if x != 'quicksettings'}
|
||||
quicksettings_list = []
|
||||
|
||||
@@ -18,7 +18,7 @@ sort_ordering = {
|
||||
"user extensions": (True, lambda x: x.get('sort_user', '')),
|
||||
"update avilable": (True, lambda x: x.get('sort_update', '')),
|
||||
"updated date": (True, lambda x: x.get('updated', '2000-01-01T00:00')),
|
||||
"created date": (False, lambda x: x.get('created', '2000-01-01T00:00')),
|
||||
"created date": (True, lambda x: x.get('created', '2000-01-01T00:00')),
|
||||
"name": (False, lambda x: x.get('name', '').lower()),
|
||||
"enabled": (False, lambda x: x.get('sort_enabled', '').lower()),
|
||||
"size": (True, lambda x: x.get('size', 0)),
|
||||
|
||||
Reference in New Issue
Block a user