Add warning icon and dark backdrop to error dialog

This commit is contained in:
Alex Liebowitz 2016-10-24 23:52:36 -04:00 committed by Alex Work
parent 7f961ccc63
commit edeaf4f7d0
2 changed files with 21 additions and 2 deletions

View file

@ -204,10 +204,14 @@ var App = React.createClass({
: null}
</Modal>
<Modal isOpen={this.state.modal == 'error'} className='error-modal' onConfirmed={this.closeModal}>
<Modal isOpen={this.state.modal == 'error'} type='custom' className='error-modal' overlayClassName='error-modal-overlay'>
<h3>Error</h3>
<p>Sorry, but LBRY has encountered an error! Please <Link href="/?report" label="report a bug" /> and include the details below.</p>
<div className="error-modal__layout">
<Icon icon="icon-warning" className="error-modal__warning-icon" />
<p>Sorry, but LBRY has encountered an error! This has been reported and we will investigate the problem.</p>
</div>
{this.state.errorInfo}
<Link button="alt" label="OK" className="modal__button" onClick={this.closeModal} />
</Modal>
</div>
);

View file

@ -282,7 +282,22 @@ input[type="text"], input[type="search"]
list-style: none;
}
.error-modal-overlay {
background: rgba(#000, .85);
}
.error-modal {
max-width: none;
width: 400px;
}
.error-modal__layout {
display: flex;
padding: 0px 8px 10px 10px;
}
.error-modal .icon-warning {
font-size: 48px;
color: $color-money;
margin-right: 7px;
}