mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
New: OnApplicationUpdate Notifications
Fixes #1422 (cherry picked from commit 9e175e28efcfc6ac3e414649b955a10fb0e951e7)
This commit is contained in:
@@ -67,6 +67,7 @@ class Notification extends Component {
|
||||
onDownloadFailure,
|
||||
onImportFailure,
|
||||
onBookRetag,
|
||||
onApplicationUpdate,
|
||||
supportsOnGrab,
|
||||
supportsOnReleaseImport,
|
||||
supportsOnUpgrade,
|
||||
@@ -78,7 +79,8 @@ class Notification extends Component {
|
||||
supportsOnHealthIssue,
|
||||
supportsOnDownloadFailure,
|
||||
supportsOnImportFailure,
|
||||
supportsOnBookRetag
|
||||
supportsOnBookRetag,
|
||||
supportsOnApplicationUpdate
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
@@ -187,6 +189,14 @@ class Notification extends Component {
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
supportsOnApplicationUpdate && onApplicationUpdate ?
|
||||
<Label kind={kinds.SUCCESS} >
|
||||
{translate('OnApplicationUpdate')}
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
!onGrab && !onReleaseImport && !onRename && !onBookRetag && !onHealthIssue && !onDownloadFailure && !onImportFailure ?
|
||||
<Label
|
||||
@@ -234,6 +244,7 @@ Notification.propTypes = {
|
||||
onDownloadFailure: PropTypes.bool.isRequired,
|
||||
onImportFailure: PropTypes.bool.isRequired,
|
||||
onBookRetag: PropTypes.bool.isRequired,
|
||||
onApplicationUpdate: PropTypes.bool.isRequired,
|
||||
supportsOnGrab: PropTypes.bool.isRequired,
|
||||
supportsOnReleaseImport: PropTypes.bool.isRequired,
|
||||
supportsOnUpgrade: PropTypes.bool.isRequired,
|
||||
@@ -246,6 +257,7 @@ Notification.propTypes = {
|
||||
supportsOnDownloadFailure: PropTypes.bool.isRequired,
|
||||
supportsOnImportFailure: PropTypes.bool.isRequired,
|
||||
supportsOnBookRetag: PropTypes.bool.isRequired,
|
||||
supportsOnApplicationUpdate: PropTypes.bool.isRequired,
|
||||
onConfirmDeleteNotification: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ function NotificationEventItems(props) {
|
||||
onDownloadFailure,
|
||||
onImportFailure,
|
||||
onBookRetag,
|
||||
onApplicationUpdate,
|
||||
supportsOnGrab,
|
||||
supportsOnReleaseImport,
|
||||
supportsOnUpgrade,
|
||||
@@ -38,7 +39,8 @@ function NotificationEventItems(props) {
|
||||
includeHealthWarnings,
|
||||
supportsOnDownloadFailure,
|
||||
supportsOnImportFailure,
|
||||
supportsOnBookRetag
|
||||
supportsOnBookRetag,
|
||||
supportsOnApplicationUpdate
|
||||
} = item;
|
||||
|
||||
return (
|
||||
@@ -176,6 +178,17 @@ function NotificationEventItems(props) {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="onApplicationUpdate"
|
||||
helpText={translate('OnApplicationUpdateHelpText')}
|
||||
isDisabled={!supportsOnApplicationUpdate.value}
|
||||
{...onApplicationUpdate}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
@@ -200,6 +213,7 @@ function NotificationEventItems(props) {
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</FormGroup>
|
||||
|
||||
Reference in New Issue
Block a user