|
|
@ -14,16 +14,18 @@ class BookIndexFooter extends PureComponent {
|
|
|
|
// Render
|
|
|
|
// Render
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
const { author } = this.props;
|
|
|
|
const { book } = this.props;
|
|
|
|
const count = author.length;
|
|
|
|
const count = book.length;
|
|
|
|
let books = 0;
|
|
|
|
let books = 0;
|
|
|
|
let bookFiles = 0;
|
|
|
|
let bookFiles = 0;
|
|
|
|
let ended = 0;
|
|
|
|
|
|
|
|
let continuing = 0;
|
|
|
|
|
|
|
|
let monitored = 0;
|
|
|
|
let monitored = 0;
|
|
|
|
let totalFileSize = 0;
|
|
|
|
let totalFileSize = 0;
|
|
|
|
|
|
|
|
|
|
|
|
author.forEach((s) => {
|
|
|
|
const authors = new Set();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
book.forEach((s) => {
|
|
|
|
|
|
|
|
authors.add(s.authorId);
|
|
|
|
|
|
|
|
|
|
|
|
const { statistics = {} } = s;
|
|
|
|
const { statistics = {} } = s;
|
|
|
|
|
|
|
|
|
|
|
|
const {
|
|
|
|
const {
|
|
|
@ -35,12 +37,6 @@ class BookIndexFooter extends PureComponent {
|
|
|
|
books += bookCount;
|
|
|
|
books += bookCount;
|
|
|
|
bookFiles += bookFileCount;
|
|
|
|
bookFiles += bookFileCount;
|
|
|
|
|
|
|
|
|
|
|
|
if (s.status === 'ended') {
|
|
|
|
|
|
|
|
ended++;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
continuing++;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (s.monitored) {
|
|
|
|
if (s.monitored) {
|
|
|
|
monitored++;
|
|
|
|
monitored++;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -104,23 +100,6 @@ class BookIndexFooter extends PureComponent {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className={styles.statistics}>
|
|
|
|
<div className={styles.statistics}>
|
|
|
|
<DescriptionList>
|
|
|
|
|
|
|
|
<DescriptionListItem
|
|
|
|
|
|
|
|
title={translate('Authors')}
|
|
|
|
|
|
|
|
data={count}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<DescriptionListItem
|
|
|
|
|
|
|
|
title={translate('Ended')}
|
|
|
|
|
|
|
|
data={ended}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<DescriptionListItem
|
|
|
|
|
|
|
|
title={translate('Continuing')}
|
|
|
|
|
|
|
|
data={continuing}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</DescriptionList>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<DescriptionList>
|
|
|
|
<DescriptionList>
|
|
|
|
<DescriptionListItem
|
|
|
|
<DescriptionListItem
|
|
|
|
title={translate('Monitored')}
|
|
|
|
title={translate('Monitored')}
|
|
|
@ -134,6 +113,11 @@ class BookIndexFooter extends PureComponent {
|
|
|
|
</DescriptionList>
|
|
|
|
</DescriptionList>
|
|
|
|
|
|
|
|
|
|
|
|
<DescriptionList>
|
|
|
|
<DescriptionList>
|
|
|
|
|
|
|
|
<DescriptionListItem
|
|
|
|
|
|
|
|
title={translate('Authors')}
|
|
|
|
|
|
|
|
data={authors.size}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<DescriptionListItem
|
|
|
|
<DescriptionListItem
|
|
|
|
title={translate('Books')}
|
|
|
|
title={translate('Books')}
|
|
|
|
data={books}
|
|
|
|
data={books}
|
|
|
@ -161,7 +145,7 @@ class BookIndexFooter extends PureComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BookIndexFooter.propTypes = {
|
|
|
|
BookIndexFooter.propTypes = {
|
|
|
|
author: PropTypes.arrayOf(PropTypes.object).isRequired
|
|
|
|
book: PropTypes.arrayOf(PropTypes.object).isRequired
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export default BookIndexFooter;
|
|
|
|
export default BookIndexFooter;
|
|
|
|