+ {
+ name ?
+
+ {name}
+
:
+ null
+ }
+
+
+ {
+ required.map((item) => {
+ if (!item) {
+ return null;
+ }
+
+ return (
+
+ );
+ })
+ }
+
+
+
+ {
+ ignored.map((item) => {
+ if (!item) {
+ return null;
+ }
+
+ return (
+
+ );
+ })
+ }
+
+
+
+
+
+ {
+ !enabled &&
+
+ }
+
+ {
+ indexer &&
+
+ }
+
+
+
+
+
+
+ );
+ }
+}
+
+ReleaseProfile.propTypes = {
+ id: PropTypes.number.isRequired,
+ name: PropTypes.string,
+ enabled: PropTypes.bool.isRequired,
+ required: PropTypes.arrayOf(PropTypes.string).isRequired,
+ ignored: PropTypes.arrayOf(PropTypes.string).isRequired,
+ tags: PropTypes.arrayOf(PropTypes.number).isRequired,
+ indexerId: PropTypes.number.isRequired,
+ tagList: PropTypes.arrayOf(PropTypes.object).isRequired,
+ indexerList: PropTypes.arrayOf(PropTypes.object).isRequired,
+ onConfirmDeleteReleaseProfile: PropTypes.func.isRequired
+};
+
+ReleaseProfile.defaultProps = {
+ enabled: true,
+ required: [],
+ ignored: [],
+ indexerId: 0
+};
+
+export default ReleaseProfile;
diff --git a/frontend/src/Settings/Indexers/Restrictions/Restrictions.css b/frontend/src/Settings/Profiles/Release/ReleaseProfiles.css
similarity index 76%
rename from frontend/src/Settings/Indexers/Restrictions/Restrictions.css
rename to frontend/src/Settings/Profiles/Release/ReleaseProfiles.css
index 16d8957c0..9e9715e77 100644
--- a/frontend/src/Settings/Indexers/Restrictions/Restrictions.css
+++ b/frontend/src/Settings/Profiles/Release/ReleaseProfiles.css
@@ -1,10 +1,10 @@
-.restrictions {
+.releaseProfiles {
display: flex;
flex-wrap: wrap;
}
-.addRestriction {
- composes: restriction from '~./Restriction.css';
+.addReleaseProfile {
+ composes: releaseProfile from '~./ReleaseProfile.css';
background-color: var(--cardAlternateBackgroundColor);
color: var(--gray);
diff --git a/frontend/src/Settings/Indexers/Restrictions/Restrictions.css.d.ts b/frontend/src/Settings/Profiles/Release/ReleaseProfiles.css.d.ts
similarity index 75%
rename from frontend/src/Settings/Indexers/Restrictions/Restrictions.css.d.ts
rename to frontend/src/Settings/Profiles/Release/ReleaseProfiles.css.d.ts
index 74a5fc15b..be1ba4596 100644
--- a/frontend/src/Settings/Indexers/Restrictions/Restrictions.css.d.ts
+++ b/frontend/src/Settings/Profiles/Release/ReleaseProfiles.css.d.ts
@@ -1,9 +1,9 @@
// This file is automatically generated.
// Please do not change this file!
interface CssExports {
- 'addRestriction': string;
+ 'addReleaseProfile': string;
'center': string;
- 'restrictions': string;
+ 'releaseProfiles': string;
}
export const cssExports: CssExports;
export default cssExports;
diff --git a/frontend/src/Settings/Indexers/Restrictions/Restrictions.js b/frontend/src/Settings/Profiles/Release/ReleaseProfiles.js
similarity index 52%
rename from frontend/src/Settings/Indexers/Restrictions/Restrictions.js
rename to frontend/src/Settings/Profiles/Release/ReleaseProfiles.js
index 3aa2969c0..00dedf623 100644
--- a/frontend/src/Settings/Indexers/Restrictions/Restrictions.js
+++ b/frontend/src/Settings/Profiles/Release/ReleaseProfiles.js
@@ -6,11 +6,11 @@ import Icon from 'Components/Icon';
import PageSectionContent from 'Components/Page/PageSectionContent';
import { icons } from 'Helpers/Props';
import translate from 'Utilities/String/translate';
-import EditRestrictionModalConnector from './EditRestrictionModalConnector';
-import Restriction from './Restriction';
-import styles from './Restrictions.css';
+import EditReleaseProfileModalConnector from './EditReleaseProfileModalConnector';
+import ReleaseProfile from './ReleaseProfile';
+import styles from './ReleaseProfiles.css';
-class Restrictions extends Component {
+class ReleaseProfiles extends Component {
//
// Lifecycle
@@ -19,19 +19,19 @@ class Restrictions extends Component {
super(props, context);
this.state = {
- isAddRestrictionModalOpen: false
+ isAddReleaseProfileModalOpen: false
};
}
//
// Listeners
- onAddRestrictionPress = () => {
- this.setState({ isAddRestrictionModalOpen: true });
+ onAddReleaseProfilePress = () => {
+ this.setState({ isAddReleaseProfileModalOpen: true });
};
- onAddRestrictionModalClose = () => {
- this.setState({ isAddRestrictionModalOpen: false });
+ onAddReleaseProfileModalClose = () => {
+ this.setState({ isAddReleaseProfileModalOpen: false });
};
//
@@ -41,20 +41,21 @@ class Restrictions extends Component {
const {
items,
tagList,
- onConfirmDeleteRestriction,
+ indexerList,
+ onConfirmDeleteReleaseProfile,
...otherProps
} = this.props;
return (
-