From 1e82c7a67a51f1125f703c1b49bcfcadde73d674 Mon Sep 17 00:00:00 2001 From: ta264 Date: Thu, 2 Sep 2021 21:12:14 +0100 Subject: [PATCH] New: Add book, series and files counts to author details page --- frontend/src/Author/Details/AuthorDetails.js | 13 +++++++------ src/NzbDrone.Core/Localization/Core/en.json | 5 ++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/frontend/src/Author/Details/AuthorDetails.js b/frontend/src/Author/Details/AuthorDetails.js index 51590b81e..4eb43455d 100644 --- a/frontend/src/Author/Details/AuthorDetails.js +++ b/frontend/src/Author/Details/AuthorDetails.js @@ -164,7 +164,8 @@ class AuthorDetails extends Component { previousAuthor, nextAuthor, onRefreshPress, - onSearchPress + onSearchPress, + statistics } = this.props; const { @@ -331,35 +332,35 @@ class AuthorDetails extends Component { className={styles.tab} selectedClassName={styles.selectedTab} > - Books + {translate('BooksTotal', [statistics.totalBookCount])} - Series + {translate('SeriesTotal', [series.length])} - History + {translate('History')} - Search + {translate('Search')} - Files + {translate('FilesTotal', [statistics.bookFileCount])} { diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index 0ed482b47..cdd8c45df 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -76,6 +76,7 @@ "BookMonitoring": "Book Monitoring", "BookNaming": "Book Naming", "Books": "Books", + "BooksTotal": "Books ({0})", "BookStudio": "Book Studio", "BookTitle": "Book Title", "Branch": "Branch", @@ -229,6 +230,7 @@ "Filename": "Filename", "FileNames": "File Names", "Files": "Files", + "FilesTotal": "Files ({0})", "FilterAnalyticsEvents": "Filter Analytics Events", "FilterAuthor": "Filter Author", "FilterPlaceHolder": "Filter Book", @@ -553,6 +555,7 @@ "SendMetadataToCalibre": "Send Metadata to Calibre", "Series": "Series", "SeriesNumber": "Series Number", + "SeriesTotal": "Series ({0})", "SetPermissions": "Set Permissions", "SetPermissionsLinuxHelpText": "Should chmod be run when files are imported/renamed?", "SetPermissionsLinuxHelpTextWarning": "If you're unsure what these settings do, do not alter them.", @@ -574,9 +577,9 @@ "ShowPath": "Show Path", "ShowQualityProfile": "Show Quality Profile", "ShowQualityProfileHelpText": "Show quality profile under poster", - "ShowReleaseDate": "Show Release Date", "ShowRelativeDates": "Show Relative Dates", "ShowRelativeDatesHelpText": "Show relative (Today/Yesterday/etc) or absolute dates", + "ShowReleaseDate": "Show Release Date", "ShowSearch": "Show Search", "ShowSearchActionHelpText": "Show search button on hover", "ShowSizeOnDisk": "Show Size on Disk",