mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
[UI Work] Add Artist, Import Artist, Calendar
This commit is contained in:
parent
a747c5f135
commit
77f1d2e64c
109 changed files with 891 additions and 1082 deletions
59
frontend/src/Components/Form/MonitorAlbumsSelectInput.js
Normal file
59
frontend/src/Components/Form/MonitorAlbumsSelectInput.js
Normal file
|
@ -0,0 +1,59 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import SelectInput from './SelectInput';
|
||||
|
||||
const monitorOptions = [
|
||||
{ key: 'all', value: 'All Albums' },
|
||||
{ key: 'future', value: 'Future Albums' },
|
||||
{ key: 'missing', value: 'Missing Albums' },
|
||||
{ key: 'existing', value: 'Existing Albums' },
|
||||
{ key: 'first', value: 'Only First Album' },
|
||||
{ key: 'latest', value: 'Only Latest Album' },
|
||||
{ key: 'none', value: 'None' }
|
||||
];
|
||||
|
||||
function MonitorAlbumsSelectInput(props) {
|
||||
const {
|
||||
includeNoChange,
|
||||
includeMixed,
|
||||
...otherProps
|
||||
} = props;
|
||||
|
||||
const values = [...monitorOptions];
|
||||
|
||||
if (includeNoChange) {
|
||||
values.unshift({
|
||||
key: 'noChange',
|
||||
value: 'No Change',
|
||||
disabled: true
|
||||
});
|
||||
}
|
||||
|
||||
if (includeMixed) {
|
||||
values.unshift({
|
||||
key: 'mixed',
|
||||
value: '(Mixed)',
|
||||
disabled: true
|
||||
});
|
||||
}
|
||||
|
||||
return (
|
||||
<SelectInput
|
||||
values={values}
|
||||
{...otherProps}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
MonitorAlbumsSelectInput.propTypes = {
|
||||
includeNoChange: PropTypes.bool.isRequired,
|
||||
includeMixed: PropTypes.bool.isRequired,
|
||||
onChange: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
MonitorAlbumsSelectInput.defaultProps = {
|
||||
includeNoChange: false,
|
||||
includeMixed: false
|
||||
};
|
||||
|
||||
export default MonitorAlbumsSelectInput;
|
Loading…
Add table
Add a link
Reference in a new issue