From fd36f5bfc08a9870a11c775b62b162ca625f9cc7 Mon Sep 17 00:00:00 2001 From: Sylvia van Os Date: Thu, 31 Oct 2019 22:23:57 +0100 Subject: [PATCH] Print no internet connection as text instead of a dialog box --- index.html | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/index.html b/index.html index 6cfa1330..29962ebb 100644 --- a/index.html +++ b/index.html @@ -14,21 +14,11 @@ (async () => { await isOnline().then(res => { console.info('Internet Connection', res); - if ( !res && !ipcRenderer.sendSync('getConfig').hideNoConnectionDialog ) { - const { remote } = require('electron'); - remote.dialog.showMessageBox(remote.getCurrentWindow(), { - buttons: ['OK'], - type: 'warning', - checkboxLabel: 'Do not show this message again', - message: 'Please, check your internet connection and restart Rambox. If you use a Proxy, please go to Preferences to configure it.', - title: 'No Internet Connection' - }, - function (__response, checkboxChecked) { - if ( !checkboxChecked ) return; - ipcRenderer.sendSync('sConfig', { - hideNoConnectionDialog: true - }) - }) + if ( !res ) { + document.getElementById("noconnection").style.display = "block"; + setTimeout(function() { + location.reload(); + }, 5000); } }) })(); @@ -66,6 +56,7 @@ +

No Internet Connection

Please, check your internet connection and restart Rambox. If you use a Proxy, please go to Preferences to configure it.