diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2022-09-07 16:07:22 +0200 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2022-09-07 16:07:22 +0200 |
commit | 234bb54e699bbacde75b36a6dda4adc4d636da5a (patch) | |
tree | b6a97f7c64c503a2719434d4e3204e06c6352f2c /labbot/addons/dashboard/templates/sidebar.html | |
parent | e866d2e9d08cbe51da8194c848078ee258bd8c58 (diff) | |
download | lab-bot-234bb54e699bbacde75b36a6dda4adc4d636da5a.tar.gz lab-bot-234bb54e699bbacde75b36a6dda4adc4d636da5a.zip |
Implement Dashboard login, hide dashboard config
Diffstat (limited to 'labbot/addons/dashboard/templates/sidebar.html')
-rw-r--r-- | labbot/addons/dashboard/templates/sidebar.html | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/labbot/addons/dashboard/templates/sidebar.html b/labbot/addons/dashboard/templates/sidebar.html index f234f54..f90e999 100644 --- a/labbot/addons/dashboard/templates/sidebar.html +++ b/labbot/addons/dashboard/templates/sidebar.html @@ -26,12 +26,14 @@ </h6> <ul class="nav flex-column mb-2"> {% for addon in bot.addons %} - <li class="nav-item"> - <a class="nav-link" href="/settings/{{ addon }}"> - <span data-feather="file-plus" class="align-text-bottom"></span> - {{ addon }} - </a> - </li> + {% if addon != "dashboard" %} + <li class="nav-item"> + <a class="nav-link" href="/settings/{{ addon }}"> + <span data-feather="file-plus" class="align-text-bottom"></span> + {{ addon }} + </a> + </li> + {% endif %} {% endfor %} </ul> @@ -54,16 +56,7 @@ <script> function getHealth() { - var href = window.location.href; - var osi = -2; - var nsi = -1; - - while (nsi > osi) - { - osi = nsi; - nsi = href.indexOf("/", nsi+1); - } - href = href.slice(0, osi+1) + "health" + var href = window.location.origin + "/health" var xhttp = new XMLHttpRequest(); xhttp.onload = function() { |