|
|
@ -3,11 +3,13 @@ import PropTypes from 'prop-types';
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
// import CheckInput from 'Components/Form/CheckInput';
|
|
|
|
// import CheckInput from 'Components/Form/CheckInput';
|
|
|
|
import FormInputGroup from 'Components/Form/FormInputGroup';
|
|
|
|
import FormInputGroup from 'Components/Form/FormInputGroup';
|
|
|
|
|
|
|
|
import Icon from 'Components/Icon';
|
|
|
|
import Button from 'Components/Link/Button';
|
|
|
|
import Button from 'Components/Link/Button';
|
|
|
|
import SpinnerButton from 'Components/Link/SpinnerButton';
|
|
|
|
import SpinnerButton from 'Components/Link/SpinnerButton';
|
|
|
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
|
|
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
|
|
|
import PageContentFooter from 'Components/Page/PageContentFooter';
|
|
|
|
import PageContentFooter from 'Components/Page/PageContentFooter';
|
|
|
|
import { inputTypes, kinds } from 'Helpers/Props';
|
|
|
|
import Popover from 'Components/Tooltip/Popover';
|
|
|
|
|
|
|
|
import { icons, inputTypes, kinds, tooltipPositions } from 'Helpers/Props';
|
|
|
|
import styles from './ImportMovieFooter.css';
|
|
|
|
import styles from './ImportMovieFooter.css';
|
|
|
|
|
|
|
|
|
|
|
|
const MIXED = 'mixed';
|
|
|
|
const MIXED = 'mixed';
|
|
|
@ -93,7 +95,10 @@ class ImportMovieFooter extends Component {
|
|
|
|
isMonitorMixed,
|
|
|
|
isMonitorMixed,
|
|
|
|
isQualityProfileIdMixed,
|
|
|
|
isQualityProfileIdMixed,
|
|
|
|
isMinimumAvailabilityMixed,
|
|
|
|
isMinimumAvailabilityMixed,
|
|
|
|
|
|
|
|
hasUnsearchedItems,
|
|
|
|
|
|
|
|
importError,
|
|
|
|
onImportPress,
|
|
|
|
onImportPress,
|
|
|
|
|
|
|
|
onLookupPress,
|
|
|
|
onCancelLookupPress
|
|
|
|
onCancelLookupPress
|
|
|
|
} = this.props;
|
|
|
|
} = this.props;
|
|
|
|
|
|
|
|
|
|
|
@ -167,27 +172,71 @@ class ImportMovieFooter extends Component {
|
|
|
|
</SpinnerButton>
|
|
|
|
</SpinnerButton>
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
isLookingUpMovie &&
|
|
|
|
isLookingUpMovie ?
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
className={styles.loadingButton}
|
|
|
|
className={styles.loadingButton}
|
|
|
|
kind={kinds.WARNING}
|
|
|
|
kind={kinds.WARNING}
|
|
|
|
onPress={onCancelLookupPress}
|
|
|
|
onPress={onCancelLookupPress}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
Cancel Processing
|
|
|
|
Cancel Processing
|
|
|
|
</Button>
|
|
|
|
</Button> :
|
|
|
|
|
|
|
|
null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
isLookingUpMovie &&
|
|
|
|
hasUnsearchedItems ?
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
className={styles.loadingButton}
|
|
|
|
|
|
|
|
kind={kinds.SUCCESS}
|
|
|
|
|
|
|
|
onPress={onLookupPress}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
Start Processing
|
|
|
|
|
|
|
|
</Button> :
|
|
|
|
|
|
|
|
null
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
isLookingUpMovie ?
|
|
|
|
<LoadingIndicator
|
|
|
|
<LoadingIndicator
|
|
|
|
className={styles.loading}
|
|
|
|
className={styles.loading}
|
|
|
|
size={24}
|
|
|
|
size={24}
|
|
|
|
/>
|
|
|
|
/> :
|
|
|
|
|
|
|
|
null
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
isLookingUpMovie ?
|
|
|
|
|
|
|
|
'Processing Folders' :
|
|
|
|
|
|
|
|
null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
isLookingUpMovie &&
|
|
|
|
importError ?
|
|
|
|
'Processing Folders'
|
|
|
|
<Popover
|
|
|
|
|
|
|
|
anchor={
|
|
|
|
|
|
|
|
<Icon
|
|
|
|
|
|
|
|
className={styles.importError}
|
|
|
|
|
|
|
|
name={icons.WARNING}
|
|
|
|
|
|
|
|
kind={kinds.WARNING}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
title="Import Errors"
|
|
|
|
|
|
|
|
body={
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
importError.responseJSON.map((error, index) => {
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<li key={index}>
|
|
|
|
|
|
|
|
{error.errorMessage}
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
position={tooltipPositions.RIGHT}
|
|
|
|
|
|
|
|
/> :
|
|
|
|
|
|
|
|
null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -206,8 +255,11 @@ ImportMovieFooter.propTypes = {
|
|
|
|
isMonitorMixed: PropTypes.bool.isRequired,
|
|
|
|
isMonitorMixed: PropTypes.bool.isRequired,
|
|
|
|
isQualityProfileIdMixed: PropTypes.bool.isRequired,
|
|
|
|
isQualityProfileIdMixed: PropTypes.bool.isRequired,
|
|
|
|
isMinimumAvailabilityMixed: PropTypes.bool.isRequired,
|
|
|
|
isMinimumAvailabilityMixed: PropTypes.bool.isRequired,
|
|
|
|
|
|
|
|
hasUnsearchedItems: PropTypes.bool.isRequired,
|
|
|
|
|
|
|
|
importError: PropTypes.object,
|
|
|
|
onInputChange: PropTypes.func.isRequired,
|
|
|
|
onInputChange: PropTypes.func.isRequired,
|
|
|
|
onImportPress: PropTypes.func.isRequired,
|
|
|
|
onImportPress: PropTypes.func.isRequired,
|
|
|
|
|
|
|
|
onLookupPress: PropTypes.func.isRequired,
|
|
|
|
onCancelLookupPress: PropTypes.func.isRequired
|
|
|
|
onCancelLookupPress: PropTypes.func.isRequired
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|