diff options
author | 0neGal <mail@0negal.com> | 2024-12-20 18:39:57 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2024-12-20 18:39:57 +0100 |
commit | 1be8c774251c3a1e1e3559f628aa24b465ab8685 (patch) | |
tree | 0660c8e634f9dd047975e6c8a8122275af3eec6f /src/app/js | |
parent | 554fe88942135583404ddf8c1a97f342287cea5a (diff) | |
download | Viper-1be8c774251c3a1e1e3559f628aa24b465ab8685.tar.gz Viper-1be8c774251c3a1e1e3559f628aa24b465ab8685.zip |
added offline indicator icon
Diffstat (limited to 'src/app/js')
-rw-r--r-- | src/app/js/request.js | 5 |
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"); } } |