use emojis for extra network buttons

🔄 for refresh
 for close
This commit is contained in:
Kilvoctu 2023-02-20 15:14:06 -06:00
parent 0cc0ee1bcb
commit 32a4c8d961

View File

@ -13,6 +13,10 @@ from modules.generation_parameters_copypaste import image_from_url_text
extra_pages = []
allowed_dirs = set()
# Using constants for these since the variation selector isn't visible.
# Important that they exactly match script.js for tooltip to work.
refresh_symbol = '\U0001f504' # 🔄
close_symbol = '\U0000274C' # ❌
def register_page(page):
"""registers extra networks page for the UI; recommend doing it in on_before_ui() callback for extensions"""
@ -182,8 +186,8 @@ def create_ui(container, button, tabname):
ui.pages.append(page_elem)
filter = gr.Textbox('', show_label=False, elem_id=tabname+"_extra_search", placeholder="Search...", visible=False)
button_refresh = gr.Button('Refresh', elem_id=tabname+"_extra_refresh")
button_close = gr.Button('Close', elem_id=tabname+"_extra_close")
button_refresh = gr.Button(refresh_symbol, elem_id=tabname+"_extra_refresh")
button_close = gr.Button(close_symbol, elem_id=tabname+"_extra_close")
ui.button_save_preview = gr.Button('Save preview', elem_id=tabname+"_save_preview", visible=False)
ui.preview_target_filename = gr.Textbox('Preview save filename', elem_id=tabname+"_preview_filename", visible=False)