add settings option to toggle button visibility
This commit is contained in:
parent
a816514980
commit
a3b047b7c7
|
@ -163,7 +163,6 @@ function selected_tab_id() {
|
|||
}
|
||||
|
||||
function trash_prompt(_,_, is_img2img) {
|
||||
//txt2img_token_button
|
||||
|
||||
if(!confirm("Delete prompt?")) return false
|
||||
|
||||
|
|
|
@ -300,6 +300,7 @@ options_templates.update(options_section(('ui', "User interface"), {
|
|||
"js_modal_lightbox": OptionInfo(True, "Enable full page image viewer"),
|
||||
"js_modal_lightbox_initially_zoomed": OptionInfo(True, "Show images zoomed in by default in full page image viewer"),
|
||||
"show_progress_in_title": OptionInfo(True, "Show generation progress in window title."),
|
||||
"trash_prompt_visible": OptionInfo(True, "Show trash prompt button"),
|
||||
'quicksettings': OptionInfo("sd_model_checkpoint", "Quicksettings list"),
|
||||
'localization': OptionInfo("None", "Localization (requires restart)", gr.Dropdown, lambda: {"choices": ["None"] + list(localization.localizations.keys())}, refresh=lambda: localization.list_localizations(cmd_opts.localizations_dir)),
|
||||
}))
|
||||
|
|
|
@ -509,7 +509,7 @@ def create_toprow(is_img2img):
|
|||
paste = gr.Button(value=paste_symbol, elem_id="paste")
|
||||
save_style = gr.Button(value=save_style_symbol, elem_id="style_create")
|
||||
prompt_style_apply = gr.Button(value=apply_style_symbol, elem_id="style_apply")
|
||||
trash_prompt = gr.Button(value=trash_prompt_symbol, elem_id="trash_prompt")
|
||||
trash_prompt = gr.Button(value=trash_prompt_symbol, elem_id="trash_prompt", visible=opts.trash_prompt_visible)
|
||||
|
||||
token_counter = gr.HTML(value="<span></span>", elem_id=f"{id_part}_token_counter")
|
||||
token_button = gr.Button(visible=False, elem_id=f"{id_part}_token_button")
|
||||
|
|
Loading…
Reference in New Issue