New: Bulk Grab Releases and Parameter Search

This commit is contained in:
Qstick
2021-11-20 02:52:26 -06:00
parent f69f96695b
commit 5d32bcf8b9
20 changed files with 961 additions and 50 deletions

View File

@@ -10,18 +10,13 @@
flex: 4 0 110px;
}
.indexer,
.category {
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';
flex: 0 0 110px;
}
.indexer {
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';
flex: 0 0 85px;
}
.age,
.size,
.files,

View File

@@ -4,6 +4,7 @@ import IconButton from 'Components/Link/IconButton';
import TableOptionsModal from 'Components/Table/TableOptions/TableOptionsModal';
import VirtualTableHeader from 'Components/Table/VirtualTableHeader';
import VirtualTableHeaderCell from 'Components/Table/VirtualTableHeaderCell';
import VirtualTableSelectAllHeaderCell from 'Components/Table/VirtualTableSelectAllHeaderCell';
import { icons } from 'Helpers/Props';
import styles from './SearchIndexHeader.css';
@@ -38,6 +39,9 @@ class SearchIndexHeader extends Component {
const {
columns,
onTableOptionChange,
allSelected,
allUnselected,
onSelectAllChange,
...otherProps
} = this.props;
@@ -56,6 +60,17 @@ class SearchIndexHeader extends Component {
return null;
}
if (name === 'select') {
return (
<VirtualTableSelectAllHeaderCell
key={name}
allSelected={allSelected}
allUnselected={allUnselected}
onSelectAllChange={onSelectAllChange}
/>
);
}
if (name === 'actions') {
return (
<VirtualTableHeaderCell
@@ -100,6 +115,9 @@ class SearchIndexHeader extends Component {
SearchIndexHeader.propTypes = {
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
allSelected: PropTypes.bool.isRequired,
allUnselected: PropTypes.bool.isRequired,
onSelectAllChange: PropTypes.func.isRequired,
onTableOptionChange: PropTypes.func.isRequired
};

View File

@@ -17,18 +17,13 @@
flex: 4 0 110px;
}
.indexer,
.category {
composes: cell;
flex: 0 0 110px;
}
.indexer {
composes: cell;
flex: 0 0 85px;
}
.age,
.size,
.files,

View File

@@ -5,6 +5,7 @@ import IconButton from 'Components/Link/IconButton';
import Link from 'Components/Link/Link';
import SpinnerIconButton from 'Components/Link/SpinnerIconButton';
import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell';
import VirtualTableSelectCell from 'Components/Table/Cells/VirtualTableSelectCell';
import Popover from 'Components/Tooltip/Popover';
import { icons, kinds, tooltipPositions } from 'Helpers/Props';
import formatDateTime from 'Utilities/Date/formatDateTime';
@@ -75,6 +76,7 @@ class SearchIndexRow extends Component {
render() {
const {
guid,
protocol,
categories,
age,
@@ -96,7 +98,9 @@ class SearchIndexRow extends Component {
isGrabbed,
grabError,
longDateFormat,
timeFormat
timeFormat,
isSelected,
onSelectedChange
} = this.props;
return (
@@ -111,6 +115,19 @@ class SearchIndexRow extends Component {
return null;
}
if (column.name === 'select') {
return (
<VirtualTableSelectCell
inputClassName={styles.checkInput}
id={guid}
key={column.name}
isSelected={isSelected}
isDisabled={false}
onSelectedChange={onSelectedChange}
/>
);
}
if (column.name === 'protocol') {
return (
<VirtualTableRowCell
@@ -322,7 +339,9 @@ SearchIndexRow.propTypes = {
isGrabbed: PropTypes.bool.isRequired,
grabError: PropTypes.string,
longDateFormat: PropTypes.string.isRequired,
timeFormat: PropTypes.string.isRequired
timeFormat: PropTypes.string.isRequired,
isSelected: PropTypes.bool,
onSelectedChange: PropTypes.func.isRequired
};
SearchIndexRow.defaultProps = {

View File

@@ -49,6 +49,8 @@ class SearchIndexTable extends Component {
columns,
longDateFormat,
timeFormat,
selectedState,
onSelectedChange,
onGrabPress
} = this.props;
@@ -64,6 +66,8 @@ class SearchIndexTable extends Component {
component={SearchIndexRow}
columns={columns}
guid={release.guid}
isSelected={selectedState[release.guid]}
onSelectedChange={onSelectedChange}
longDateFormat={longDateFormat}
timeFormat={timeFormat}
onGrabPress={onGrabPress}
@@ -83,7 +87,11 @@ class SearchIndexTable extends Component {
sortDirection,
isSmallScreen,
onSortPress,
scroller
scroller,
allSelected,
allUnselected,
onSelectAllChange,
selectedState
} = this.props;
return (
@@ -102,8 +110,12 @@ class SearchIndexTable extends Component {
sortKey={sortKey}
sortDirection={sortDirection}
onSortPress={onSortPress}
allSelected={allSelected}
allUnselected={allUnselected}
onSelectAllChange={onSelectAllChange}
/>
}
selectedState={selectedState}
columns={columns}
/>
);
@@ -121,7 +133,12 @@ SearchIndexTable.propTypes = {
longDateFormat: PropTypes.string.isRequired,
timeFormat: PropTypes.string.isRequired,
onSortPress: PropTypes.func.isRequired,
onGrabPress: PropTypes.func.isRequired
onGrabPress: PropTypes.func.isRequired,
allSelected: PropTypes.bool.isRequired,
allUnselected: PropTypes.bool.isRequired,
selectedState: PropTypes.object.isRequired,
onSelectedChange: PropTypes.func.isRequired,
onSelectAllChange: PropTypes.func.isRequired
};
export default SearchIndexTable;