diff options
author | Philpax <me@philpax.me> | 2023-01-05 04:00:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-05 04:00:58 +0000 |
commit | 83ca8dd0c96e3cc8dd444e8d980c07718dc647ee (patch) | |
tree | cbadd09c9305099db7763532b7aaf909d366d326 /javascript/ui.js | |
parent | fa931733f6acc94e058a1d3d4655846e33ae34be (diff) | |
parent | 5f4fa942b8ec3ed3b15a352903489d6f9e6eb46e (diff) | |
download | stable-diffusion-webui-gfx803-83ca8dd0c96e3cc8dd444e8d980c07718dc647ee.tar.gz stable-diffusion-webui-gfx803-83ca8dd0c96e3cc8dd444e8d980c07718dc647ee.tar.bz2 stable-diffusion-webui-gfx803-83ca8dd0c96e3cc8dd444e8d980c07718dc647ee.zip |
Merge branch 'AUTOMATIC1111:master' into fix-sd-arch-switch-in-override-settings
Diffstat (limited to 'javascript/ui.js')
-rw-r--r-- | javascript/ui.js | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/javascript/ui.js b/javascript/ui.js index 587dd782..ee226927 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -1,4 +1,4 @@ -// various functions for interation with ui.py not large enough to warrant putting them in separate files +// various functions for interaction with ui.py not large enough to warrant putting them in separate files function set_theme(theme){ gradioURL = window.location.href @@ -19,7 +19,7 @@ function selected_gallery_index(){ function extract_image_from_gallery(gallery){ if(gallery.length == 1){ - return gallery[0] + return [gallery[0]] } index = selected_gallery_index() @@ -28,7 +28,7 @@ function extract_image_from_gallery(gallery){ return [null] } - return gallery[index]; + return [gallery[index]]; } function args_to_array(args){ @@ -188,6 +188,17 @@ onUiUpdate(function(){ img2img_textarea = gradioApp().querySelector("#img2img_prompt > label > textarea"); img2img_textarea?.addEventListener("input", () => update_token_counter("img2img_token_button")); } + + show_all_pages = gradioApp().getElementById('settings_show_all_pages') + settings_tabs = gradioApp().querySelector('#settings div') + if(show_all_pages && settings_tabs){ + settings_tabs.appendChild(show_all_pages) + show_all_pages.onclick = function(){ + gradioApp().querySelectorAll('#settings > div').forEach(function(elem){ + elem.style.display = "block"; + }) + } + } }) let txt2img_textarea, img2img_textarea = undefined; |