import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { icons, inputTypes, kinds, tooltipPositions } from 'Helpers/Props'; import Button from 'Components/Link/Button'; import SpinnerButton from 'Components/Link/SpinnerButton'; 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 Form from 'Components/Form/Form'; import FormGroup from 'Components/Form/FormGroup'; import FormLabel from 'Components/Form/FormLabel'; import FormInputGroup from 'Components/Form/FormInputGroup'; import Icon from 'Components/Icon'; import Popover from 'Components/Tooltip/Popover'; import MoveArtistModal from 'Artist/MoveArtist/MoveArtistModal'; import ArtistMetadataProfilePopoverContent from 'AddArtist/ArtistMetadataProfilePopoverContent'; import styles from './EditArtistModalContent.css'; class EditArtistModalContent extends Component { // // Lifecycle constructor(props, context) { super(props, context); this.state = { isConfirmMoveModalOpen: false }; } // // Listeners onSavePress = () => { const { isPathChanging, onSavePress } = this.props; if (isPathChanging && !this.state.isConfirmMoveModalOpen) { this.setState({ isConfirmMoveModalOpen: true }); } else { this.setState({ isConfirmMoveModalOpen: false }); onSavePress(false); } } onMoveArtistPress = () => { this.setState({ isConfirmMoveModalOpen: false }); this.props.onSavePress(true); } // // Render render() { const { artistName, item, isSaving, showMetadataProfile, originalPath, onInputChange, onModalClose, onDeleteArtistPress, ...otherProps } = this.props; const { monitored, qualityProfileId, metadataProfileId, path, tags } = item; return ( Edit - {artistName}
Monitored Quality Profile { showMetadataProfile && Metadata Profile } title="Metadata Profile" body={} position={tooltipPositions.RIGHT} /> } Path Tags
Save
); } } EditArtistModalContent.propTypes = { authorId: PropTypes.number.isRequired, artistName: PropTypes.string.isRequired, item: PropTypes.object.isRequired, isSaving: PropTypes.bool.isRequired, showMetadataProfile: PropTypes.bool.isRequired, isPathChanging: PropTypes.bool.isRequired, originalPath: PropTypes.string.isRequired, onInputChange: PropTypes.func.isRequired, onSavePress: PropTypes.func.isRequired, onModalClose: PropTypes.func.isRequired, onDeleteArtistPress: PropTypes.func.isRequired }; export default EditArtistModalContent;