commit e5b7286: [WebUI] Hide navbar while page is loading

moisseev moiseev at mezonplus.ru
Sun Jul 26 19:07:06 UTC 2020


Author: moisseev
Date: 2020-07-25 18:39:14 +0300
URL: https://github.com/rspamd/rspamd/commit/e5b72865d86bdd2606251208123353d766d2aaf0

[WebUI] Hide navbar while page is loading

---
 interface/index.html       | 6 +++---
 interface/js/app/rspamd.js | 4 +---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/interface/index.html b/interface/index.html
index b6dd4c502..d1e943646 100644
--- a/interface/index.html
+++ b/interface/index.html
@@ -27,7 +27,7 @@
 
 <body>
 
-<nav class="navbar navbar-light bg-light navbar-expand-md" id="navBar">
+<nav class="navbar navbar-light bg-light navbar-expand-md d-none" id="navBar">
 	<form class="form-inline mr-auto">
 	<div class="navbar-header navbar-brand p-0">
 		<img src="./img/rspamd_logo_navbar.png" alt="Rspamd">
@@ -45,7 +45,7 @@
 		<li role="presentation" class="nav-item"><a id="selectors_nav" aria-controls="selectors" role="tab" href="#selectors" data-toggle="tab" class="nav-link ro-hide" style="display: none;">Test selectors</a></li>
 		<li role="presentation" class="nav-item"><a id="history_nav" aria-controls="history" role="tab" href="#history" data-toggle="tab" class="nav-link">History</a></li>
 	</ul>
-	<form class="form-inline ml-auto" id="navbar-btn-form" style="display: none;">
+	<form class="form-inline ml-auto">
 		<div class="btn-group">
 			<a href="#" class="btn btn-outline-secondary" role="button" data-toggle="button" id="refresh" style="display: none;"><i class="fas fa-sync-alt"></i> Refresh</a>
 			<button class="btn btn-outline-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" id="autoRefresh">
@@ -74,7 +74,7 @@
 
 <div class="notification-area"></div>
 
-<div id="mainUI" style="display: none;">
+<div id="mainUI" class="d-none">
 
 	<div class="container-fluid">
 
diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js
index cfc366a5c..8361bb925 100644
--- a/interface/js/app/rspamd.js
+++ b/interface/js/app/rspamd.js
@@ -283,9 +283,7 @@ function ($, D3pie, visibility, NProgress, stickyTabs, tab_stat, tab_graph, tab_
             $(".ro-hide").show();
         }
 
-        var buttons = $("#navbar-btn-form");
-        $("#mainUI").show();
-        $(buttons).show();
+        $("#navBar, #mainUI").removeClass("d-none");
         $(".nav-tabs-sticky").stickyTabs({initialTab:"#status_nav"});
     }
 


More information about the Commits mailing list