mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-12 08:07:10 -07:00
* New: Release Profiles - UI Updates * New: Release Profiles - API Changes * New: Release Profiles - Test Updates * New: Release Profiles - Backend Updates * New: Interactive Artist Search * New: Change Montiored on Album Details Page * New: Show Duration on Album Details Page * Fixed: Manual Import not working if no albums are Missing * Fixed: Sort search input by sortTitle * Fixed: Queue columnLabel throwing JS error
50 lines
972 B
JavaScript
50 lines
972 B
JavaScript
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import monitorOptions from 'Utilities/Artist/monitorOptions';
|
|
import SelectInput from './SelectInput';
|
|
|
|
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;
|