lbry-desktop/ui/js/component/load_screen.js

45 lines
1.1 KiB
JavaScript
Raw Normal View History

2016-11-22 21:19:08 +01:00
import React from 'react';
import lbry from '../lbry.js';
import {BusyMessage, Icon} from './common.js';
2017-04-07 07:15:22 +02:00
import Link from 'component/link'
2016-11-22 21:19:08 +01:00
2017-05-17 10:10:25 +02:00
class LoadScreen extends React.Component {
static propTypes = {
message: React.PropTypes.string.isRequired,
details: React.PropTypes.string,
isWarning: React.PropTypes.bool,
2017-05-17 10:10:25 +02:00
}
constructor(props) {
super(props);
this.state = {
message: null,
details: null,
isLagging: false,
2017-05-17 10:10:25 +02:00
};
}
static defaultProps = {
isWarning: false,
}
render() {
const imgSrc = lbry.imagePath('lbry-white-485x160.png');
return (
2017-01-31 07:58:25 +01:00
<div className="load-screen">
<img src={imgSrc} alt="LBRY"/>
2017-01-31 07:58:25 +01:00
<div className="load-screen__message">
<h3>
<BusyMessage message={this.props.message} />
</h3>
{this.props.isWarning ? <Icon icon="icon-warning" /> : null} <span className={'load-screen__details ' + (this.props.isWarning ? 'load-screen__details--warning' : '')}>{this.props.details}</span>
</div>
</div>
);
}
2017-05-17 10:10:25 +02:00
}
2016-11-22 21:19:08 +01:00
export default LoadScreen;