UI Updates (Cancel Import, Move Artist, Manual Import from Artist)

Ability to cancel an import lookup/search at any point.
Ability to move artist path from Artist Edit or bulk move from Mass Editor.
Trigger manual import for Artist path from Artist Detail page.
Pulled from Sonarr
This commit is contained in:
Qstick
2017-12-29 22:23:04 -05:00
parent 5fae202760
commit d8c89f5bbd
79 changed files with 1075 additions and 376 deletions
@@ -37,7 +37,8 @@ function createMapStateToProps() {
artistName: artist.artistName,
isSaving,
saveError,
pendingChanges,
isPathChanging: pendingChanges.hasOwnProperty('path'),
originalPath: artist.path,
item: settings.settings,
showLanguageProfile: languageProfiles.items.length > 1,
showMetadataProfile: metadataProfiles.items.length > 1,
@@ -48,8 +49,8 @@ function createMapStateToProps() {
}
const mapDispatchToProps = {
setArtistValue,
saveArtist
dispatchSetArtistValue: setArtistValue,
dispatchSaveArtist: saveArtist
};
class EditArtistModalContentConnector extends Component {
@@ -67,11 +68,14 @@ class EditArtistModalContentConnector extends Component {
// Listeners
onInputChange = ({ name, value }) => {
this.props.setArtistValue({ name, value });
this.props.dispatchSetArtistValue({ name, value });
}
onSavePress = () => {
this.props.saveArtist({ id: this.props.artistId });
onSavePress = (moveFiles) => {
this.props.dispatchSaveArtist({
id: this.props.artistId,
moveFiles
});
}
//
@@ -83,6 +87,7 @@ class EditArtistModalContentConnector extends Component {
{...this.props}
onInputChange={this.onInputChange}
onSavePress={this.onSavePress}
onMoveArtistPress={this.onMoveArtistPress}
/>
);
}
@@ -92,8 +97,8 @@ EditArtistModalContentConnector.propTypes = {
artistId: PropTypes.number,
isSaving: PropTypes.bool.isRequired,
saveError: PropTypes.object,
setArtistValue: PropTypes.func.isRequired,
saveArtist: PropTypes.func.isRequired,
dispatchSetArtistValue: PropTypes.func.isRequired,
dispatchSaveArtist: PropTypes.func.isRequired,
onModalClose: PropTypes.func.isRequired
};