UI Updates, Separate Auto and Manual Searches per Indexer

This commit is contained in:
Qstick 2017-12-02 00:03:12 -05:00
commit 27d65937c0
28 changed files with 202 additions and 117 deletions

View file

@ -153,33 +153,27 @@ class AddNewArtistModalContent extends Component {
/>
</FormGroup>
{
showLanguageProfile &&
<FormGroup>
<FormLabel>Language Profile</FormLabel>
<FormGroup className={showLanguageProfile ? undefined : styles.hideLanguageProfile}>
<FormLabel>Language Profile</FormLabel>
<FormInputGroup
type={inputTypes.LANGUAGE_PROFILE_SELECT}
name="languageProfileId"
onChange={this.onLanguageProfileIdChange}
{...languageProfileId}
/>
</FormGroup>
}
<FormInputGroup
type={inputTypes.LANGUAGE_PROFILE_SELECT}
name="languageProfileId"
onChange={this.onLanguageProfileIdChange}
{...languageProfileId}
/>
</FormGroup>
{
showMetadataProfile &&
<FormGroup>
<FormLabel>Metadata Profile</FormLabel>
<FormGroup className={showMetadataProfile ? undefined : styles.hideMetadataProfile}>
<FormLabel>Metadata Profile</FormLabel>
<FormInputGroup
type={inputTypes.METADATA_PROFILE_SELECT}
name="metadataProfileId"
onChange={this.onMetadataProfileIdChange}
{...metadataProfileId}
/>
</FormGroup>
}
<FormInputGroup
type={inputTypes.METADATA_PROFILE_SELECT}
name="metadataProfileId"
onChange={this.onMetadataProfileIdChange}
{...metadataProfileId}
/>
</FormGroup>
<FormGroup>
<FormLabel>Album Folder</FormLabel>

View file

@ -162,7 +162,6 @@ class ImportArtistFooter extends Component {
{
showLanguageProfile &&
<div className={styles.inputContainer}>
<div className={styles.label}>
Language Profile
@ -181,7 +180,6 @@ class ImportArtistFooter extends Component {
{
showMetadataProfile &&
<div className={styles.inputContainer}>
<div className={styles.label}>
Metadata Profile

View file

@ -4,11 +4,11 @@ import SelectInput from './SelectInput';
const monitorOptions = [
{ key: 'all', value: 'All Albums' },
{ key: 'future', value: 'Future Albums' },
{ key: 'missing', value: 'Missing Albums' },
{ key: 'existing', value: 'Existing Albums' },
{ key: 'first', value: 'Only First Album' },
{ key: 'latest', value: 'Only Latest Album' },
// { key: 'future', value: 'Future Albums' },
// { key: 'missing', value: 'Missing Albums' },
// { key: 'existing', value: 'Existing Albums' },
// { key: 'first', value: 'Only First Album' },
// { key: 'latest', value: 'Only Latest Album' },
{ key: 'none', value: 'None' }
];

View file

@ -23,7 +23,7 @@ export const COMPUTER = 'fa fa-desktop';
export const DANGER = 'fa fa-exclamation-circle';
export const DELETE = 'fa fa-trash';
export const DOWNLOAD = 'fa fa-download';
export const DOWNLOADED = 'fa fa-inbox';
export const DOWNLOADED = 'fa fa-download';
export const DOWNLOADING = 'fa fa-cloud-download';
export const DRIVE = 'fa fa-hdd-o';
export const EDIT = 'fa fa-wrench';

View file

@ -37,7 +37,8 @@ function EditIndexerModalContent(props) {
id,
name,
enableRss,
enableSearch,
enableAutomaticSearch,
enableInteractiveSearch,
supportsRss,
supportsSearch,
fields
@ -90,14 +91,29 @@ function EditIndexerModalContent(props) {
</FormGroup>
<FormGroup>
<FormLabel>Enable Search</FormLabel>
<FormLabel>Enable Automatic Search</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="enableSearch"
name="enableAutomaticSearch"
helpText={supportsSearch.value && 'Will be used when automatic searches are performed via the UI or by Lidarr'}
helpTextWarning={supportsSearch.value ? undefined : 'Search is not supported with this indexer'}
isDisabled={!supportsSearch.value}
{...enableSearch}
{...enableAutomaticSearch}
onChange={onInputChange}
/>
</FormGroup>
<FormGroup>
<FormLabel>Enable Interactive Search</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="enableInteractiveSearch"
helpText={supportsSearch.value && 'Will be used when interactive search is used'}
helpTextWarning={supportsSearch.value ? undefined : 'Search is not supported with this indexer'}
isDisabled={!supportsSearch.value}
{...enableInteractiveSearch}
onChange={onInputChange}
/>
</FormGroup>

View file

@ -67,7 +67,8 @@ class Indexer extends Component {
id,
name,
enableRss,
enableSearch,
enableAutomaticSearch,
enableInteractiveSearch,
supportsRss,
supportsSearch
} = this.props;
@ -90,10 +91,17 @@ class Indexer extends Component {
</Label>
<Label
kind={getLabelKind(supportsSearch, enableSearch)}
outline={supportsSearch && !enableSearch}
kind={getLabelKind(supportsSearch, enableAutomaticSearch)}
outline={supportsSearch && !enableAutomaticSearch}
>
Search
Automatic Search
</Label>
<Label
kind={getLabelKind(supportsSearch, enableInteractiveSearch)}
outline={supportsSearch && !enableInteractiveSearch}
>
Interactive Search
</Label>
</div>
@ -122,7 +130,8 @@ Indexer.propTypes = {
id: PropTypes.number.isRequired,
name: PropTypes.string.isRequired,
enableRss: PropTypes.bool.isRequired,
enableSearch: PropTypes.bool.isRequired,
enableAutomaticSearch: PropTypes.bool.isRequired,
enableInteractiveSearch: PropTypes.bool.isRequired,
supportsRss: PropTypes.bool.isRequired,
supportsSearch: PropTypes.bool.isRequired,
onConfirmDeleteIndexer: PropTypes.func.isRequired

View file

@ -107,12 +107,12 @@ function EditNotificationModalContent(props) {
</FormGroup>
<FormGroup>
<FormLabel>On Download</FormLabel>
<FormLabel>On Import</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="onDownload"
helpText="Be notified when episodes are successfully downloaded"
helpText="Be notified when tracks are successfully imported"
isDisabled={!supportsOnDownload.value}
{...onDownload}
onChange={onInputChange}

View file

@ -80,7 +80,7 @@ export const actionHandlers = handleThunks({
const {
albums,
options: artistMonitoringOptions
} = getMonitoringOptions(_.cloneDeep(s.albums), monitor);
} = getMonitoringOptions(monitor);
if (!monitoringOptions) {
monitoringOptions = artistMonitoringOptions;