Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/logreader.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-12-01 16:06:12 +0300
committerRobin Appelman <robin@icewind.nl>2016-12-01 16:06:12 +0300
commit60e0291cbfb7b18c29e04c95e1642ffdf24fc8ff (patch)
tree1a52d9316c749a875223696a165c0678d0b2171c /js
parent2d0b6be7813bc8fddb93210aca3912849f831bd8 (diff)
show loading indicator
Diffstat (limited to 'js')
-rw-r--r--js/App.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/App.js b/js/App.js
index bed7e5a..9f464ff 100644
--- a/js/App.js
+++ b/js/App.js
@@ -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"/>