From 529eb25ced3337aadafd44bcf43e3ae6f192614a Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 8 Mar 2017 10:13:45 -0800 Subject: [PATCH 1/3] Convert alert to a log.error --- app/scripts/popup-core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/popup-core.js b/app/scripts/popup-core.js index 0c97a5d19..ae8539a30 100644 --- a/app/scripts/popup-core.js +++ b/app/scripts/popup-core.js @@ -50,7 +50,7 @@ function setupControllerConnection (connectionStream, cb) { function setupApp (err, accountManager) { if (err) { - alert(err.stack) + log.error(err.stack) throw err } From 6f980cfe10d32ddc276b737df42005ef7cf4cd96 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 8 Mar 2017 10:46:17 -0800 Subject: [PATCH 2/3] Add more informative message --- app/scripts/popup-core.js | 4 +++- ui/app/css/lib.css | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/scripts/popup-core.js b/app/scripts/popup-core.js index ae8539a30..e093d06f4 100644 --- a/app/scripts/popup-core.js +++ b/app/scripts/popup-core.js @@ -49,12 +49,14 @@ function setupControllerConnection (connectionStream, cb) { } function setupApp (err, accountManager) { + var container = document.getElementById('app-content') if (err) { + container.innerHTML = '
The MetaMask app failed to load: please restart MetaMask
' + container.style.height = '80px' log.error(err.stack) throw err } - var container = document.getElementById('app-content') MetaMaskUi({ container: container, diff --git a/ui/app/css/lib.css b/ui/app/css/lib.css index a8df1d115..99c6f1b9d 100644 --- a/ui/app/css/lib.css +++ b/ui/app/css/lib.css @@ -256,3 +256,9 @@ hr.horizontal-line { text-overflow: ellipsis; white-space: nowrap; } + +.critical-error { + text-align: center; + margin-top: 20px; + color: red; +} From acc9a2a9d05269511efe26bd790cbc256533c19e Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 8 Mar 2017 10:53:11 -0800 Subject: [PATCH 3/3] Modify message. --- app/scripts/popup-core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/popup-core.js b/app/scripts/popup-core.js index e093d06f4..b1e521a7a 100644 --- a/app/scripts/popup-core.js +++ b/app/scripts/popup-core.js @@ -51,7 +51,7 @@ function setupControllerConnection (connectionStream, cb) { function setupApp (err, accountManager) { var container = document.getElementById('app-content') if (err) { - container.innerHTML = '
The MetaMask app failed to load: please restart MetaMask
' + container.innerHTML = '
The MetaMask app failed to load: please open and close MetaMask again to restart.
' container.style.height = '80px' log.error(err.stack) throw err