New: Show IndexerFlags on Interactive Search

This commit is contained in:
Qstick
2019-12-28 00:45:59 -05:00
parent f02fa629cc
commit fa2c4725be
6 changed files with 55 additions and 6 deletions

View File

@@ -63,6 +63,12 @@ const columns = [
isSortable: true,
isVisible: true
},
{
name: 'indexerFlags',
label: React.createElement(Icon, { name: icons.FLAG }),
isSortable: true,
isVisible: true
},
{
name: 'rejections',
label: React.createElement(Icon, { name: icons.DANGER }),

View File

@@ -21,6 +21,7 @@
}
.rejected,
.indexerFlags,
.download {
composes: cell from '~Components/Table/Cells/TableRowCell.css';

View File

@@ -114,6 +114,7 @@ class InteractiveSearchRow extends Component {
leechers,
quality,
languages,
indexerFlags,
rejections,
downloadAllowed,
isGrabbing,
@@ -180,6 +181,35 @@ class InteractiveSearchRow extends Component {
/>
</TableRowCell>
<TableRowCell className={styles.indexerFlags}>
{
!!indexerFlags.length &&
<Popover
anchor={
<Icon
name={icons.FLAG}
kind={kinds.PRIMARY}
/>
}
title="Indexer Flags"
body={
<ul>
{
indexerFlags.map((flag, index) => {
return (
<li key={index}>
{flag}
</li>
);
})
}
</ul>
}
position={tooltipPositions.LEFT}
/>
}
</TableRowCell>
<TableRowCell className={styles.rejected}>
{
!!rejections.length &&
@@ -251,6 +281,7 @@ InteractiveSearchRow.propTypes = {
quality: PropTypes.object.isRequired,
languages: PropTypes.arrayOf(PropTypes.object).isRequired,
rejections: PropTypes.arrayOf(PropTypes.string).isRequired,
indexerFlags: PropTypes.arrayOf(PropTypes.string).isRequired,
downloadAllowed: PropTypes.bool.isRequired,
isGrabbing: PropTypes.bool.isRequired,
isGrabbed: PropTypes.bool.isRequired,