import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { icons, kinds, inputTypes, tooltipPositions } from 'Helpers/Props'; import Icon from 'Components/Icon'; import SpinnerButton from 'Components/Link/SpinnerButton'; import Form from 'Components/Form/Form'; import FormGroup from 'Components/Form/FormGroup'; import FormLabel from 'Components/Form/FormLabel'; import FormInputGroup from 'Components/Form/FormInputGroup'; import CheckInput from 'Components/Form/CheckInput'; import ModalContent from 'Components/Modal/ModalContent'; import ModalHeader from 'Components/Modal/ModalHeader'; import ModalBody from 'Components/Modal/ModalBody'; import ModalFooter from 'Components/Modal/ModalFooter'; import Popover from 'Components/Tooltip/Popover'; import ArtistPoster from 'Artist/ArtistPoster'; import ArtistMonitoringOptionsPopoverContent from 'AddArtist/ArtistMonitoringOptionsPopoverContent'; // import SeriesTypePopoverContent from 'AddArtist/SeriesTypePopoverContent'; import styles from './AddNewArtistModalContent.css'; class AddNewArtistModalContent extends Component { // // Lifecycle constructor(props, context) { super(props, context); this.state = { searchForMissingAlbums: false }; } // // Listeners onSearchForMissingAlbumsChange = ({ value }) => { this.setState({ searchForMissingAlbums: value }); } onQualityProfileIdChange = ({ value }) => { this.props.onInputChange({ name: 'qualityProfileId', value: parseInt(value) }); } onLanguageProfileIdChange = ({ value }) => { this.props.onInputChange({ name: 'languageProfileId', value: parseInt(value) }); } onAddArtistPress = () => { this.props.onAddArtistPress(this.state.searchForMissingAlbums); } // // Render render() { const { artistName, overview, images, isAdding, rootFolderPath, monitor, qualityProfileId, languageProfileId, albumFolder, primaryAlbumTypes, secondaryAlbumTypes, tags, showLanguageProfile, isSmallScreen, onModalClose, onInputChange } = this.props; return ( {artistName}
{ !isSmallScreen &&
}
{overview}
Root Folder Monitor } title="Monitoring Options" body={} position={tooltipPositions.RIGHT} /> Quality Profile Language Profile Album Folder Primary Album Types Secondary Album Types Tags
Add {artistName}
); } } AddNewArtistModalContent.propTypes = { artistName: PropTypes.string.isRequired, overview: PropTypes.string, images: PropTypes.arrayOf(PropTypes.object).isRequired, isAdding: PropTypes.bool.isRequired, addError: PropTypes.object, rootFolderPath: PropTypes.object, monitor: PropTypes.object.isRequired, qualityProfileId: PropTypes.object, languageProfileId: PropTypes.object, albumFolder: PropTypes.object.isRequired, primaryAlbumTypes: PropTypes.object.isRequired, secondaryAlbumTypes: PropTypes.object.isRequired, tags: PropTypes.object.isRequired, showLanguageProfile: PropTypes.bool.isRequired, isSmallScreen: PropTypes.bool.isRequired, onModalClose: PropTypes.func.isRequired, onInputChange: PropTypes.func.isRequired, onAddArtistPress: PropTypes.func.isRequired }; export default AddNewArtistModalContent;