diff options
author | moisseev <moiseev@mezonplus.ru> | 2020-07-26 20:28:36 +0300 |
---|---|---|
committer | moisseev <moiseev@mezonplus.ru> | 2020-07-26 20:28:36 +0300 |
commit | 25c7f0536578ed62a0ff58493494ddf8bc74f969 (patch) | |
tree | 4579b8c9daf3a07054387c1c39b969a0b21059d0 /interface | |
parent | b8fc350a841c43ff616d2b824e33af3cfb4e6c7f (diff) | |
download | rspamd-25c7f0536578ed62a0ff58493494ddf8bc74f969.tar.gz rspamd-25c7f0536578ed62a0ff58493494ddf8bc74f969.zip |
[WebUI] Add `Enable JS` warning
Diffstat (limited to 'interface')
-rw-r--r-- | interface/index.html | 9 | ||||
-rw-r--r-- | interface/js/main.js | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/interface/index.html b/interface/index.html index efb6138fb..742db46df 100644 --- a/interface/index.html +++ b/interface/index.html @@ -72,13 +72,18 @@ </form> </nav> -<div class="notification-area"></div> +<div class="notification-area"> + <noscript> + <div class="alert alert-error"><strong>Please enable JavaScript</strong></div> + </noscript> +</div> <div id="preloader" class="container-fluid"> - <div id="loading" class="position-absolute align-items-center my-3 text-primary blinking"> + <div id="loading" class="position-absolute align-items-center my-3 text-primary blinking d-none"> <div class="spinner-border align-middle" role="status" aria-hidden="true"></div> <strong class="ml-3">Loading...</strong> </div> + <script>document.getElementById("loading").classList.remove("d-none");</script> <div class="row position-absolute w-100 h-100 align-items-center text-center"> <img class="img-fluid mh-100 mx-auto" src="./img/rspamd_logo_navbar.png" alt="Rspamd" /> </div> diff --git a/interface/js/main.js b/interface/js/main.js index 7c6bb6851..87d4f384c 100644 --- a/interface/js/main.js +++ b/interface/js/main.js @@ -46,6 +46,7 @@ define("d3.global", ["d3"], function (d3global) { // eslint-disable-line strict // Notify user on module loading failure requirejs.onError = function (e) { "use strict"; + document.getElementById("loading").classList.add("d-none"); document.getElementsByClassName("notification-area")[0].innerHTML = "<div class=\"alert alert-error\">" + "<strong>Module loading error: " + e.requireType + ", module: " + e.requireModules + "</strong>" + |