add "update is available" check

This commit is contained in:
or-else
2018-11-01 17:39:37 +03:00
parent 20cf802d3d
commit 00e48b7c93
10 changed files with 52 additions and 20 deletions
+6 -6
View File
@@ -27,13 +27,13 @@ export default class ErrorPanel extends React.PureComponent {
}
render() {
var icon = this.props.level == 'err' ? 'error': 'warning';
const icons = {err: 'error', warn: 'warning', info: 'info'}
const level = icons[this.props.level] || '';
const className = 'alert-box ' + level;
return (
<div className={this.state.show ?
(this.props.level == 'err' ? 'alert-box error' : 'alert-box warning') :
"alert-box"}>
<div className="icon"><i className="material-icons">{icon}</i></div>
{this.props.text}
<div className={className}>
<div className="icon"><i className="material-icons">{level}</i></div>
<span dangerouslySetInnerHTML={{__html: this.props.text}} />
<div className="cancel"><MenuCancel onCancel={this.hide} /></div>
</div>
);