You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.9 KiB
68 lines
1.9 KiB
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import FormGroup from 'Components/Form/FormGroup';
|
|
import FormInputGroup from 'Components/Form/FormInputGroup';
|
|
import FormInputHelpText from 'Components/Form/FormInputHelpText';
|
|
import FormLabel from 'Components/Form/FormLabel';
|
|
import { inputTypes } from 'Helpers/Props';
|
|
import translate from 'Utilities/String/translate';
|
|
import styles from './NotificationEventItems.css';
|
|
|
|
function NotificationEventItems(props) {
|
|
const {
|
|
item,
|
|
onInputChange
|
|
} = props;
|
|
|
|
const {
|
|
onHealthIssue,
|
|
supportsOnHealthIssue,
|
|
includeHealthWarnings
|
|
} = item;
|
|
|
|
return (
|
|
<FormGroup>
|
|
<FormLabel>{translate('NotificationTriggers')}</FormLabel>
|
|
<div>
|
|
<FormInputHelpText
|
|
text={translate('NotificationTriggersHelpText')}
|
|
link="https://wiki.servarr.com/prowlarr/settings#connections"
|
|
/>
|
|
<div className={styles.events}>
|
|
<div>
|
|
<FormInputGroup
|
|
type={inputTypes.CHECK}
|
|
name="onHealthIssue"
|
|
helpText={translate('OnHealthIssueHelpText')}
|
|
isDisabled={!supportsOnHealthIssue.value}
|
|
{...onHealthIssue}
|
|
onChange={onInputChange}
|
|
/>
|
|
</div>
|
|
|
|
{
|
|
onHealthIssue.value &&
|
|
<div>
|
|
<FormInputGroup
|
|
type={inputTypes.CHECK}
|
|
name="includeHealthWarnings"
|
|
helpText={translate('IncludeHealthWarningsHelpText')}
|
|
isDisabled={!supportsOnHealthIssue.value}
|
|
{...includeHealthWarnings}
|
|
onChange={onInputChange}
|
|
/>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</FormGroup>
|
|
);
|
|
}
|
|
|
|
NotificationEventItems.propTypes = {
|
|
item: PropTypes.object.isRequired,
|
|
onInputChange: PropTypes.func.isRequired
|
|
};
|
|
|
|
export default NotificationEventItems;
|