Lots of workings to search processing, UI Categories

This commit is contained in:
Qstick
2020-11-19 16:32:15 -05:00
parent 710b4f5ec6
commit 8e72c7153d
51 changed files with 736 additions and 240 deletions

View File

@@ -4,48 +4,25 @@ import Label from 'Components/Label';
function CapabilitiesLabel(props) {
const {
movieSearchAvailable,
tvSearchAvailable,
musicSearchAvailable,
bookSearchAvailable
categories
} = props.capabilities;
const filteredList = categories.filter((item) => item.id < 100000).map((item) => item.name).sort();
return (
<span>
{
bookSearchAvailable ?
<Label>
{'Books'}
</Label> :
null
filteredList.map((category) => {
return (
<Label key={category}>
{category}
</Label>
);
})
}
{
movieSearchAvailable ?
<Label>
{'Movies'}
</Label> :
null
}
{
musicSearchAvailable ?
<Label>
{'Music'}
</Label> :
null
}
{
tvSearchAvailable ?
<Label>
{'TV'}
</Label> :
null
}
{
!tvSearchAvailable && !musicSearchAvailable && !movieSearchAvailable && !bookSearchAvailable ?
filteredList.length === 0 ?
<Label>
{'None'}
</Label> :
@@ -61,10 +38,7 @@ CapabilitiesLabel.propTypes = {
CapabilitiesLabel.defaultProps = {
capabilities: {
movieSearchAvailable: false,
tvSearchAvailable: false,
musicSearchAvailable: false,
bookSearchAvailable: false
categories: []
}
};

View File

@@ -21,7 +21,7 @@
.capabilities {
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';
flex: 0 0 180px;
flex: 0 0 350px;
}
.added {

View File

@@ -28,7 +28,7 @@
.capabilities {
composes: cell;
flex: 0 0 180px;
flex: 0 0 350px;
}
.added {