From 159cbd40689cf92a56996d494f039634a867083d Mon Sep 17 00:00:00 2001 From: Xaver Maierhofer Date: Sat, 18 Mar 2017 18:53:59 +0100 Subject: [PATCH] [TASK] Improved error message --- lib/main.js | 3 ++- scss/modules/_button.scss | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/main.js b/lib/main.js index 9b53526..d9c8042 100644 --- a/lib/main.js +++ b/lib/main.js @@ -179,7 +179,8 @@ define(['polyglot', 'moment', 'router', 'leaflet', 'gui', 'helper', 'language'], }, 60000); }) .catch(function (e) { - document.body.textContent = e; + document.querySelector('.loader').innerHTML += e.message + + '


or report to your community'; console.warn(e); }); }; diff --git a/scss/modules/_button.scss b/scss/modules/_button.scss index 34031ac..21a7cb5 100644 --- a/scss/modules/_button.scss +++ b/scss/modules/_button.scss @@ -14,6 +14,21 @@ button { transition: box-shadow .5s, background-color .5s, color .5s; width: 1.8em; + &.text { + background: $color-primary; + border: 1px solid $color-primary; + border-radius: 0; + color: $color-white; + font: inherit; + line-height: initial; + padding: 0 20px; + width: auto; + + &:hover { + background: $color-white; + } + } + &.active { box-shadow: 0 0 0 2px $color-primary; }