New: Append author name to Interactive Search header

Closes #3343
pull/3354/head
Bogdan 8 months ago
parent d6c631457c
commit 5e7e0eb50b

@ -59,6 +59,7 @@ class BookRow extends Component {
releaseDate,
title,
seriesTitle,
authorName,
position,
pageCount,
ratings,
@ -211,6 +212,7 @@ class BookRow extends Component {
bookId={id}
authorId={authorId}
bookTitle={title}
authorName={authorName}
/>
);
}
@ -229,6 +231,7 @@ BookRow.propTypes = {
releaseDate: PropTypes.string,
title: PropTypes.string.isRequired,
seriesTitle: PropTypes.string.isRequired,
authorName: PropTypes.string.isRequired,
position: PropTypes.string,
pageCount: PropTypes.number,
ratings: PropTypes.object.isRequired,

@ -33,6 +33,7 @@ function createMapStateToProps() {
(author = {}, bookFiles, bookId) => {
return {
authorMonitored: author.monitored,
authorName: author.authorName,
bookFiles: bookFiles[bookId] ?? []
};
}

@ -38,6 +38,7 @@ class BookSearchCell extends Component {
const {
bookId,
bookTitle,
authorName,
isSearching,
onSearchPress,
...otherProps
@ -60,6 +61,7 @@ class BookSearchCell extends Component {
isOpen={this.state.isDetailsModalOpen}
bookId={bookId}
bookTitle={bookTitle}
authorName={authorName}
onModalClose={this.onDetailsModalClose}
{...otherProps}
/>
@ -73,6 +75,7 @@ BookSearchCell.propTypes = {
bookId: PropTypes.number.isRequired,
authorId: PropTypes.number.isRequired,
bookTitle: PropTypes.string.isRequired,
authorName: PropTypes.string.isRequired,
isSearching: PropTypes.bool.isRequired,
onSearchPress: PropTypes.func.isRequired
};

@ -9,6 +9,7 @@ function BookInteractiveSearchModal(props) {
isOpen,
bookId,
bookTitle,
authorName,
onModalClose
} = props;
@ -22,6 +23,7 @@ function BookInteractiveSearchModal(props) {
<BookInteractiveSearchModalContent
bookId={bookId}
bookTitle={bookTitle}
authorName={authorName}
onModalClose={onModalClose}
/>
</Modal>
@ -32,6 +34,7 @@ BookInteractiveSearchModal.propTypes = {
isOpen: PropTypes.bool.isRequired,
bookId: PropTypes.number.isRequired,
bookTitle: PropTypes.string.isRequired,
authorName: PropTypes.string.isRequired,
onModalClose: PropTypes.func.isRequired
};

@ -7,18 +7,23 @@ import ModalFooter from 'Components/Modal/ModalFooter';
import ModalHeader from 'Components/Modal/ModalHeader';
import { scrollDirections } from 'Helpers/Props';
import InteractiveSearchConnector from 'InteractiveSearch/InteractiveSearchConnector';
import translate from 'Utilities/String/translate';
function BookInteractiveSearchModalContent(props) {
const {
bookId,
bookTitle,
authorName,
onModalClose
} = props;
return (
<ModalContent onModalClose={onModalClose}>
<ModalHeader>
Interactive Search {bookId != null && `- ${bookTitle}`}
{bookId === null ?
translate('InteractiveSearchModalHeader') :
translate('InteractiveSearchModalHeaderBookAuthor', { bookTitle, authorName })
}
</ModalHeader>
<ModalBody scrollDirection={scrollDirections.BOTH}>
@ -32,7 +37,7 @@ function BookInteractiveSearchModalContent(props) {
<ModalFooter>
<Button onPress={onModalClose}>
Close
{translate('Close')}
</Button>
</ModalFooter>
</ModalContent>
@ -42,6 +47,7 @@ function BookInteractiveSearchModalContent(props) {
BookInteractiveSearchModalContent.propTypes = {
bookId: PropTypes.number.isRequired,
bookTitle: PropTypes.string.isRequired,
authorName: PropTypes.string.isRequired,
onModalClose: PropTypes.func.isRequired
};

@ -459,6 +459,8 @@
"IndexersSettingsSummary": "Indexers and release restrictions",
"InstanceName": "Instance Name",
"InstanceNameHelpText": "Instance name in tab and for Syslog app name",
"InteractiveSearchModalHeader": "Interactive Search",
"InteractiveSearchModalHeaderBookAuthor": "Interactive Search - {bookTitle} by {authorName}",
"Interval": "Interval",
"InvalidUILanguage": "Your UI is set to an invalid language, correct it and save your settings",
"IsCalibreLibraryHelpText": "Use Calibre Content Server to manipulate library",

Loading…
Cancel
Save