New: App Sync Profiles

This commit is contained in:
Qstick
2021-05-18 00:17:04 -04:00
parent 29c4849bef
commit f64f8e915f
51 changed files with 1509 additions and 19 deletions
@@ -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,