diff --git a/application/error-center/index.js b/application/error-center/index.js
index 75d92f9f8..ad895fe40 100644
--- a/application/error-center/index.js
+++ b/application/error-center/index.js
@@ -7,7 +7,8 @@ var errorCenter = {
return {
source: window,
errors: [],
- isErrorsVisible: false
+ isErrorsVisible: false,
+ numberDisplayed: 3
}
},
getInitialState(){
@@ -24,30 +25,26 @@ var errorCenter = {
_toggleVisible(){
this.setState({isErrorsVisible: !this.state.isErrorsVisible})
},
- /** @inheriteddoc */
- render() {
+ _renderErrors(){
return (
- {this.state.errors.length}
+ {this.state.errors.length}
- {
- this.state.errors.length > 1
- &&
-
- }
- {
- this.state.errors.length > 1
- &&
-
- }
+ {window.location.reload();}}>
+
+ {this.setState({errors: []})}}>
- {this.state.isErrorsVisible ? this.state.errors.map((err)=>{return - {err}
}) : null}
+ {this.state.isErrorsVisible ? this.state.errors.slice(this.state.errors.length - this.props.numberDisplayed, this.state.errors.length).map((err)=>{return - {err}
}) : null}
- );
+ );
+ },
+ /** @inheriteddoc */
+ render() {
+ return this.state.errors.length > 0 ? this._renderErrors() : null;
}
};
diff --git a/application/error-center/style/error-center.scss b/application/error-center/style/error-center.scss
index 593309600..c1fe7cc31 100644
--- a/application/error-center/style/error-center.scss
+++ b/application/error-center/style/error-center.scss
@@ -5,6 +5,41 @@
z-index: 9999999;
max-width: 300px;
min-width: 200px;
- background-color: red;
+ background-color: tomato;
color: white;
+ color: white;
+ div[data-focus='error-counter']{
+ font-weight: bold;
+ font-size: 3em;
+ text-align: center;
+ }
+ div[data-focus='error-actions']{
+ display: flex;
+ font-weight: bold;
+ font-size: 2em;
+ text-align: center;
+ /* Then we define how is distributed the remaining space */
+ justify-content: space-around;
+ }
+ ul[data-focus='error-stack']{
+ padding: 0;
+ margin: 0;
+ list-style: none;
+ display: flex;
+ justify-content: space-around;
+ flex-direction: row;
+ flex-wrap: wrap;
+ li{
+ background: transparent;
+ padding: 5px;
+ width: 300px;
+ height: 92px;
+ margin-top: 10px;
+ line-height: 20px;
+ color: white;
+ font-weight: bold;
+ font-size: 1em;
+ text-align: center;
+ }
+ }
}