From 554d2d93cb44fce8e69e64cd264549551a6c6ac0 Mon Sep 17 00:00:00 2001 From: bruno Date: Mon, 5 Feb 2024 22:15:10 +0100 Subject: [PATCH] Fix login --- assets/script.js | 7 +++++++ templates/login.html | 2 ++ 2 files changed, 9 insertions(+) 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) {