New: On Artist Add connection event
(cherry picked from commit dec6e140365981f0391a759db33f4f5de46adc24) Closes #3531
This commit is contained in:
@@ -60,8 +60,9 @@ class Notification extends Component {
|
||||
onReleaseImport,
|
||||
onUpgrade,
|
||||
onRename,
|
||||
onAlbumDelete,
|
||||
onArtistAdd,
|
||||
onArtistDelete,
|
||||
onAlbumDelete,
|
||||
onHealthIssue,
|
||||
onHealthRestored,
|
||||
onDownloadFailure,
|
||||
@@ -72,8 +73,9 @@ class Notification extends Component {
|
||||
supportsOnReleaseImport,
|
||||
supportsOnUpgrade,
|
||||
supportsOnRename,
|
||||
supportsOnAlbumDelete,
|
||||
supportsOnArtistAdd,
|
||||
supportsOnArtistDelete,
|
||||
supportsOnAlbumDelete,
|
||||
supportsOnHealthIssue,
|
||||
supportsOnHealthRestored,
|
||||
supportsOnDownloadFailure,
|
||||
@@ -95,59 +97,75 @@ class Notification extends Component {
|
||||
</div>
|
||||
|
||||
{
|
||||
supportsOnGrab && onGrab &&
|
||||
supportsOnGrab && onGrab ?
|
||||
<Label kind={kinds.SUCCESS}>
|
||||
{translate('OnGrab')}
|
||||
</Label>
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
supportsOnReleaseImport && onReleaseImport &&
|
||||
supportsOnReleaseImport && onReleaseImport ?
|
||||
<Label kind={kinds.SUCCESS}>
|
||||
{translate('OnReleaseImport')}
|
||||
</Label>
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
supportsOnUpgrade && onReleaseImport && onUpgrade &&
|
||||
supportsOnUpgrade && onReleaseImport && onUpgrade ?
|
||||
<Label kind={kinds.SUCCESS}>
|
||||
{translate('OnUpgrade')}
|
||||
</Label>
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
supportsOnRename && onRename &&
|
||||
supportsOnRename && onRename ?
|
||||
<Label kind={kinds.SUCCESS}>
|
||||
{translate('OnRename')}
|
||||
</Label>
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
supportsOnTrackRetag && onTrackRetag &&
|
||||
supportsOnTrackRetag && onTrackRetag ?
|
||||
<Label kind={kinds.SUCCESS}>
|
||||
{translate('OnTrackRetag')}
|
||||
</Label>
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
supportsOnAlbumDelete && onAlbumDelete &&
|
||||
supportsOnArtistAdd && onArtistAdd ?
|
||||
<Label kind={kinds.SUCCESS}>
|
||||
{translate('OnAlbumDelete')}
|
||||
</Label>
|
||||
{translate('OnArtistAdd')}
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
supportsOnArtistDelete && onArtistDelete &&
|
||||
supportsOnArtistDelete && onArtistDelete ?
|
||||
<Label kind={kinds.SUCCESS}>
|
||||
{translate('OnArtistDelete')}
|
||||
</Label>
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
supportsOnHealthIssue && onHealthIssue &&
|
||||
supportsOnAlbumDelete && onAlbumDelete ?
|
||||
<Label kind={kinds.SUCCESS}>
|
||||
{translate('OnAlbumDelete')}
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
supportsOnHealthIssue && onHealthIssue ?
|
||||
<Label kind={kinds.SUCCESS}>
|
||||
{translate('OnHealthIssue')}
|
||||
</Label>
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
@@ -159,35 +177,38 @@ class Notification extends Component {
|
||||
}
|
||||
|
||||
{
|
||||
supportsOnDownloadFailure && onDownloadFailure &&
|
||||
supportsOnDownloadFailure && onDownloadFailure ?
|
||||
<Label kind={kinds.SUCCESS} >
|
||||
{translate('OnDownloadFailure')}
|
||||
</Label>
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
supportsOnImportFailure && onImportFailure &&
|
||||
supportsOnImportFailure && onImportFailure ?
|
||||
<Label kind={kinds.SUCCESS} >
|
||||
{translate('OnImportFailure')}
|
||||
</Label>
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
supportsOnApplicationUpdate && onApplicationUpdate &&
|
||||
supportsOnApplicationUpdate && onApplicationUpdate ?
|
||||
<Label kind={kinds.SUCCESS} >
|
||||
{translate('OnApplicationUpdate')}
|
||||
</Label>
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
!onGrab && !onReleaseImport && !onRename && !onTrackRetag && !onAlbumDelete && !onArtistDelete &&
|
||||
!onHealthIssue && !onHealthRestored && !onDownloadFailure && !onImportFailure && !onApplicationUpdate &&
|
||||
<Label
|
||||
kind={kinds.DISABLED}
|
||||
outline={true}
|
||||
>
|
||||
{translate('Disabled')}
|
||||
</Label>
|
||||
!onGrab && !onReleaseImport && !onRename && !onTrackRetag && !onArtistAdd && !onArtistDelete && !onAlbumDelete && !onHealthIssue && !onHealthRestored && !onDownloadFailure && !onImportFailure && !onApplicationUpdate ?
|
||||
<Label
|
||||
kind={kinds.DISABLED}
|
||||
outline={true}
|
||||
>
|
||||
{translate('Disabled')}
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
<TagList
|
||||
@@ -223,8 +244,9 @@ Notification.propTypes = {
|
||||
onReleaseImport: PropTypes.bool.isRequired,
|
||||
onUpgrade: PropTypes.bool.isRequired,
|
||||
onRename: PropTypes.bool.isRequired,
|
||||
onAlbumDelete: PropTypes.bool.isRequired,
|
||||
onArtistAdd: PropTypes.bool.isRequired,
|
||||
onArtistDelete: PropTypes.bool.isRequired,
|
||||
onAlbumDelete: PropTypes.bool.isRequired,
|
||||
onHealthIssue: PropTypes.bool.isRequired,
|
||||
onHealthRestored: PropTypes.bool.isRequired,
|
||||
onDownloadFailure: PropTypes.bool.isRequired,
|
||||
@@ -235,8 +257,9 @@ Notification.propTypes = {
|
||||
supportsOnReleaseImport: PropTypes.bool.isRequired,
|
||||
supportsOnUpgrade: PropTypes.bool.isRequired,
|
||||
supportsOnRename: PropTypes.bool.isRequired,
|
||||
supportsOnAlbumDelete: PropTypes.bool.isRequired,
|
||||
supportsOnArtistAdd: PropTypes.bool.isRequired,
|
||||
supportsOnArtistDelete: PropTypes.bool.isRequired,
|
||||
supportsOnAlbumDelete: PropTypes.bool.isRequired,
|
||||
supportsOnHealthIssue: PropTypes.bool.isRequired,
|
||||
supportsOnHealthRestored: PropTypes.bool.isRequired,
|
||||
supportsOnDownloadFailure: PropTypes.bool.isRequired,
|
||||
|
||||
@@ -19,8 +19,9 @@ function NotificationEventItems(props) {
|
||||
onReleaseImport,
|
||||
onUpgrade,
|
||||
onRename,
|
||||
onAlbumDelete,
|
||||
onArtistAdd,
|
||||
onArtistDelete,
|
||||
onAlbumDelete,
|
||||
onHealthIssue,
|
||||
onHealthRestored,
|
||||
onDownloadFailure,
|
||||
@@ -31,8 +32,9 @@ function NotificationEventItems(props) {
|
||||
supportsOnReleaseImport,
|
||||
supportsOnUpgrade,
|
||||
supportsOnRename,
|
||||
supportsOnAlbumDelete,
|
||||
supportsOnArtistAdd,
|
||||
supportsOnArtistDelete,
|
||||
supportsOnAlbumDelete,
|
||||
supportsOnHealthIssue,
|
||||
supportsOnHealthRestored,
|
||||
includeHealthWarnings,
|
||||
@@ -57,7 +59,7 @@ function NotificationEventItems(props) {
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="onGrab"
|
||||
helpText={translate('OnGrabHelpText')}
|
||||
helpText={translate('OnGrab')}
|
||||
isDisabled={!supportsOnGrab.value}
|
||||
{...onGrab}
|
||||
onChange={onInputChange}
|
||||
@@ -68,7 +70,7 @@ function NotificationEventItems(props) {
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="onReleaseImport"
|
||||
helpText={translate('OnReleaseImportHelpText')}
|
||||
helpText={translate('OnReleaseImport')}
|
||||
isDisabled={!supportsOnReleaseImport.value}
|
||||
{...onReleaseImport}
|
||||
onChange={onInputChange}
|
||||
@@ -81,7 +83,7 @@ function NotificationEventItems(props) {
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="onUpgrade"
|
||||
helpText={translate('OnUpgradeHelpText')}
|
||||
helpText={translate('OnUpgrade')}
|
||||
isDisabled={!supportsOnUpgrade.value}
|
||||
{...onUpgrade}
|
||||
onChange={onInputChange}
|
||||
@@ -93,7 +95,7 @@ function NotificationEventItems(props) {
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="onDownloadFailure"
|
||||
helpText={translate('OnDownloadFailureHelpText')}
|
||||
helpText={translate('OnDownloadFailure')}
|
||||
isDisabled={!supportsOnDownloadFailure.value}
|
||||
{...onDownloadFailure}
|
||||
onChange={onInputChange}
|
||||
@@ -104,7 +106,7 @@ function NotificationEventItems(props) {
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="onImportFailure"
|
||||
helpText={translate('OnImportFailureHelpText')}
|
||||
helpText={translate('OnImportFailure')}
|
||||
isDisabled={!supportsOnImportFailure.value}
|
||||
{...onImportFailure}
|
||||
onChange={onInputChange}
|
||||
@@ -115,7 +117,7 @@ function NotificationEventItems(props) {
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="onRename"
|
||||
helpText={translate('OnRenameHelpText')}
|
||||
helpText={translate('OnRename')}
|
||||
isDisabled={!supportsOnRename.value}
|
||||
{...onRename}
|
||||
onChange={onInputChange}
|
||||
@@ -126,7 +128,7 @@ function NotificationEventItems(props) {
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="onTrackRetag"
|
||||
helpText={translate('OnTrackRetagHelpText')}
|
||||
helpText={translate('OnTrackRetag')}
|
||||
isDisabled={!supportsOnTrackRetag.value}
|
||||
{...onTrackRetag}
|
||||
onChange={onInputChange}
|
||||
@@ -136,10 +138,10 @@ function NotificationEventItems(props) {
|
||||
<div>
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="onAlbumDelete"
|
||||
helpText={translate('OnAlbumDeleteHelpText')}
|
||||
isDisabled={!supportsOnAlbumDelete.value}
|
||||
{...onAlbumDelete}
|
||||
name="onArtistAdd"
|
||||
helpText={translate('OnArtistAdd')}
|
||||
isDisabled={!supportsOnArtistAdd.value}
|
||||
{...onArtistAdd}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</div>
|
||||
@@ -148,18 +150,29 @@ function NotificationEventItems(props) {
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="onArtistDelete"
|
||||
helpText={translate('OnArtistDeleteHelpText')}
|
||||
helpText={translate('OnArtistDelete')}
|
||||
isDisabled={!supportsOnArtistDelete.value}
|
||||
{...onArtistDelete}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="onAlbumDelete"
|
||||
helpText={translate('OnAlbumDelete')}
|
||||
isDisabled={!supportsOnAlbumDelete.value}
|
||||
{...onAlbumDelete}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="onApplicationUpdate"
|
||||
helpText={translate('OnApplicationUpdateHelpText')}
|
||||
helpText={translate('OnApplicationUpdate')}
|
||||
isDisabled={!supportsOnApplicationUpdate.value}
|
||||
{...onApplicationUpdate}
|
||||
onChange={onInputChange}
|
||||
@@ -170,7 +183,7 @@ function NotificationEventItems(props) {
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="onHealthIssue"
|
||||
helpText={translate('OnHealthIssueHelpText')}
|
||||
helpText={translate('OnHealthIssue')}
|
||||
isDisabled={!supportsOnHealthIssue.value}
|
||||
{...onHealthIssue}
|
||||
onChange={onInputChange}
|
||||
@@ -181,7 +194,7 @@ function NotificationEventItems(props) {
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="onHealthRestored"
|
||||
helpText={translate('OnHealthRestoredHelpText')}
|
||||
helpText={translate('OnHealthRestored')}
|
||||
isDisabled={!supportsOnHealthRestored.value}
|
||||
{...onHealthRestored}
|
||||
onChange={onInputChange}
|
||||
@@ -194,7 +207,7 @@ function NotificationEventItems(props) {
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="includeHealthWarnings"
|
||||
helpText={translate('IncludeHealthWarningsHelpText')}
|
||||
helpText={translate('IncludeHealthWarnings')}
|
||||
isDisabled={!supportsOnHealthIssue.value}
|
||||
{...includeHealthWarnings}
|
||||
onChange={onInputChange}
|
||||
|
||||
@@ -107,6 +107,8 @@ export default {
|
||||
selectedSchema.onReleaseImport = selectedSchema.supportsOnReleaseImport;
|
||||
selectedSchema.onUpgrade = selectedSchema.supportsOnUpgrade;
|
||||
selectedSchema.onRename = selectedSchema.supportsOnRename;
|
||||
selectedSchema.onArtistAdd = selectedSchema.supportsOnArtistAdd;
|
||||
selectedSchema.onArtistDelete = selectedSchema.supportsOnArtistDelete;
|
||||
selectedSchema.onHealthIssue = selectedSchema.supportsOnHealthIssue;
|
||||
selectedSchema.onDownloadFailure = selectedSchema.supportsOnDownloadFailure;
|
||||
selectedSchema.onImportFailure = selectedSchema.supportsOnImportFailure;
|
||||
|
||||
Reference in New Issue
Block a user