mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
New: On Health Restored notification
(cherry picked from commit 5fdc8514da7c7ad98192f2ecb2415b3a7b5d0d05) Closes #3631 Closes #3637
This commit is contained in:
parent
42ed5f4c4a
commit
5b701aafc1
37 changed files with 287 additions and 4 deletions
|
@ -62,6 +62,7 @@ class Notification extends Component {
|
|||
onAlbumDelete,
|
||||
onArtistDelete,
|
||||
onHealthIssue,
|
||||
onHealthRestored,
|
||||
onDownloadFailure,
|
||||
onImportFailure,
|
||||
onTrackRetag,
|
||||
|
@ -73,6 +74,7 @@ class Notification extends Component {
|
|||
supportsOnAlbumDelete,
|
||||
supportsOnArtistDelete,
|
||||
supportsOnHealthIssue,
|
||||
supportsOnHealthRestored,
|
||||
supportsOnDownloadFailure,
|
||||
supportsOnImportFailure,
|
||||
supportsOnTrackRetag,
|
||||
|
@ -145,6 +147,14 @@ class Notification extends Component {
|
|||
</Label>
|
||||
}
|
||||
|
||||
{
|
||||
supportsOnHealthRestored && onHealthRestored ?
|
||||
<Label kind={kinds.SUCCESS}>
|
||||
{translate('OnHealthRestored')}
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
supportsOnDownloadFailure && onDownloadFailure &&
|
||||
<Label kind={kinds.SUCCESS} >
|
||||
|
@ -168,12 +178,12 @@ class Notification extends Component {
|
|||
|
||||
{
|
||||
!onGrab && !onReleaseImport && !onRename && !onTrackRetag && !onAlbumDelete && !onArtistDelete &&
|
||||
!onHealthIssue && !onDownloadFailure && !onImportFailure && !onApplicationUpdate &&
|
||||
!onHealthIssue && !onHealthRestored && !onDownloadFailure && !onImportFailure && !onApplicationUpdate &&
|
||||
<Label
|
||||
kind={kinds.DISABLED}
|
||||
outline={true}
|
||||
>
|
||||
Disabled
|
||||
{translate('Disabled')}
|
||||
</Label>
|
||||
}
|
||||
|
||||
|
@ -208,6 +218,7 @@ Notification.propTypes = {
|
|||
onAlbumDelete: PropTypes.bool.isRequired,
|
||||
onArtistDelete: PropTypes.bool.isRequired,
|
||||
onHealthIssue: PropTypes.bool.isRequired,
|
||||
onHealthRestored: PropTypes.bool.isRequired,
|
||||
onDownloadFailure: PropTypes.bool.isRequired,
|
||||
onImportFailure: PropTypes.bool.isRequired,
|
||||
onTrackRetag: PropTypes.bool.isRequired,
|
||||
|
@ -219,6 +230,7 @@ Notification.propTypes = {
|
|||
supportsOnAlbumDelete: PropTypes.bool.isRequired,
|
||||
supportsOnArtistDelete: PropTypes.bool.isRequired,
|
||||
supportsOnHealthIssue: PropTypes.bool.isRequired,
|
||||
supportsOnHealthRestored: PropTypes.bool.isRequired,
|
||||
supportsOnDownloadFailure: PropTypes.bool.isRequired,
|
||||
supportsOnImportFailure: PropTypes.bool.isRequired,
|
||||
supportsOnTrackRetag: PropTypes.bool.isRequired,
|
||||
|
|
|
@ -22,6 +22,7 @@ function NotificationEventItems(props) {
|
|||
onAlbumDelete,
|
||||
onArtistDelete,
|
||||
onHealthIssue,
|
||||
onHealthRestored,
|
||||
onDownloadFailure,
|
||||
onImportFailure,
|
||||
onTrackRetag,
|
||||
|
@ -33,6 +34,7 @@ function NotificationEventItems(props) {
|
|||
supportsOnAlbumDelete,
|
||||
supportsOnArtistDelete,
|
||||
supportsOnHealthIssue,
|
||||
supportsOnHealthRestored,
|
||||
includeHealthWarnings,
|
||||
supportsOnDownloadFailure,
|
||||
supportsOnImportFailure,
|
||||
|
@ -175,8 +177,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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue