{# settings/_catalog_partial.html — HTMX partial for plugin catalog #}
{% if error %}
{{ error }}
{% endif %} {% if catalog %}
{% for plugin in catalog %} {% set is_installed = plugin.name in installed_names %} {% set is_loaded = plugin.name in loaded_names %}
{{ plugin.name }} v{{ plugin.version }} {% if is_loaded %} Active {% elif is_installed %} Installed {% endif %} {% for tag in plugin.tags %} {{ tag }} {% endfor %}
{% if plugin.description %}
{{ plugin.description }}
{% endif %}
{% if plugin.author %}by {{ plugin.author }}{% endif %} {% if plugin.license %}{{ plugin.license }}{% endif %} {% if plugin.min_app_version %}requires v{{ plugin.min_app_version }}+{% endif %}
{% if plugin.homepage %} Docs {% elif plugin.repository_url %} Source {% endif %} {% if is_loaded %} {# Already active — update available if versions differ #}
{% elif is_installed %} {# Installed but not active — offer hot-reload #}
{% else %} {# Not installed — offer install #}
{% endif %}
{# Inline result placeholder — replaced by _install_result.html after action #}
{% endfor %}
{% elif not error %}
No plugins found in catalog.
{% endif %}