mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-22 22:34:53 -04:00
abe7a85a39
* New: Display UI before movies have loaded * Revised webpack bundling * New: Option for production build with profiling * Fixed: Faster hasDifferentItems and specialized OrOrder version * Fixed: Faster movie selector * Fixed: Speed up release processing, add indices (migration 161) * Fixed: Use a worker for UI fuzzy search * Fixed: Don't loop over all movies if we know none selected * Fixed: Strip UrlBase from UI events before sending to sentry Should mean that source maps are picked up correctly. * Better selection of jump bar items Show first, last and most common items * Fixed: Don't repeatedly re-render cells * Rework Movie Index and virtualTable * Corresponding improvements for AddListMovie and ImportMovie
93 lines
2.6 KiB
JavaScript
93 lines
2.6 KiB
JavaScript
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import { inputTypes } from 'Helpers/Props';
|
|
import FormInputGroup from 'Components/Form/FormInputGroup';
|
|
import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell';
|
|
import VirtualTableSelectCell from 'Components/Table/Cells/VirtualTableSelectCell';
|
|
import ImportMovieSelectMovieConnector from './SelectMovie/ImportMovieSelectMovieConnector';
|
|
import styles from './ImportMovieRow.css';
|
|
|
|
function ImportMovieRow(props) {
|
|
const {
|
|
id,
|
|
monitor,
|
|
qualityProfileId,
|
|
minimumAvailability,
|
|
selectedMovie,
|
|
isExistingMovie,
|
|
isSelected,
|
|
onSelectedChange,
|
|
onInputChange
|
|
} = props;
|
|
|
|
return (
|
|
<>
|
|
<VirtualTableSelectCell
|
|
inputClassName={styles.selectInput}
|
|
id={id}
|
|
isSelected={isSelected}
|
|
isDisabled={!selectedMovie || isExistingMovie}
|
|
onSelectedChange={onSelectedChange}
|
|
/>
|
|
|
|
<VirtualTableRowCell className={styles.folder}>
|
|
{id}
|
|
</VirtualTableRowCell>
|
|
|
|
<VirtualTableRowCell className={styles.monitor}>
|
|
<FormInputGroup
|
|
type={inputTypes.MOVIE_MONITORED_SELECT}
|
|
name="monitor"
|
|
value={monitor}
|
|
onChange={onInputChange}
|
|
/>
|
|
</VirtualTableRowCell>
|
|
|
|
<VirtualTableRowCell className={styles.minimumAvailability}>
|
|
<FormInputGroup
|
|
type={inputTypes.AVAILABILITY_SELECT}
|
|
name="minimumAvailability"
|
|
value={minimumAvailability}
|
|
onChange={onInputChange}
|
|
/>
|
|
</VirtualTableRowCell>
|
|
|
|
<VirtualTableRowCell className={styles.qualityProfile}>
|
|
<FormInputGroup
|
|
type={inputTypes.QUALITY_PROFILE_SELECT}
|
|
name="qualityProfileId"
|
|
value={qualityProfileId}
|
|
onChange={onInputChange}
|
|
/>
|
|
</VirtualTableRowCell>
|
|
|
|
<VirtualTableRowCell className={styles.movie}>
|
|
<ImportMovieSelectMovieConnector
|
|
id={id}
|
|
isExistingMovie={isExistingMovie}
|
|
/>
|
|
</VirtualTableRowCell>
|
|
</>
|
|
);
|
|
}
|
|
|
|
ImportMovieRow.propTypes = {
|
|
id: PropTypes.string.isRequired,
|
|
monitor: PropTypes.string.isRequired,
|
|
qualityProfileId: PropTypes.number.isRequired,
|
|
minimumAvailability: PropTypes.string.isRequired,
|
|
selectedMovie: PropTypes.object,
|
|
isExistingMovie: PropTypes.bool.isRequired,
|
|
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
queued: PropTypes.bool.isRequired,
|
|
isSelected: PropTypes.bool,
|
|
onSelectedChange: PropTypes.func.isRequired,
|
|
onInputChange: PropTypes.func.isRequired
|
|
};
|
|
|
|
ImportMovieRow.defaultsProps = {
|
|
items: []
|
|
};
|
|
|
|
export default ImportMovieRow;
|