diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index b487ac25..1434f25f 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -206,12 +206,13 @@ def refresh_available_extensions_from_data(hide_tags): if url is None: continue + existing = installed_extension_urls.get(normalize_git_url(url), None) + extension_tags = extension_tags + ["installed"] if existing else extension_tags + if len([x for x in extension_tags if x in tags_to_hide]) > 0: hidden += 1 continue - existing = installed_extension_urls.get(normalize_git_url(url), None) - install_code = f"""""" tags_text = ", ".join([f"{x}" for x in extension_tags]) @@ -222,7 +223,11 @@ def refresh_available_extensions_from_data(hide_tags): {html.escape(description)} {install_code} - """ + + """ + + for tag in [x for x in extension_tags if x not in tags]: + tags[tag] = tag code += """ @@ -272,7 +277,7 @@ def create_ui(): install_extension_button = gr.Button(elem_id="install_extension_button", visible=False) with gr.Row(): - hide_tags = gr.CheckboxGroup(value=["ads", "localization"], label="Hide extensions with tags", choices=["script", "ads", "localization"]) + hide_tags = gr.CheckboxGroup(value=["ads", "localization", "installed"], label="Hide extensions with tags", choices=["script", "ads", "localization", "installed"]) install_result = gr.HTML() available_extensions_table = gr.HTML()