mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
New: Author folder hint when selecting a root folder while adding a new author
(cherry picked from commit dd09f31abb4dd3f699bcff0a47577075300c70ee) Fix AuthorFolderAsRootFolderValidator (cherry picked from commit 0ce81e1ab69d43fde382cc4ae22cd46fe626dea7)
This commit is contained in:
@@ -82,7 +82,8 @@ class AddNewItem extends Component {
|
||||
render() {
|
||||
const {
|
||||
error,
|
||||
items
|
||||
items,
|
||||
hasExistingAuthors
|
||||
} = this.props;
|
||||
|
||||
const term = this.state.term;
|
||||
@@ -186,7 +187,8 @@ class AddNewItem extends Component {
|
||||
}
|
||||
|
||||
{
|
||||
!term &&
|
||||
term ?
|
||||
null :
|
||||
<div className={styles.message}>
|
||||
<div className={styles.helpText}>
|
||||
{translate('ItsEasyToAddANewAuthorOrBookJustStartTypingTheNameOfTheItemYouWantToAdd')}
|
||||
@@ -199,6 +201,24 @@ class AddNewItem extends Component {
|
||||
</div>
|
||||
}
|
||||
|
||||
{
|
||||
!term && !hasExistingAuthors ?
|
||||
<div className={styles.message}>
|
||||
<div className={styles.noAuthorsText}>
|
||||
You haven't added any authors yet, do you want to add an existing library location (Root Folder) and update?
|
||||
</div>
|
||||
<div>
|
||||
<Button
|
||||
to="/settings/mediamanagement"
|
||||
kind={kinds.PRIMARY}
|
||||
>
|
||||
{translate('AddRootFolder')}
|
||||
</Button>
|
||||
</div>
|
||||
</div> :
|
||||
null
|
||||
}
|
||||
|
||||
<div />
|
||||
</PageContentBody>
|
||||
</PageContent>
|
||||
@@ -213,6 +233,7 @@ AddNewItem.propTypes = {
|
||||
isAdding: PropTypes.bool.isRequired,
|
||||
addError: PropTypes.object,
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
hasExistingAuthors: PropTypes.bool.isRequired,
|
||||
onSearchChange: PropTypes.func.isRequired,
|
||||
onClearSearch: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user