diff --git a/tutordash/server/app.py b/tutordash/server/app.py index 6ff9a2d..47ff017 100644 --- a/tutordash/server/app.py +++ b/tutordash/server/app.py @@ -72,9 +72,21 @@ async def plugin_store() -> str: @app.get("/plugin/installed") async def installed_plugins() -> str: + installed_plugins = tutorclient.Client.installed_plugins() + enabled_plugins = tutorclient.Client.enabled_plugins() + plugins: list[dict[str, str]] = [ + { + "name": p.name, + "url": p.url, + "index": p.index, + "description": markdown(p.description), + "is_enabled": p.name in enabled_plugins, + } + for p in tutorclient.Client.plugins_in_store() if p.name in installed_plugins + ] return await render_template( "installed_plugins.html", - # plugins=plugins, + plugins=plugins, **shared_template_context(), ) diff --git a/tutordash/server/templates/installed_plugins.html b/tutordash/server/templates/installed_plugins.html index 23de559..af2c279 100644 --- a/tutordash/server/templates/installed_plugins.html +++ b/tutordash/server/templates/installed_plugins.html @@ -1,33 +1,23 @@ -{% extends "index.html" %} +{% extends "workspace_header_general.html" %} -{% block workspace_header %} -
-
My Plugins
-
View all your installed plugins in one place.
-
-
-
- -
-
+{% block page_title %}Plugin Marketplace{% endblock %} +{% block page_description %}View and install available plugins.{% endblock %} +{% block page_button %} +
+ +
{% endblock %} {% block workspace_content %} -
-
- - -
-
- - -
- {% for plugin in installed_plugins %} -
-
  • - {{ plugin }} +
    + {% for plugin in plugins %} +
    +
    + +
    Edly
    +
    {{ plugin.description|safe }}
    +
    +
    {% if plugin in enabled_plugins %} @@ -36,7 +26,7 @@ {% endif %}
    -
  • +
    {% endfor %} diff --git a/tutordash/server/templates/workspace_header_general.html b/tutordash/server/templates/workspace_header_general.html index 420cafd..bbc043c 100644 --- a/tutordash/server/templates/workspace_header_general.html +++ b/tutordash/server/templates/workspace_header_general.html @@ -6,8 +6,8 @@
    {% block page_title %}{% endblock %}
    {% block page_description %}{% endblock %}
    -
    -
    {% block page_button %}{% endblock %}
    +
    + {% block page_button %}{% endblock %}