1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-25 22:37:27 -04:00

New: On Health Restored notification

(cherry picked from commit 5fdc8514da7c7ad98192f2ecb2415b3a7b5d0d05)
This commit is contained in:
The Dark
2023-05-08 02:57:14 +01:00
committed by Bogdan
parent 164f9ca868
commit 8563ed0a20
37 changed files with 286 additions and 4 deletions
@@ -64,6 +64,7 @@ class Notification extends Component {
onMovieFileDelete,
onMovieFileDeleteForUpgrade,
onHealthIssue,
onHealthRestored,
onApplicationUpdate,
supportsOnGrab,
supportsOnDownload,
@@ -74,6 +75,7 @@ class Notification extends Component {
supportsOnMovieFileDelete,
supportsOnMovieFileDeleteForUpgrade,
supportsOnHealthIssue,
supportsOnHealthRestored,
supportsOnApplicationUpdate
} = this.props;
@@ -135,6 +137,14 @@ class Notification extends Component {
null
}
{
supportsOnHealthRestored && onHealthRestored ?
<Label kind={kinds.SUCCESS}>
{translate('OnHealthRestored')}
</Label> :
null
}
{
supportsOnApplicationUpdate && onApplicationUpdate ?
<Label kind={kinds.SUCCESS}>
@@ -168,7 +178,7 @@ class Notification extends Component {
}
{
!onGrab && !onDownload && !onRename && !onHealthIssue && !onApplicationUpdate && !onMovieDelete && !onMovieFileDelete ?
!onGrab && !onDownload && !onRename && !onHealthIssue && !onHealthRestored && !onApplicationUpdate && !onMovieDelete && !onMovieFileDelete ?
<Label
kind={kinds.DISABLED}
outline={true}
@@ -211,6 +221,7 @@ Notification.propTypes = {
onMovieFileDelete: PropTypes.bool.isRequired,
onMovieFileDeleteForUpgrade: PropTypes.bool.isRequired,
onHealthIssue: PropTypes.bool.isRequired,
onHealthRestored: PropTypes.bool.isRequired,
onApplicationUpdate: PropTypes.bool.isRequired,
supportsOnGrab: PropTypes.bool.isRequired,
supportsOnDownload: PropTypes.bool.isRequired,
@@ -221,6 +232,7 @@ Notification.propTypes = {
supportsOnRename: PropTypes.bool.isRequired,
supportsOnMovieAdded: PropTypes.bool.isRequired,
supportsOnHealthIssue: PropTypes.bool.isRequired,
supportsOnHealthRestored: PropTypes.bool.isRequired,
supportsOnApplicationUpdate: PropTypes.bool.isRequired,
onConfirmDeleteNotification: PropTypes.func.isRequired
};
@@ -24,6 +24,7 @@ function NotificationEventItems(props) {
onMovieFileDelete,
onMovieFileDeleteForUpgrade,
onHealthIssue,
onHealthRestored,
onApplicationUpdate,
supportsOnGrab,
supportsOnDownload,
@@ -35,6 +36,7 @@ function NotificationEventItems(props) {
supportsOnMovieFileDeleteForUpgrade,
supportsOnApplicationUpdate,
supportsOnHealthIssue,
supportsOnHealthRestored,
includeHealthWarnings
} = item;
@@ -152,8 +154,19 @@ function NotificationEventItems(props) {
/>
</div>
<div>
<FormInputGroup
type={inputTypes.CHECK}
name="onHealthRestored"
helpText={translate('OnHealthRestoredHelpText')}
isDisabled={!supportsOnHealthRestored.value}
{...onHealthRestored}
onChange={onInputChange}
/>
</div>
{
onHealthIssue.value &&
(onHealthIssue.value || onHealthRestored.value) &&
<div>
<FormInputGroup
type={inputTypes.CHECK}