aboutsummaryrefslogtreecommitdiff
path: root/src/app/js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2024-12-20 18:39:57 +0100
committer0neGal <mail@0negal.com>2024-12-20 18:39:57 +0100
commit1be8c774251c3a1e1e3559f628aa24b465ab8685 (patch)
tree0660c8e634f9dd047975e6c8a8122275af3eec6f /src/app/js
parent554fe88942135583404ddf8c1a97f342287cea5a (diff)
downloadViper-1be8c774251c3a1e1e3559f628aa24b465ab8685.tar.gz
Viper-1be8c774251c3a1e1e3559f628aa24b465ab8685.zip
added offline indicator icon
Diffstat (limited to 'src/app/js')
-rw-r--r--src/app/js/request.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/app/js/request.js b/src/app/js/request.js
index cc73f1b..b9b5081 100644
--- a/src/app/js/request.js
+++ b/src/app/js/request.js
@@ -1,9 +1,12 @@
const ipcRenderer = require("electron").ipcRenderer;
let update_status = () => {
- // show a toast message if no Internet connection has been detected.
+ // if offline, show toast and offline icon
if (! navigator.onLine) {
ipcRenderer.send("no-internet");
+ offline.classList.remove("hidden");
+ } else { // remove offline icon
+ offline.classList.add("hidden");
}
}