diff --git a/tutordash/server/app.py b/tutordash/server/app.py index 47ff017..e705925 100644 --- a/tutordash/server/app.py +++ b/tutordash/server/app.py @@ -79,6 +79,7 @@ async def installed_plugins() -> str: "name": p.name, "url": p.url, "index": p.index, + "author": p.author.split('<')[0].strip(), "description": markdown(p.description), "is_enabled": p.name in enabled_plugins, } @@ -110,7 +111,7 @@ async def plugin(name: str) -> str: async def plugin_toggle(name: str) -> WerkzeugResponse: # TODO check plugin exists form = await request.form - enable_plugin = form.get("enabled") == "on" + enable_plugin = form.get("checked") == "on" command = ["plugins", "enable" if enable_plugin else "disable", name] tutorclient.CliPool.run_sequential(command) # TODO error management @@ -160,7 +161,9 @@ async def config_unset(name: str) -> WerkzeugResponse: @app.post("/cli/local/launch") async def cli_local_launch() -> WerkzeugResponse: - tutorclient.CliPool.run_parallel(app, ["local", "launch", "--non-interactive"]) + breakpoint() + # TODO uncomment in production + # tutorclient.CliPool.run_parallel(app, ["local", "launch", "--non-interactive"]) return redirect(url_for("cli_logs")) diff --git a/tutordash/server/static/img/Featured icon.svg b/tutordash/server/static/img/Featured icon.svg new file mode 100644 index 0000000..96367df --- /dev/null +++ b/tutordash/server/static/img/Featured icon.svg @@ -0,0 +1,5 @@ + diff --git a/tutordash/server/templates/index.html b/tutordash/server/templates/index.html index c85360e..88ddba3 100644 --- a/tutordash/server/templates/index.html +++ b/tutordash/server/templates/index.html @@ -73,6 +73,23 @@ +
{% block scripts %}{% endblock %} diff --git a/tutordash/server/templates/installed_plugins.html b/tutordash/server/templates/installed_plugins.html index af2c279..08846d3 100644 --- a/tutordash/server/templates/installed_plugins.html +++ b/tutordash/server/templates/installed_plugins.html @@ -3,8 +3,21 @@ {% block page_title %}Plugin Marketplace{% endblock %} {% block page_description %}View and install available plugins.{% endblock %} {% block page_button %} - {% endblock %} @@ -12,19 +25,14 @@