import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { kinds } from 'Helpers/Props'; import Alert from 'Components/Alert'; import Button from 'Components/Link/Button'; import FieldSet from 'Components/FieldSet'; import LoadingIndicator from 'Components/Loading/LoadingIndicator'; 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 AddIndexerItem from './AddIndexerItem'; import styles from './AddIndexerModalContent.css'; class AddIndexerModalContent extends Component { // // Render render() { const { isSchemaFetching, isSchemaPopulated, schemaError, usenetIndexers, torrentIndexers, onIndexerSelect, onModalClose } = this.props; return ( Add Indexer { isSchemaFetching && } { !isSchemaFetching && !!schemaError &&
Unable to add a new indexer, please try again.
} { isSchemaPopulated && !schemaError &&
Readarr supports any indexer that uses the Newznab standard, as well as other indexers listed below.
For more information on the individual indexers, click on the info buttons.
{ usenetIndexers.map((indexer) => { return ( ); }) }
{ torrentIndexers.map((indexer) => { return ( ); }) }
}
); } } AddIndexerModalContent.propTypes = { isSchemaFetching: PropTypes.bool.isRequired, isSchemaPopulated: PropTypes.bool.isRequired, schemaError: PropTypes.object, usenetIndexers: PropTypes.arrayOf(PropTypes.object).isRequired, torrentIndexers: PropTypes.arrayOf(PropTypes.object).isRequired, onIndexerSelect: PropTypes.func.isRequired, onModalClose: PropTypes.func.isRequired }; export default AddIndexerModalContent;