diff options
author | Robin Appelman <robin@icewind.nl> | 2016-12-01 16:06:12 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2016-12-01 16:06:12 +0300 |
commit | 60e0291cbfb7b18c29e04c95e1642ffdf24fc8ff (patch) | |
tree | 1a52d9316c749a875223696a165c0678d0b2171c /js | |
parent | 2d0b6be7813bc8fddb93210aca3912849f831bd8 (diff) |
show loading indicator
Diffstat (limited to 'js')
-rw-r--r-- | js/App.js | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -22,7 +22,7 @@ import styles from '../css/app.css'; export class App extends Component { state = { entries: [], - loading: false, + loading: true, levels: [false, false, false, false, false], provider: null, relative: true, @@ -52,7 +52,8 @@ export class App extends Component { dateFormat, provider: this.logProvider }); - this.logProvider.load(); + await this.logProvider.load(); + this.setState({loading: false}); } fetchNextPage = _.throttle(async () => { @@ -129,6 +130,8 @@ export class App extends Component { dateFormat={this.state.dateFormat}/> </div> </ReactScrolla> + } else if (this.state.loading) { + content = <div className="loading log-loading"/> } else { content = <div className="emptycontent"> <div className="icon-filetype-text"/> |