diff --git a/docs/index.html b/docs/index.html
index 53ce990..dcbf704 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -328,7 +328,7 @@
Balance
-
@@ -863,17 +863,20 @@
const relativeTime = new RelativeTime({ style: 'narrow' });
//Checks for internet connection status
- if (!navigator.onLine)
+ if (!navigator.onLine) {
notify(
"There seems to be a problem connecting to the internet. Please check your internet connection.",
"error",
+ { pinned: true }
);
+ }
window.addEventListener("offline", () => {
notify(
"There seems to be a problem connecting to the internet. Please check your internet connection.",
"error",
{ pinned: true }
);
+ location.reload()
});
window.addEventListener("online", () => {
getRef("notification_drawer").clearAll();
@@ -1088,6 +1091,7 @@
const pagesData = {
lastPage: '',
+ currentPage: '',
params: {}
}
async function showPage(targetPage, options = {}) {
@@ -1123,6 +1127,7 @@
pageId = 'exchange'
history.replaceState(null, null, '#/exchange')
}
+ pagesData.currentPage = pageId
if (!firstLoad)
switch (pageId) {
case 'exchange':
@@ -1335,9 +1340,17 @@
child.classList.add('hide')
})
}
+ function handleVisibilityChange() {
+ if (document.visibilityState === "hidden") {
+ // code if page is hidden
+ } else {
+ updateRate();
+ }
+ }
+ document.addEventListener("visibilitychange", handleVisibilityChange, false);