From e980dd2f66e51f5c483c6ad4e13a7728a20a844a Mon Sep 17 00:00:00 2001 From: Muhammad Labeeb Date: Tue, 11 Feb 2025 16:46:18 +0500 Subject: [PATCH] use jinja for tab highlighting and remove user info --- tutordash/server/static/js/dash.js | 8 -------- tutordash/server/templates/index.html | 16 ++++------------ .../server/templates/installed_plugins.html | 7 +++++++ tutordash/server/templates/plugin_store.html | 7 +++++++ 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/tutordash/server/static/js/dash.js b/tutordash/server/static/js/dash.js index fa04a8b..5aa23f7 100644 --- a/tutordash/server/static/js/dash.js +++ b/tutordash/server/static/js/dash.js @@ -1,11 +1,3 @@ -if (window.location.href.indexOf("/plugin/store") > -1) { - document.querySelectorAll('.sidebar-tab')[0].classList.toggle('sidebar-tab-selected'); - document.querySelectorAll('.sidebar-tab-logo')[0].classList.toggle('sidebar-tab-logo-selected'); - } else { - document.querySelectorAll('.sidebar-tab')[1].classList.toggle('sidebar-tab-selected'); - document.querySelectorAll('.sidebar-tab-logo')[1].classList.toggle('sidebar-tab-logo-selected'); - } - document.getElementById("search-input").addEventListener("input", function() { let filter = this.value.toLowerCase(); let plugins = document.querySelectorAll(".installed-plugin"); diff --git a/tutordash/server/templates/index.html b/tutordash/server/templates/index.html index 7a9e704..ec0e338 100644 --- a/tutordash/server/templates/index.html +++ b/tutordash/server/templates/index.html @@ -15,7 +15,6 @@ - @@ -38,28 +37,21 @@
-

-
diff --git a/tutordash/server/templates/installed_plugins.html b/tutordash/server/templates/installed_plugins.html index ed5d4a1..11b42ac 100644 --- a/tutordash/server/templates/installed_plugins.html +++ b/tutordash/server/templates/installed_plugins.html @@ -39,3 +39,10 @@ Running local launch will allow all changes to plugins to take effect. This coul {% endfor %} {% endblock %} + +{% block scripts %} + +{% endblock %} diff --git a/tutordash/server/templates/plugin_store.html b/tutordash/server/templates/plugin_store.html index 76b1f81..b61bc00 100644 --- a/tutordash/server/templates/plugin_store.html +++ b/tutordash/server/templates/plugin_store.html @@ -24,3 +24,10 @@ {% endfor %} {% endblock %} + +{% block scripts %} + +{% endblock %}