New: Artist folder hint when selecting a root folder while adding a new artist

Closes #1214
Closes #1467
This commit is contained in:
Mark McDowall 2019-08-03 18:55:31 -07:00 committed by Bogdan
parent 86130751c2
commit a16463eeb3
26 changed files with 237 additions and 30 deletions

View file

@ -7,7 +7,7 @@ import Link from 'Components/Link/Link';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import PageContent from 'Components/Page/PageContent';
import PageContentBody from 'Components/Page/PageContentBody';
import { icons } from 'Helpers/Props';
import { icons, kinds } from 'Helpers/Props';
import getErrorMessage from 'Utilities/Object/getErrorMessage';
import translate from 'Utilities/String/translate';
import AddNewAlbumSearchResultConnector from './Album/AddNewAlbumSearchResultConnector';
@ -81,7 +81,8 @@ class AddNewItem extends Component {
render() {
const {
error,
items
items,
hasExistingArtists
} = this.props;
const term = this.state.term;
@ -178,7 +179,8 @@ class AddNewItem extends Component {
}
{
!term &&
term ?
null :
<div className={styles.message}>
<div className={styles.helpText}>
{translate('ItsEasyToAddANewArtistJustStartTypingTheNameOfTheArtistYouWantToAdd')}
@ -191,6 +193,24 @@ class AddNewItem extends Component {
</div>
}
{
!term && !hasExistingArtists ?
<div className={styles.message}>
<div className={styles.noArtistsText}>
You haven't added any artists yet, do you want to add an existing library location (Root Folder) and update?
</div>
<div>
<Button
to="/settings/mediamanagement"
kind={kinds.PRIMARY}
>
Add Root Folder
</Button>
</div>
</div> :
null
}
<div />
</PageContentBody>
</PageContent>
@ -205,6 +225,7 @@ AddNewItem.propTypes = {
isAdding: PropTypes.bool.isRequired,
addError: PropTypes.object,
items: PropTypes.arrayOf(PropTypes.object).isRequired,
hasExistingArtists: PropTypes.bool.isRequired,
onSearchChange: PropTypes.func.isRequired,
onClearSearch: PropTypes.func.isRequired
};