[TASK] Improved error message

This commit is contained in:
Xaver Maierhofer 2017-03-18 18:53:59 +01:00 committed by Geno
parent 5379f7f573
commit 159cbd4068
2 changed files with 17 additions and 1 deletions

View File

@ -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
+ '<br /><br /><button onclick="location.reload(true)" class="btn text">Try to reload</button><br /> or report to your community';
console.warn(e);
});
};

View File

@ -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;
}