Improve add/loading error notices
This commit is contained in:
parent
bd9d4b484c
commit
dd704579df
|
@ -109,7 +109,7 @@ class OrganizePreviewModalContent extends Component {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching && error &&
|
!isFetching && error &&
|
||||||
<div>{translate('OrganizeLoadError')}</div>
|
<Alert kind={kinds.DANGER}>{translate('OrganizeLoadError')}</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -62,7 +62,7 @@ class CustomFormats extends Component {
|
||||||
<FieldSet legend={translate('CustomFormats')}>
|
<FieldSet legend={translate('CustomFormats')}>
|
||||||
<PageSectionContent
|
<PageSectionContent
|
||||||
errorMessage={translate('CustomFormatsLoadError')}
|
errorMessage={translate('CustomFormatsLoadError')}
|
||||||
{...otherProps}c={true}
|
{...otherProps}
|
||||||
>
|
>
|
||||||
<div className={styles.customFormats}>
|
<div className={styles.customFormats}>
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
import Alert from 'Components/Alert';
|
||||||
import Card from 'Components/Card';
|
import Card from 'Components/Card';
|
||||||
import FieldSet from 'Components/FieldSet';
|
import FieldSet from 'Components/FieldSet';
|
||||||
import Form from 'Components/Form/Form';
|
import Form from 'Components/Form/Form';
|
||||||
|
@ -112,9 +113,9 @@ class EditCustomFormatModalContent extends Component {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching && !!error &&
|
!isFetching && !!error &&
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('AddCustomFormatError')}
|
{translate('AddCustomFormatError')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
import Alert from 'Components/Alert';
|
||||||
import Button from 'Components/Link/Button';
|
import Button from 'Components/Link/Button';
|
||||||
import ClipboardButton from 'Components/Link/ClipboardButton';
|
import ClipboardButton from 'Components/Link/ClipboardButton';
|
||||||
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||||
|
@ -41,9 +42,9 @@ class ExportCustomFormatModalContent extends Component {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching && !!error &&
|
!isFetching && !!error &&
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('CustomFormatsLoadError')}
|
{translate('CustomFormatsLoadError')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
import Alert from 'Components/Alert';
|
||||||
import Form from 'Components/Form/Form';
|
import Form from 'Components/Form/Form';
|
||||||
import FormGroup from 'Components/Form/FormGroup';
|
import FormGroup from 'Components/Form/FormGroup';
|
||||||
import FormInputGroup from 'Components/Form/FormInputGroup';
|
import FormInputGroup from 'Components/Form/FormInputGroup';
|
||||||
|
@ -11,7 +12,7 @@ import ModalBody from 'Components/Modal/ModalBody';
|
||||||
import ModalContent from 'Components/Modal/ModalContent';
|
import ModalContent from 'Components/Modal/ModalContent';
|
||||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||||
import ModalHeader from 'Components/Modal/ModalHeader';
|
import ModalHeader from 'Components/Modal/ModalHeader';
|
||||||
import { inputTypes, sizes } from 'Helpers/Props';
|
import { inputTypes, kinds, sizes } from 'Helpers/Props';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
import styles from './ImportCustomFormatModalContent.css';
|
import styles from './ImportCustomFormatModalContent.css';
|
||||||
|
|
||||||
|
@ -95,9 +96,9 @@ class ImportCustomFormatModalContent extends Component {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching && !!error &&
|
!isFetching && !!error &&
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('CustomFormatsLoadError')}
|
{translate('CustomFormatsLoadError')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,9 +42,9 @@ class AddSpecificationModalContent extends Component {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isSchemaFetching && !!schemaError &&
|
!isSchemaFetching && !!schemaError &&
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('AddConditionError')}
|
{translate('AddConditionError')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,9 +43,9 @@ class AddDownloadClientModalContent extends Component {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isSchemaFetching && !!schemaError &&
|
!isSchemaFetching && !!schemaError &&
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('AddDownloadClientError')}
|
{translate('AddDownloadClientError')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,7 +41,7 @@ class DownloadClient extends Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onDeleteDownloadClientModalClose= () => {
|
onDeleteDownloadClientModalClose = () => {
|
||||||
this.setState({ isDeleteDownloadClientModalOpen: false });
|
this.setState({ isDeleteDownloadClientModalOpen: false });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -69,9 +69,9 @@ class EditDownloadClientModalContent extends Component {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching && !!error &&
|
!isFetching && !!error &&
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('AddDownloadClientError')}
|
{translate('AddDownloadClientError')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -277,7 +277,7 @@ function ManageDownloadClientsModalContent(
|
||||||
isDisabled={!anySelected}
|
isDisabled={!anySelected}
|
||||||
onPress={onTagsPress}
|
onPress={onTagsPress}
|
||||||
>
|
>
|
||||||
Set Tags
|
{translate('SetTags')}
|
||||||
</SpinnerButton>
|
</SpinnerButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import Alert from 'Components/Alert';
|
||||||
import Form from 'Components/Form/Form';
|
import Form from 'Components/Form/Form';
|
||||||
import FormGroup from 'Components/Form/FormGroup';
|
import FormGroup from 'Components/Form/FormGroup';
|
||||||
import FormInputGroup from 'Components/Form/FormInputGroup';
|
import FormInputGroup from 'Components/Form/FormInputGroup';
|
||||||
|
@ -52,9 +53,9 @@ function EditRemotePathMappingModalContent(props) {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching && !!error &&
|
!isFetching && !!error &&
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('AddRemotePathMappingError')}
|
{translate('AddRemotePathMappingError')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import _ from 'lodash';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
@ -55,7 +54,7 @@ function createRemotePathMappingSelector() {
|
||||||
items
|
items
|
||||||
} = remotePathMappings;
|
} = remotePathMappings;
|
||||||
|
|
||||||
const mapping = id ? _.find(items, { id }) : newRemotePathMapping;
|
const mapping = id ? items.find((i) => i.id === id) : newRemotePathMapping;
|
||||||
const settings = selectSettings(mapping, pendingChanges, saveError);
|
const settings = selectSettings(mapping, pendingChanges, saveError);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -47,7 +47,7 @@ class RemotePathMappings extends Component {
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FieldSet legend={translate('RemotePathMappings')} >
|
<FieldSet legend={translate('RemotePathMappings')}>
|
||||||
<PageSectionContent
|
<PageSectionContent
|
||||||
errorMessage={translate('RemotePathMappingsLoadError')}
|
errorMessage={translate('RemotePathMappingsLoadError')}
|
||||||
{...otherProps}
|
{...otherProps}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import Alert from 'Components/Alert';
|
||||||
import Form from 'Components/Form/Form';
|
import Form from 'Components/Form/Form';
|
||||||
import FormGroup from 'Components/Form/FormGroup';
|
import FormGroup from 'Components/Form/FormGroup';
|
||||||
import FormInputGroup from 'Components/Form/FormInputGroup';
|
import FormInputGroup from 'Components/Form/FormInputGroup';
|
||||||
|
@ -50,9 +51,9 @@ function EditImportListExclusionModalContent(props) {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching && !!error &&
|
!isFetching && !!error &&
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('AddImportListExclusionError')}
|
{translate('AddImportListExclusionError')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import _ from 'lodash';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
@ -26,7 +25,7 @@ function createImportListExclusionSelector() {
|
||||||
items
|
items
|
||||||
} = importListExclusions;
|
} = importListExclusions;
|
||||||
|
|
||||||
const mapping = id ? _.find(items, { id }) : newImportListExclusion;
|
const mapping = id ? items.find((i) => i.id === id) : newImportListExclusion;
|
||||||
const settings = selectSettings(mapping, pendingChanges, saveError);
|
const settings = selectSettings(mapping, pendingChanges, saveError);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -44,9 +44,9 @@ class AddImportListModalContent extends Component {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isSchemaFetching && !!schemaError ?
|
!isSchemaFetching && !!schemaError ?
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('AddListError')}
|
{translate('AddListError')}
|
||||||
</div> :
|
</Alert> :
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,9 +74,9 @@ function EditImportListModalContent(props) {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching && !!error ?
|
!isFetching && !!error ?
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('AddListError')}
|
{translate('AddListError')}
|
||||||
</div> :
|
</Alert> :
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ class ImportList extends Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onDeleteImportListModalClose= () => {
|
onDeleteImportListModalClose = () => {
|
||||||
this.setState({ isDeleteImportListModalOpen: false });
|
this.setState({ isDeleteImportListModalOpen: false });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import FieldSet from 'Components/FieldSet';
|
||||||
import Icon from 'Components/Icon';
|
import Icon from 'Components/Icon';
|
||||||
import PageSectionContent from 'Components/Page/PageSectionContent';
|
import PageSectionContent from 'Components/Page/PageSectionContent';
|
||||||
import { icons } from 'Helpers/Props';
|
import { icons } from 'Helpers/Props';
|
||||||
import sortByName from 'Utilities/Array/sortByName';
|
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
import AddImportListModal from './AddImportListModal';
|
import AddImportListModal from './AddImportListModal';
|
||||||
import EditImportListModalConnector from './EditImportListModalConnector';
|
import EditImportListModalConnector from './EditImportListModalConnector';
|
||||||
|
@ -67,7 +66,7 @@ class ImportLists extends Component {
|
||||||
>
|
>
|
||||||
<div className={styles.lists}>
|
<div className={styles.lists}>
|
||||||
{
|
{
|
||||||
items.sort(sortByName).map((item) => {
|
items.map((item) => {
|
||||||
return (
|
return (
|
||||||
<ImportList
|
<ImportList
|
||||||
key={item.id}
|
key={item.id}
|
||||||
|
|
|
@ -4,16 +4,14 @@ import { connect } from 'react-redux';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import { fetchRootFolders } from 'Store/Actions/rootFolderActions';
|
import { fetchRootFolders } from 'Store/Actions/rootFolderActions';
|
||||||
import { deleteImportList, fetchImportLists } from 'Store/Actions/settingsActions';
|
import { deleteImportList, fetchImportLists } from 'Store/Actions/settingsActions';
|
||||||
|
import createSortedSectionSelector from 'Store/Selectors/createSortedSectionSelector';
|
||||||
|
import sortByName from 'Utilities/Array/sortByName';
|
||||||
import ImportLists from './ImportLists';
|
import ImportLists from './ImportLists';
|
||||||
|
|
||||||
function createMapStateToProps() {
|
function createMapStateToProps() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
(state) => state.settings.importLists,
|
createSortedSectionSelector('settings.importLists', sortByName),
|
||||||
(importLists) => {
|
(importLists) => importLists
|
||||||
return {
|
|
||||||
...importLists
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Modal from 'Components/Modal/Modal';
|
import Modal from 'Components/Modal/Modal';
|
||||||
|
import { sizes } from 'Helpers/Props';
|
||||||
import ManageImportListsModalContent from './ManageImportListsModalContent';
|
import ManageImportListsModalContent from './ManageImportListsModalContent';
|
||||||
|
|
||||||
interface ManageImportListsModalProps {
|
interface ManageImportListsModalProps {
|
||||||
|
@ -11,7 +12,7 @@ function ManageImportListsModal(props: ManageImportListsModalProps) {
|
||||||
const { isOpen, onModalClose } = props;
|
const { isOpen, onModalClose } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal isOpen={isOpen} onModalClose={onModalClose}>
|
<Modal isOpen={isOpen} size={sizes.EXTRA_LARGE} onModalClose={onModalClose}>
|
||||||
<ManageImportListsModalContent onModalClose={onModalClose} />
|
<ManageImportListsModalContent onModalClose={onModalClose} />
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,13 +2,14 @@ import React, { useCallback, useEffect } from 'react';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import AppState from 'App/State/AppState';
|
import AppState from 'App/State/AppState';
|
||||||
|
import Alert from 'Components/Alert';
|
||||||
import FieldSet from 'Components/FieldSet';
|
import FieldSet from 'Components/FieldSet';
|
||||||
import Form from 'Components/Form/Form';
|
import Form from 'Components/Form/Form';
|
||||||
import FormGroup from 'Components/Form/FormGroup';
|
import FormGroup from 'Components/Form/FormGroup';
|
||||||
import FormInputGroup from 'Components/Form/FormInputGroup';
|
import FormInputGroup from 'Components/Form/FormInputGroup';
|
||||||
import FormLabel from 'Components/Form/FormLabel';
|
import FormLabel from 'Components/Form/FormLabel';
|
||||||
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||||
import { inputTypes } from 'Helpers/Props';
|
import { inputTypes, kinds } from 'Helpers/Props';
|
||||||
import { clearPendingChanges } from 'Store/Actions/baseActions';
|
import { clearPendingChanges } from 'Store/Actions/baseActions';
|
||||||
import {
|
import {
|
||||||
fetchImportListOptions,
|
fetchImportListOptions,
|
||||||
|
@ -110,7 +111,7 @@ function ImportListOptions(props: ImportListOptionsPageProps) {
|
||||||
{isFetching ? <LoadingIndicator /> : null}
|
{isFetching ? <LoadingIndicator /> : null}
|
||||||
|
|
||||||
{!isFetching && error ? (
|
{!isFetching && error ? (
|
||||||
<div>{translate('UnableToLoadListOptions')}</div>
|
<Alert kind={kinds.DANGER}>{translate('ListOptionsLoadError')}</Alert>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{hasSettings && !isFetching && !error ? (
|
{hasSettings && !isFetching && !error ? (
|
||||||
|
|
|
@ -43,9 +43,9 @@ class AddIndexerModalContent extends Component {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isSchemaFetching && !!schemaError &&
|
!isSchemaFetching && !!schemaError &&
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('AddIndexerError')}
|
{translate('AddIndexerError')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import Alert from 'Components/Alert';
|
||||||
import Form from 'Components/Form/Form';
|
import Form from 'Components/Form/Form';
|
||||||
import FormGroup from 'Components/Form/FormGroup';
|
import FormGroup from 'Components/Form/FormGroup';
|
||||||
import FormInputGroup from 'Components/Form/FormInputGroup';
|
import FormInputGroup from 'Components/Form/FormInputGroup';
|
||||||
|
@ -67,9 +68,9 @@ function EditIndexerModalContent(props) {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching && !!error &&
|
!isFetching && !!error &&
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('AddIndexerError')}
|
{translate('AddIndexerError')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,7 +42,7 @@ class Indexer extends Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onDeleteIndexerModalClose= () => {
|
onDeleteIndexerModalClose = () => {
|
||||||
this.setState({ isDeleteIndexerModalOpen: false });
|
this.setState({ isDeleteIndexerModalOpen: false });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
import Alert from 'Components/Alert';
|
||||||
import Button from 'Components/Link/Button';
|
import Button from 'Components/Link/Button';
|
||||||
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||||
import ModalBody from 'Components/Modal/ModalBody';
|
import ModalBody from 'Components/Modal/ModalBody';
|
||||||
import ModalContent from 'Components/Modal/ModalContent';
|
import ModalContent from 'Components/Modal/ModalContent';
|
||||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||||
import ModalHeader from 'Components/Modal/ModalHeader';
|
import ModalHeader from 'Components/Modal/ModalHeader';
|
||||||
|
import { kinds } from 'Helpers/Props';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
import AddNotificationItem from './AddNotificationItem';
|
import AddNotificationItem from './AddNotificationItem';
|
||||||
import styles from './AddNotificationModalContent.css';
|
import styles from './AddNotificationModalContent.css';
|
||||||
|
@ -39,9 +41,9 @@ class AddNotificationModalContent extends Component {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isSchemaFetching && !!schemaError &&
|
!isSchemaFetching && !!schemaError &&
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('AddNotificationError')}
|
{translate('AddNotificationError')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,9 +59,9 @@ function EditNotificationModalContent(props) {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching && !!error &&
|
!isFetching && !!error &&
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('AddNotificationError')}
|
{translate('AddNotificationError')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,9 +87,9 @@ function EditDelayProfileModalContent(props) {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching && !!error ?
|
!isFetching && !!error ?
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('AddDelayProfileError')}
|
{translate('AddDelayProfileError')}
|
||||||
</div> :
|
</Alert> :
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import _ from 'lodash';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
@ -33,7 +32,7 @@ function createDelayProfileSelector() {
|
||||||
items
|
items
|
||||||
} = delayProfiles;
|
} = delayProfiles;
|
||||||
|
|
||||||
const profile = id ? _.find(items, { id }) : newDelayProfile;
|
const profile = id ? items.find((i) => i.id === id) : newDelayProfile;
|
||||||
const settings = selectSettings(profile, pendingChanges, saveError);
|
const settings = selectSettings(profile, pendingChanges, saveError);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
import Alert from 'Components/Alert';
|
||||||
import Form from 'Components/Form/Form';
|
import Form from 'Components/Form/Form';
|
||||||
import FormGroup from 'Components/Form/FormGroup';
|
import FormGroup from 'Components/Form/FormGroup';
|
||||||
import FormInputGroup from 'Components/Form/FormInputGroup';
|
import FormInputGroup from 'Components/Form/FormInputGroup';
|
||||||
|
@ -152,9 +153,9 @@ class EditQualityProfileModalContent extends Component {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching && !!error &&
|
!isFetching && !!error &&
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('AddQualityProfileError')}
|
{translate('AddQualityProfileError')}
|
||||||
</div>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,7 +55,7 @@ class QualityProfiles extends Component {
|
||||||
<FieldSet legend={translate('QualityProfiles')}>
|
<FieldSet legend={translate('QualityProfiles')}>
|
||||||
<PageSectionContent
|
<PageSectionContent
|
||||||
errorMessage={translate('QualityProfilesLoadError')}
|
errorMessage={translate('QualityProfilesLoadError')}
|
||||||
{...otherProps}c={true}
|
{...otherProps}
|
||||||
>
|
>
|
||||||
<div className={styles.qualityProfiles}>
|
<div className={styles.qualityProfiles}>
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,7 +48,7 @@ function EditReleaseProfileModalContent(props) {
|
||||||
<Form {...otherProps}>
|
<Form {...otherProps}>
|
||||||
|
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<FormLabel>Name</FormLabel>
|
<FormLabel>{translate('Name')}</FormLabel>
|
||||||
|
|
||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.TEXT}
|
type={inputTypes.TEXT}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import _ from 'lodash';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
@ -11,7 +10,6 @@ const newReleaseProfile = {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
required: [],
|
required: [],
|
||||||
ignored: [],
|
ignored: [],
|
||||||
includePreferredWhenRenaming: false,
|
|
||||||
tags: [],
|
tags: [],
|
||||||
indexerId: 0
|
indexerId: 0
|
||||||
};
|
};
|
||||||
|
@ -30,7 +28,7 @@ function createMapStateToProps() {
|
||||||
items
|
items
|
||||||
} = releaseProfiles;
|
} = releaseProfiles;
|
||||||
|
|
||||||
const profile = id ? _.find(items, { id }) : newReleaseProfile;
|
const profile = id ? items.find((i) => i.id === id) : newReleaseProfile;
|
||||||
const settings = selectSettings(profile, pendingChanges, saveError);
|
const settings = selectSettings(profile, pendingChanges, saveError);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import _ from 'lodash';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import MiddleTruncate from 'react-middle-truncate';
|
import MiddleTruncate from 'react-middle-truncate';
|
||||||
|
@ -43,7 +42,7 @@ class ReleaseProfile extends Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onDeleteReleaseProfileModalClose= () => {
|
onDeleteReleaseProfileModalClose = () => {
|
||||||
this.setState({ isDeleteReleaseProfileModalOpen: false });
|
this.setState({ isDeleteReleaseProfileModalOpen: false });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -72,7 +71,7 @@ class ReleaseProfile extends Component {
|
||||||
isDeleteReleaseProfileModalOpen
|
isDeleteReleaseProfileModalOpen
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
const indexer = indexerId !== 0 && _.find(indexerList, { id: indexerId });
|
const indexer = indexerId !== 0 && indexerList.find((i) => i.id === indexerId);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
|
import Alert from 'Components/Alert';
|
||||||
import Card from 'Components/Card';
|
import Card from 'Components/Card';
|
||||||
import FieldSet from 'Components/FieldSet';
|
import FieldSet from 'Components/FieldSet';
|
||||||
import Form from 'Components/Form/Form';
|
import Form from 'Components/Form/Form';
|
||||||
|
@ -122,9 +123,9 @@ export default function EditAutoTaggingModalContent(props) {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching && !!error ?
|
!isFetching && !!error ?
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('AddAutoTagError')}
|
{translate('AddAutoTagError')}
|
||||||
</div> :
|
</Alert> :
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,9 +55,9 @@ export default function AddSpecificationModalContent(props) {
|
||||||
|
|
||||||
{
|
{
|
||||||
!isSchemaFetching && !!schemaError ?
|
!isSchemaFetching && !!schemaError ?
|
||||||
<div>
|
<Alert kind={kinds.DANGER}>
|
||||||
{translate('AddConditionError')}
|
{translate('AddConditionError')}
|
||||||
</div> :
|
</Alert> :
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ class Tag extends Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onDeleteTagModalClose= () => {
|
onDeleteTagModalClose = () => {
|
||||||
this.setState({ isDeleteTagModalOpen: false });
|
this.setState({ isDeleteTagModalOpen: false });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1955,7 +1955,6 @@
|
||||||
"Umask777Description": "{octal} - Everyone write",
|
"Umask777Description": "{octal} - Everyone write",
|
||||||
"UnableToLoadAutoTagging": "Unable to load auto tagging",
|
"UnableToLoadAutoTagging": "Unable to load auto tagging",
|
||||||
"UnableToLoadBackups": "Unable to load backups",
|
"UnableToLoadBackups": "Unable to load backups",
|
||||||
"UnableToLoadListOptions": "Unable to load list options",
|
|
||||||
"UnableToUpdateSonarrDirectly": "Unable to update {appName} directly,",
|
"UnableToUpdateSonarrDirectly": "Unable to update {appName} directly,",
|
||||||
"Unavailable": "Unavailable",
|
"Unavailable": "Unavailable",
|
||||||
"Underscore": "Underscore",
|
"Underscore": "Underscore",
|
||||||
|
|
Loading…
Reference in New Issue