From bdfecd506623645d5c497b5c5e03bffecb95ac4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Thu, 5 Dec 2024 16:40:01 +0100 Subject: [PATCH] chore: simplify by removing useless ajax call --- tutordash/server/app.py | 8 +------- tutordash/server/templates/index.html | 13 ++++++++++++- tutordash/server/templates/sidebar/_plugins.html | 11 ----------- 3 files changed, 13 insertions(+), 19 deletions(-) delete mode 100644 tutordash/server/templates/sidebar/_plugins.html diff --git a/tutordash/server/app.py b/tutordash/server/app.py index 55fdb9c..92390bf 100644 --- a/tutordash/server/app.py +++ b/tutordash/server/app.py @@ -191,14 +191,8 @@ def run(root: str, **app_kwargs: t.Any) -> None: @app.get("/") async def home() -> str: - return await render_template("index.html") - - -@app.get("/sidebar/plugins") -async def sidebar_plugins() -> str: - # TODO get rid of this view and render from home() return await render_template( - "sidebar/_plugins.html", + "index.html", installed_plugins=sorted(set(hooks.Filters.PLUGINS_INSTALLED.iterate())), ) diff --git a/tutordash/server/templates/index.html b/tutordash/server/templates/index.html index 60b58b5..33f35d0 100644 --- a/tutordash/server/templates/index.html +++ b/tutordash/server/templates/index.html @@ -40,7 +40,18 @@
Plugins
-
+
+ +
diff --git a/tutordash/server/templates/sidebar/_plugins.html b/tutordash/server/templates/sidebar/_plugins.html deleted file mode 100644 index 38b0e6e..0000000 --- a/tutordash/server/templates/sidebar/_plugins.html +++ /dev/null @@ -1,11 +0,0 @@ - -