mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
New: Release Profiles, Frontend updates (#580)
* New: Release Profiles - UI Updates * New: Release Profiles - API Changes * New: Release Profiles - Test Updates * New: Release Profiles - Backend Updates * New: Interactive Artist Search * New: Change Montiored on Album Details Page * New: Show Duration on Album Details Page * Fixed: Manual Import not working if no albums are Missing * Fixed: Sort search input by sortTitle * Fixed: Queue columnLabel throwing JS error
This commit is contained in:
@@ -16,9 +16,9 @@ class AddNotificationModalContent extends Component {
|
||||
|
||||
render() {
|
||||
const {
|
||||
isFetching,
|
||||
error,
|
||||
isPopulated,
|
||||
isSchemaFetching,
|
||||
isSchemaPopulated,
|
||||
schemaError,
|
||||
schema,
|
||||
onNotificationSelect,
|
||||
onModalClose
|
||||
@@ -32,17 +32,17 @@ class AddNotificationModalContent extends Component {
|
||||
|
||||
<ModalBody>
|
||||
{
|
||||
isFetching &&
|
||||
isSchemaFetching &&
|
||||
<LoadingIndicator />
|
||||
}
|
||||
|
||||
{
|
||||
!isFetching && !!error &&
|
||||
!isSchemaFetching && !!schemaError &&
|
||||
<div>Unable to add a new notification, please try again.</div>
|
||||
}
|
||||
|
||||
{
|
||||
isPopulated && !error &&
|
||||
isSchemaPopulated && !schemaError &&
|
||||
<div>
|
||||
<div className={styles.notifications}>
|
||||
{
|
||||
@@ -74,9 +74,9 @@ class AddNotificationModalContent extends Component {
|
||||
}
|
||||
|
||||
AddNotificationModalContent.propTypes = {
|
||||
isFetching: PropTypes.bool.isRequired,
|
||||
error: PropTypes.object,
|
||||
isPopulated: PropTypes.bool.isRequired,
|
||||
isSchemaFetching: PropTypes.bool.isRequired,
|
||||
isSchemaPopulated: PropTypes.bool.isRequired,
|
||||
schemaError: PropTypes.object,
|
||||
schema: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
onNotificationSelect: PropTypes.func.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired
|
||||
|
||||
+6
-6
@@ -10,16 +10,16 @@ function createMapStateToProps() {
|
||||
(state) => state.settings.notifications,
|
||||
(notifications) => {
|
||||
const {
|
||||
isFetching,
|
||||
error,
|
||||
isPopulated,
|
||||
isSchemaFetching,
|
||||
isSchemaPopulated,
|
||||
schemaError,
|
||||
schema
|
||||
} = notifications;
|
||||
|
||||
return {
|
||||
isFetching,
|
||||
error,
|
||||
isPopulated,
|
||||
isSchemaFetching,
|
||||
isSchemaPopulated,
|
||||
schemaError,
|
||||
schema
|
||||
};
|
||||
}
|
||||
|
||||
@@ -72,9 +72,7 @@ function EditNotificationModalContent(props) {
|
||||
|
||||
{
|
||||
!isFetching && !error &&
|
||||
<Form
|
||||
{...otherProps}
|
||||
>
|
||||
<Form {...otherProps}>
|
||||
{
|
||||
!!message &&
|
||||
<Alert
|
||||
|
||||
@@ -7,18 +7,6 @@ import ConfirmModal from 'Components/Modal/ConfirmModal';
|
||||
import EditNotificationModalConnector from './EditNotificationModalConnector';
|
||||
import styles from './Notification.css';
|
||||
|
||||
function getLabelKind(supports, enabled) {
|
||||
if (!supports) {
|
||||
return kinds.DEFAULT;
|
||||
}
|
||||
|
||||
if (!enabled) {
|
||||
return kinds.DANGER;
|
||||
}
|
||||
|
||||
return kinds.SUCCESS;
|
||||
}
|
||||
|
||||
class Notification extends Component {
|
||||
|
||||
//
|
||||
@@ -88,40 +76,50 @@ class Notification extends Component {
|
||||
{name}
|
||||
</div>
|
||||
|
||||
<Label
|
||||
kind={getLabelKind(supportsOnGrab, onGrab)}
|
||||
outline={supportsOnGrab && !onGrab}
|
||||
>
|
||||
On Grab
|
||||
</Label>
|
||||
{
|
||||
supportsOnGrab && onGrab &&
|
||||
<Label kind={kinds.SUCCESS}>
|
||||
On Grab
|
||||
</Label>
|
||||
}
|
||||
|
||||
<Label
|
||||
kind={getLabelKind(supportsOnAlbumDownload, onAlbumDownload)}
|
||||
outline={supportsOnAlbumDownload && !onAlbumDownload}
|
||||
>
|
||||
On Album Download
|
||||
</Label>
|
||||
{
|
||||
supportsOnAlbumDownload && onAlbumDownload &&
|
||||
<Label kind={kinds.SUCCESS}>
|
||||
On Album Download
|
||||
</Label>
|
||||
}
|
||||
|
||||
<Label
|
||||
kind={getLabelKind(supportsOnDownload, onDownload)}
|
||||
outline={supportsOnDownload && !onDownload}
|
||||
>
|
||||
On Track Download
|
||||
</Label>
|
||||
{
|
||||
supportsOnDownload && onDownload &&
|
||||
<Label kind={kinds.SUCCESS}>
|
||||
On Download
|
||||
</Label>
|
||||
}
|
||||
|
||||
<Label
|
||||
kind={getLabelKind(supportsOnUpgrade, onDownload && onUpgrade)}
|
||||
outline={supportsOnUpgrade && !(onDownload && onUpgrade)}
|
||||
>
|
||||
On Upgrade
|
||||
</Label>
|
||||
{
|
||||
supportsOnUpgrade && onDownload && onUpgrade &&
|
||||
<Label kind={kinds.SUCCESS}>
|
||||
On Upgrade
|
||||
</Label>
|
||||
}
|
||||
|
||||
<Label
|
||||
kind={getLabelKind(supportsOnRename, onRename)}
|
||||
outline={supportsOnRename && !onRename}
|
||||
>
|
||||
On Rename
|
||||
</Label>
|
||||
{
|
||||
supportsOnRename && onRename &&
|
||||
<Label kind={kinds.SUCCESS}>
|
||||
On Rename
|
||||
</Label>
|
||||
}
|
||||
|
||||
{
|
||||
!onGrab && !onAlbumDownload && !onDownload && !onRename &&
|
||||
<Label
|
||||
kind={kinds.DISABLED}
|
||||
outline={true}
|
||||
>
|
||||
Disabled
|
||||
</Label>
|
||||
}
|
||||
|
||||
<EditNotificationModalConnector
|
||||
id={id}
|
||||
|
||||
Reference in New Issue
Block a user