component for busy indicator, use in my_files

This commit is contained in:
Jeremy Kauffman 2016-08-21 10:55:32 -04:00
parent 920f55b4f5
commit f9a1bd99c0
4 changed files with 12 additions and 5 deletions

View file

@ -27,6 +27,15 @@ var TruncatedText = React.createClass({
}
});
var BusyMessage = React.createClass({
propTypes: {
message: React.PropTypes.string
},
render: function() {
return <span>{this.props.message} <span className="busy-indicator"></span></span>
}
});
var toolTipStyle = {
position: 'absolute',
zIndex: '1',

View file

@ -52,8 +52,7 @@ var SplashScreen = React.createClass({
<img src={imgSrc} alt="LBRY"/>
<div style={splashMessageStyle}>
<h3>
{this.props.message}
<span className="busy-indicator"></span>
<BusyMessage message={this.props.message} />
</h3>
<Icon icon='icon-warning' style={this.state.isLagging ? {} : { display: 'none' }}/> <span style={ this.state.isLagging ? {} : {'color': '#c3c3c3'} }>{this.state.details}</span>
</div>

View file

@ -8,8 +8,7 @@ var SearchActive = React.createClass({
render: function() {
return (
<div style={fetchResultsStyle}>
Looking up the Dewey Decimals
<span className="busy-indicator"></span>
<BusyMessage message="Looking up the Dewey Decimals" />
</div>
);
}

View file

@ -160,7 +160,7 @@ var MyFilesPage = React.createClass({
if (this.state.filesInfo === null) {
return (
<main className="page">
<span>Loading...</span>
<BusyMessage message="Loading" />
</main>
);
}