mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
New: App Sync Profiles
This commit is contained in:
@@ -42,6 +42,7 @@ function EditIndexerModalContent(props) {
|
||||
redirect,
|
||||
supportsRss,
|
||||
supportsRedirect,
|
||||
appProfileId,
|
||||
fields,
|
||||
priority
|
||||
} = item;
|
||||
@@ -105,6 +106,17 @@ function EditIndexerModalContent(props) {
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>{translate('AppProfile')}</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.APP_PROFILE_SELECT}
|
||||
name="appProfileId"
|
||||
{...appProfileId}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
{
|
||||
fields ?
|
||||
fields.map((field) => {
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import AppProfileSelectInputConnector from 'Components/Form/AppProfileSelectInputConnector';
|
||||
import SelectInput from 'Components/Form/SelectInput';
|
||||
import SpinnerButton from 'Components/Link/SpinnerButton';
|
||||
import PageContentFooter from 'Components/Page/PageContentFooter';
|
||||
@@ -22,6 +23,7 @@ class IndexerEditorFooter extends Component {
|
||||
|
||||
this.state = {
|
||||
enable: NO_CHANGE,
|
||||
appProfileId: NO_CHANGE,
|
||||
savingTags: false,
|
||||
isDeleteMovieModalOpen: false,
|
||||
isTagsModalOpen: false
|
||||
@@ -37,6 +39,7 @@ class IndexerEditorFooter extends Component {
|
||||
if (prevProps.isSaving && !isSaving && !saveError) {
|
||||
this.setState({
|
||||
enable: NO_CHANGE,
|
||||
appProfileId: NO_CHANGE,
|
||||
savingTags: false
|
||||
});
|
||||
}
|
||||
@@ -99,6 +102,7 @@ class IndexerEditorFooter extends Component {
|
||||
|
||||
const {
|
||||
enable,
|
||||
appProfileId,
|
||||
savingTags,
|
||||
isTagsModalOpen,
|
||||
isDeleteMovieModalOpen
|
||||
@@ -127,6 +131,21 @@ class IndexerEditorFooter extends Component {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className={styles.inputContainer}>
|
||||
<IndexerEditorFooterLabel
|
||||
label={translate('AppProfile')}
|
||||
isSaving={isSaving && appProfileId !== NO_CHANGE}
|
||||
/>
|
||||
|
||||
<AppProfileSelectInputConnector
|
||||
name="appProfileId"
|
||||
value={appProfileId}
|
||||
includeNoChange={true}
|
||||
isDisabled={!selectedCount}
|
||||
onChange={this.onInputChange}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className={styles.buttonContainer}>
|
||||
<div className={styles.buttonContainerContent}>
|
||||
<IndexerEditorFooterLabel
|
||||
|
@@ -3,6 +3,7 @@ import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import { executeCommand } from 'Store/Actions/commandActions';
|
||||
import createIndexerAppProfileSelector from 'Store/Selectors/createIndexerAppProfileSelector';
|
||||
import createIndexerSelector from 'Store/Selectors/createIndexerSelector';
|
||||
import createIndexerStatusSelector from 'Store/Selectors/createIndexerStatusSelector';
|
||||
import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector';
|
||||
@@ -19,11 +20,13 @@ function selectShowSearchAction() {
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
createIndexerSelector(),
|
||||
createIndexerAppProfileSelector(),
|
||||
createIndexerStatusSelector(),
|
||||
selectShowSearchAction(),
|
||||
createUISettingsSelector(),
|
||||
(
|
||||
movie,
|
||||
appProfile,
|
||||
status,
|
||||
showSearchAction,
|
||||
uiSettings
|
||||
@@ -40,6 +43,7 @@ function createMapStateToProps() {
|
||||
|
||||
return {
|
||||
...movie,
|
||||
appProfile,
|
||||
status,
|
||||
showSearchAction,
|
||||
longDateFormat: uiSettings.longDateFormat,
|
||||
|
@@ -47,6 +47,15 @@ function IndexerIndexSortMenu(props) {
|
||||
{translate('Added')}
|
||||
</SortMenuItem>
|
||||
|
||||
<SortMenuItem
|
||||
name="appProfileId"
|
||||
sortKey={sortKey}
|
||||
sortDirection={sortDirection}
|
||||
onPress={onSortSelect}
|
||||
>
|
||||
{translate('AppProfile')}
|
||||
</SortMenuItem>
|
||||
|
||||
<SortMenuItem
|
||||
name="priority"
|
||||
sortKey={sortKey}
|
||||
|
@@ -18,6 +18,12 @@
|
||||
flex: 0 0 90px;
|
||||
}
|
||||
|
||||
.appProfileId {
|
||||
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';
|
||||
|
||||
flex: 1 0 125px;
|
||||
}
|
||||
|
||||
.capabilities {
|
||||
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';
|
||||
|
||||
|
@@ -25,6 +25,12 @@
|
||||
flex: 0 0 90px;
|
||||
}
|
||||
|
||||
.appProfileId {
|
||||
composes: cell;
|
||||
|
||||
flex: 1 0 125px;
|
||||
}
|
||||
|
||||
.capabilities {
|
||||
composes: cell;
|
||||
|
||||
|
@@ -79,6 +79,7 @@ class IndexerIndexRow extends Component {
|
||||
privacy,
|
||||
priority,
|
||||
status,
|
||||
appProfile,
|
||||
added,
|
||||
capabilities,
|
||||
columns,
|
||||
@@ -183,6 +184,17 @@ class IndexerIndexRow extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
if (column.name === 'appProfileId') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
key={name}
|
||||
className={styles[column.name]}
|
||||
>
|
||||
{appProfile.name}
|
||||
</VirtualTableRowCell>
|
||||
);
|
||||
}
|
||||
|
||||
if (column.name === 'capabilities') {
|
||||
return (
|
||||
<VirtualTableRowCell
|
||||
@@ -284,6 +296,7 @@ IndexerIndexRow.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
enable: PropTypes.bool.isRequired,
|
||||
redirect: PropTypes.bool.isRequired,
|
||||
appProfile: PropTypes.object.isRequired,
|
||||
status: PropTypes.object,
|
||||
capabilities: PropTypes.object.isRequired,
|
||||
added: PropTypes.string.isRequired,
|
||||
|
Reference in New Issue
Block a user