New: Loads of Backend Updates to Clients and Indexers

This commit is contained in:
Qstick
2019-06-13 23:54:25 -04:00
parent c48838e5b6
commit 8a9e2dc90d
345 changed files with 5859 additions and 2669 deletions

View File

@@ -38,7 +38,8 @@ function EditIndexerModalContent(props) {
implementationName,
name,
enableRss,
enableSearch,
enableAutomaticSearch,
enableInteractiveSearch,
supportsRss,
supportsSearch,
fields
@@ -63,9 +64,7 @@ function EditIndexerModalContent(props) {
{
!isFetching && !error &&
<Form
{...otherProps}
>
<Form {...otherProps}>
<FormGroup>
<FormLabel>Name</FormLabel>
@@ -91,15 +90,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 Radarr' : undefined}
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' : undefined}
helpTextWarning={supportsSearch.value ? undefined : 'Search is not supported with this indexer'}
isDisabled={!supportsSearch.value}
{...enableInteractiveSearch}
onChange={onInputChange}
/>
</FormGroup>

View File

@@ -55,7 +55,8 @@ class Indexer extends Component {
id,
name,
enableRss,
enableSearch,
enableAutomaticSearch,
enableInteractiveSearch,
supportsRss,
supportsSearch
} = this.props;
@@ -80,14 +81,21 @@ class Indexer extends Component {
}
{
supportsSearch && enableSearch &&
supportsSearch && enableAutomaticSearch &&
<Label kind={kinds.SUCCESS}>
Search
Automatic Search
</Label>
}
{
!enableRss && !enableSearch &&
supportsSearch && enableInteractiveSearch &&
<Label kind={kinds.SUCCESS}>
Interactive Search
</Label>
}
{
!enableRss && !enableAutomaticSearch && !enableInteractiveSearch &&
<Label
kind={kinds.DISABLED}
outline={true}
@@ -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

@@ -0,0 +1,33 @@
import PropTypes from 'prop-types';
import React from 'react';
import formatBytes from 'Utilities/Number/formatBytes';
function QualityDefinitionLimits(props) {
const {
bytes,
message
} = props;
if (!bytes) {
return <div>{message}</div>;
}
const thirty = formatBytes(bytes * 30);
const fourtyFive = formatBytes(bytes * 45);
const sixty = formatBytes(bytes * 60);
return (
<div>
<div>30 Minutes: {thirty}</div>
<div>45 Minutes: {fourtyFive}</div>
<div>60 Minutes: {sixty}</div>
</div>
);
}
QualityDefinitionLimits.propTypes = {
bytes: PropTypes.number,
message: PropTypes.string.isRequired
};
export default QualityDefinitionLimits;