Merge pull request #33 from lbryio/sonatagreen-myfiles-loading

Sonatagreen myfiles loading
This commit is contained in:
Jeremy Kauffman 2016-08-21 10:57:43 -04:00 committed by GitHub
commit 0221761a5a
5 changed files with 20 additions and 9 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

@ -158,7 +158,11 @@ var MyFilesPage = React.createClass({
},
render: function() {
if (this.state.filesInfo === null) {
return null;
return (
<main className="page">
<BusyMessage message="Loading" />
</main>
);
}
if (!this.state.filesInfo.length) {