New: Grouped Album Import Notification (#265)

* New: Grouped Album Import Notification

* fixup: Add Emby and Kodi Notify for Album Download
This commit is contained in:
Qstick 2018-04-03 23:45:59 -04:00 committed by GitHub
commit 226f884233
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 345 additions and 51 deletions

View file

@ -39,10 +39,12 @@ function EditNotificationModalContent(props) {
name,
onGrab,
onDownload,
onAlbumDownload,
onUpgrade,
onRename,
supportsOnGrab,
supportsOnDownload,
supportsOnAlbumDownload,
supportsOnUpgrade,
supportsOnRename,
tags,
@ -107,12 +109,25 @@ function EditNotificationModalContent(props) {
</FormGroup>
<FormGroup>
<FormLabel>On Import</FormLabel>
<FormLabel>On Album Import</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="onAlbumDownload"
helpText="Be notified when complete albums are successfully imported"
isDisabled={!supportsOnAlbumDownload.value}
{...onAlbumDownload}
onChange={onInputChange}
/>
</FormGroup>
<FormGroup>
<FormLabel>On Track Import</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="onDownload"
helpText="Be notified when tracks are successfully imported"
helpText="Be notified when track files are successfully imported"
isDisabled={!supportsOnDownload.value}
{...onDownload}
onChange={onInputChange}
@ -122,7 +137,7 @@ function EditNotificationModalContent(props) {
{
onDownload.value &&
<FormGroup>
<FormLabel>On Upgrade</FormLabel>
<FormLabel>On Track Upgrade</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}

View file

@ -68,10 +68,12 @@ class Notification extends Component {
name,
onGrab,
onDownload,
onAlbumDownload,
onUpgrade,
onRename,
supportsOnGrab,
supportsOnDownload,
supportsOnAlbumDownload,
supportsOnUpgrade,
supportsOnRename
} = this.props;
@ -93,11 +95,18 @@ class Notification extends Component {
On Grab
</Label>
<Label
kind={getLabelKind(supportsOnAlbumDownload, onAlbumDownload)}
outline={supportsOnAlbumDownload && !onAlbumDownload}
>
On Album Download
</Label>
<Label
kind={getLabelKind(supportsOnDownload, onDownload)}
outline={supportsOnDownload && !onDownload}
>
On Download
On Track Download
</Label>
<Label
@ -140,10 +149,12 @@ Notification.propTypes = {
name: PropTypes.string.isRequired,
onGrab: PropTypes.bool.isRequired,
onDownload: PropTypes.bool.isRequired,
onAlbumDownload: PropTypes.bool.isRequired,
onUpgrade: PropTypes.bool.isRequired,
onRename: PropTypes.bool.isRequired,
supportsOnGrab: PropTypes.bool.isRequired,
supportsOnDownload: PropTypes.bool.isRequired,
supportsOnAlbumDownload: PropTypes.bool.isRequired,
supportsOnUpgrade: PropTypes.bool.isRequired,
supportsOnRename: PropTypes.bool.isRequired,
onConfirmDeleteNotification: PropTypes.func.isRequired