aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorme <25877290+Kryptortio@users.noreply.github.com>2023-01-04 22:03:32 +0100
committerme <25877290+Kryptortio@users.noreply.github.com>2023-01-04 22:14:30 +0100
commit5851bc839b6f639cda59e84eb1ee8c706986633d (patch)
tree23eeac4104d9c463541d22c6bd81a84d0f0e9a18 /modules
parentbc43293c640aef65df3136de9e5bd8b7e79eb3e0 (diff)
Add element ids for script components and a few more in ui.py
Diffstat (limited to 'modules')
-rw-r--r--modules/ui.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/ui.py b/modules/ui.py
index 04091e67..bb64fe20 100644
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -560,7 +560,7 @@ Requested path was: {f}
generation_info = None
with gr.Column():
with gr.Row(elem_id=f"image_buttons_{tabname}"):
- open_folder_button = gr.Button(folder_symbol, elem_id="hidden_element" if shared.cmd_opts.hide_ui_dir_config else 'open_folder')
+ open_folder_button = gr.Button(folder_symbol, elem_id="hidden_element" if shared.cmd_opts.hide_ui_dir_config else f'open_folder_{tabname}')
if tabname != "extras":
save = gr.Button('Save', elem_id=f'save_{tabname}')
@@ -576,13 +576,13 @@ Requested path was: {f}
if tabname != "extras":
with gr.Row():
- download_files = gr.File(None, file_count="multiple", interactive=False, show_label=False, visible=False)
+ download_files = gr.File(None, file_count="multiple", interactive=False, show_label=False, visible=False, elem_id=f'download_files_{tabname}')
with gr.Group():
- html_info = gr.HTML()
- html_log = gr.HTML()
+ html_info = gr.HTML(elem_id=f'html_info_{tabname}')
+ html_log = gr.HTML(elem_id=f'html_log_{tabname}')
- generation_info = gr.Textbox(visible=False)
+ generation_info = gr.Textbox(visible=False, elem_id=f'generation_info_{tabname}')
if tabname == 'txt2img' or tabname == 'img2img':
generation_info_button = gr.Button(visible=False, elem_id=f"{tabname}_generation_info_button")
generation_info_button.click(
@@ -624,9 +624,9 @@ Requested path was: {f}
)
else:
- html_info_x = gr.HTML()
- html_info = gr.HTML()
- html_log = gr.HTML()
+ html_info_x = gr.HTML(elem_id=f'html_info_x_{tabname}')
+ html_info = gr.HTML(elem_id=f'html_info_{tabname}')
+ html_log = gr.HTML(elem_id=f'html_log_{tabname}')
parameters_copypaste.bind_buttons(buttons, result_gallery, "txt2img" if tabname == "txt2img" else None)
return result_gallery, generation_info if tabname != "extras" else html_info_x, html_info, html_log