mirror of
https://github.com/anapnoe/stable-diffusion-webui-ux.git
synced 2026-09-19 01:05:13 +02:00
hidden tabs already implemented no need to restart the ui
I just keep it hidden so in the next merge I don't have to fix it why people use python to hide some buttons I don't understand this is a single page app if for example you don't create at all the img2img interface and you send from txt2img or pngInfo commands to a non existing interface what you think it should happen ? please use javascript to modify the view on the client side not python
This commit is contained in:
+7
-8
@@ -1711,9 +1711,10 @@ def create_ui():
|
||||
# print(selected)
|
||||
# return gr.Tabs.update(selected=selected)
|
||||
|
||||
shared.tab_names = []
|
||||
for _interface, label, _ifid in interfaces:
|
||||
shared.tab_names.append(label)
|
||||
|
||||
# shared.tab_names = []
|
||||
# for _interface, label, _ifid in interfaces:
|
||||
# shared.tab_names.append(label)
|
||||
|
||||
|
||||
with gr.Blocks(css=css, analytics_enabled=False, title="Stable Diffusion") as demo:
|
||||
@@ -1745,17 +1746,15 @@ def create_ui():
|
||||
parameters_copypaste.connect_paste_params_buttons()
|
||||
|
||||
with gr.Tabs(elem_id="tabs") as tabs:
|
||||
|
||||
|
||||
# with gr.Row(elem_id="nav_menu_header_tabs"):
|
||||
# for interface, label, ifid in interfaces:
|
||||
# btn = gr.Button(label, elem_id='tab_clone_' + ifid)
|
||||
# btn.click(change_tab, btn, tabs)
|
||||
|
||||
for interface, label, ifid in interfaces:
|
||||
if label in shared.opts.hidden_tabs:
|
||||
continue
|
||||
|
||||
# if label in shared.opts.hidden_tabs:
|
||||
# continue
|
||||
|
||||
with gr.TabItem(label, id=ifid, elem_id='tab_' + ifid):
|
||||
interface.render()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user