diff --git a/assets/script.js b/assets/script.js index 3a1274e..c45248a 100644 --- a/assets/script.js +++ b/assets/script.js @@ -1,3 +1,4 @@ + function doAccountAction(requestData, successMessage, failureMessage, silent=false) { return fetch('/account', { method: 'POST', @@ -125,6 +126,12 @@ function navigateTo(site, page){ data.append("site", site); data.append("page", page); doPageAction(data); + pageData.currentSite = site; + pageData.currentPage = page; +} + +function softReload(){ + navigateTo(pageData.currentSite, pageData.currentPage); } function refreshNavbar(){ diff --git a/templates/login.html b/templates/login.html index 9c9a249..e665b53 100644 --- a/templates/login.html +++ b/templates/login.html @@ -3,6 +3,8 @@ const email = document.getElementById("login_email").value; const password = document.getElementById("login_password").value; doLogin(email, password); + refreshNavbar(); + softReload(); } function doLogin(email, password) {