mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Indexer and Search page work
This commit is contained in:
65
frontend/src/Indexer/Index/Table/CapabilitiesLabel.js
Normal file
65
frontend/src/Indexer/Index/Table/CapabilitiesLabel.js
Normal file
@@ -0,0 +1,65 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import Label from 'Components/Label';
|
||||
|
||||
function CapabilitiesLabel(props) {
|
||||
const {
|
||||
supportsBooks,
|
||||
supportsMovies,
|
||||
supportsMusic,
|
||||
supportsTv
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<span>
|
||||
{
|
||||
supportsBooks ?
|
||||
<Label>
|
||||
{'Books'}
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
supportsMovies ?
|
||||
<Label>
|
||||
{'Movies'}
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
supportsMusic ?
|
||||
<Label>
|
||||
{'Music'}
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
supportsTv ?
|
||||
<Label>
|
||||
{'TV'}
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
!supportsTv && !supportsMusic && !supportsMovies && !supportsBooks ?
|
||||
<Label>
|
||||
{'None'}
|
||||
</Label> :
|
||||
null
|
||||
}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
CapabilitiesLabel.propTypes = {
|
||||
supportsTv: PropTypes.bool.isRequired,
|
||||
supportsBooks: PropTypes.bool.isRequired,
|
||||
supportsMusic: PropTypes.bool.isRequired,
|
||||
supportsMovies: PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
export default CapabilitiesLabel;
|
Reference in New Issue
Block a user