From e43b18bc1f4e598150c38c02209dda9a89ae2c12 Mon Sep 17 00:00:00 2001 From: Stefal Date: Mon, 15 Jan 2024 22:50:52 +0100 Subject: [PATCH] better refresh page after detect & configure --- web_app/static/settings.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web_app/static/settings.js b/web_app/static/settings.js index 8136f793..8a600eda 100644 --- a/web_app/static/settings.js +++ b/web_app/static/settings.js @@ -392,10 +392,12 @@ $(document).ready(function () { detectApplyBtnElt.setAttribute('data-dismiss', 'modal'); detectApplyBtnElt.innerText = "Close"; if (response['result'] === 'success') { - detectBodyElt.innerHTML = "GNSS receiver successfully configured"; + detectBodyElt.innerHTML = "GNSS receiver successfully configured. We will log out to refresh the settings"; detectApplyBtnElt.removeAttribute('data-dismiss'); detectApplyBtnElt.onclick = function() { - window.location.reload(); + // window.location.reload(); + // looks like this way works better : + location.href = document.URL.replace(/#$/, ''); } } else { detectBodyElt.innerHTML = "GNSS receiver configuration failed"