diff --git a/tutordash/server/app.py b/tutordash/server/app.py index 99d1419..6ff9a2d 100644 --- a/tutordash/server/app.py +++ b/tutordash/server/app.py @@ -70,6 +70,15 @@ async def plugin_store() -> str: ) +@app.get("/plugin/installed") +async def installed_plugins() -> str: + return await render_template( + "installed_plugins.html", + # plugins=plugins, + **shared_template_context(), + ) + + @app.get("/plugin/") async def plugin(name: str) -> str: # TODO check that plugin exists diff --git a/tutordash/server/static/img/Edly Red Icon.svg b/tutordash/server/static/img/Edly Red Icon.svg new file mode 100644 index 0000000..7749226 --- /dev/null +++ b/tutordash/server/static/img/Edly Red Icon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tutordash/server/static/img/shopping-bag.svg b/tutordash/server/static/img/shopping-bag.svg new file mode 100644 index 0000000..ae1b034 --- /dev/null +++ b/tutordash/server/static/img/shopping-bag.svg @@ -0,0 +1,3 @@ + + + diff --git a/tutordash/server/static/img/stack.svg b/tutordash/server/static/img/stack.svg new file mode 100644 index 0000000..2f1c06b --- /dev/null +++ b/tutordash/server/static/img/stack.svg @@ -0,0 +1,3 @@ + + + diff --git a/tutordash/server/static/js/dash.js b/tutordash/server/static/js/dash.js new file mode 100644 index 0000000..34594bb --- /dev/null +++ b/tutordash/server/static/js/dash.js @@ -0,0 +1,7 @@ +if (window.location.href.indexOf("/plugin/store") > -1) { + document.querySelectorAll('.sidebar-tab')[0].classList.toggle('sidebar-tab-selected'); + document.querySelectorAll('.tab-logo')[0].classList.toggle('sidebar-tab-logo-selected'); + } else { + document.querySelectorAll('.sidebar-tab')[1].classList.toggle('sidebar-tab-selected'); + document.querySelectorAll('.tab-logo')[1].classList.toggle('sidebar-tab-logo-selected'); + } \ No newline at end of file diff --git a/tutordash/server/templates/index.html b/tutordash/server/templates/index.html index 1ed76a1..200e3e1 100644 --- a/tutordash/server/templates/index.html +++ b/tutordash/server/templates/index.html @@ -10,6 +10,7 @@ + @@ -25,31 +26,24 @@ - + {% block scripts %}{% endblock %} diff --git a/tutordash/server/templates/installed_plugins.html b/tutordash/server/templates/installed_plugins.html new file mode 100644 index 0000000..30a2171 --- /dev/null +++ b/tutordash/server/templates/installed_plugins.html @@ -0,0 +1,13 @@ +{% extends "index.html" %} + +{% block workspace_header %}My Plugins{% endblock %} + +{% block workspace_content %} +
+ +
+ +{% for plugin in installed_plugins %} +
  • {{ plugin }} {% if plugin in enabled_plugins %} ✅{% endif %}
  • +{% endfor %} +{% endblock %} diff --git a/tutordash/server/templates/plugin_store.html b/tutordash/server/templates/plugin_store.html index 5365984..bfc7867 100644 --- a/tutordash/server/templates/plugin_store.html +++ b/tutordash/server/templates/plugin_store.html @@ -1,6 +1,6 @@ {% extends "index.html" %} -{% block workspace_header %}Plugin store{% endblock %} +{% block workspace_header %}Plugin Marketplace{% endblock %} {% block workspace_content %}