mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-07 21:42:16 -07:00
Fixed: Other Misc Improvements
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
parent
2366ce0931
commit
72947029f4
7 changed files with 21 additions and 8 deletions
|
@ -15,3 +15,4 @@ gulp.task('build',
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,7 @@ class BlacklistRow extends Component {
|
||||||
name={icons.INFO}
|
name={icons.INFO}
|
||||||
onPress={this.onDetailsPress}
|
onPress={this.onDetailsPress}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<IconButton
|
<IconButton
|
||||||
title="Remove from blacklist"
|
title="Remove from blacklist"
|
||||||
name={icons.REMOVE}
|
name={icons.REMOVE}
|
||||||
|
|
|
@ -3,16 +3,21 @@ import { connect } from 'react-redux';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import sortByName from 'Utilities/Array/sortByName';
|
import sortByName from 'Utilities/Array/sortByName';
|
||||||
import { filterBuilderTypes } from 'Helpers/Props';
|
import { filterBuilderTypes } from 'Helpers/Props';
|
||||||
|
import * as filterTypes from 'Helpers/Props/filterTypes';
|
||||||
import FilterBuilderRowValue from './FilterBuilderRowValue';
|
import FilterBuilderRowValue from './FilterBuilderRowValue';
|
||||||
|
|
||||||
function createTagListSelector() {
|
function createTagListSelector() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
|
(state, { filterType }) => filterType,
|
||||||
(state, { sectionItems }) => sectionItems,
|
(state, { sectionItems }) => sectionItems,
|
||||||
(state, { selectedFilterBuilderProp }) => selectedFilterBuilderProp,
|
(state, { selectedFilterBuilderProp }) => selectedFilterBuilderProp,
|
||||||
(sectionItems, selectedFilterBuilderProp) => {
|
(filterType, sectionItems, selectedFilterBuilderProp) => {
|
||||||
if (
|
if (
|
||||||
selectedFilterBuilderProp.type === filterBuilderTypes.NUMBER ||
|
(selectedFilterBuilderProp.type === filterBuilderTypes.NUMBER ||
|
||||||
selectedFilterBuilderProp.type === filterBuilderTypes.STRING
|
selectedFilterBuilderProp.type === filterBuilderTypes.STRING) &&
|
||||||
|
filterType !== filterTypes.EQUAL &&
|
||||||
|
filterType !== filterBuilderTypes.NOT_EQUAL ||
|
||||||
|
!selectedFilterBuilderProp.optionsSelector
|
||||||
) {
|
) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,10 +29,10 @@ function CustomFiltersModalContent(props) {
|
||||||
|
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
{
|
{
|
||||||
customFilters.map((customFilter, index) => {
|
customFilters.map((customFilter) => {
|
||||||
return (
|
return (
|
||||||
<CustomFilter
|
<CustomFilter
|
||||||
key={index}
|
key={customFilter.id}
|
||||||
id={customFilter.id}
|
id={customFilter.id}
|
||||||
label={customFilter.label}
|
label={customFilter.label}
|
||||||
filters={customFilter.filters}
|
filters={customFilter.filters}
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
.suggestionsList {
|
.suggestionsList {
|
||||||
margin: 5px 0;
|
margin: 5px 0;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
max-height: 200px;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import _ from 'lodash';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
@ -13,7 +12,7 @@ function createMapStateToProps() {
|
||||||
(state) => state.rootFolders,
|
(state) => state.rootFolders,
|
||||||
(state, { includeNoChange }) => includeNoChange,
|
(state, { includeNoChange }) => includeNoChange,
|
||||||
(rootFolders, includeNoChange) => {
|
(rootFolders, includeNoChange) => {
|
||||||
const values = _.map(rootFolders.items, (rootFolder) => {
|
const values = rootFolders.items.map((rootFolder) => {
|
||||||
return {
|
return {
|
||||||
key: rootFolder.path,
|
key: rootFolder.path,
|
||||||
value: rootFolder.path,
|
value: rootFolder.path,
|
||||||
|
@ -85,7 +84,7 @@ class RootFolderSelectInputConnector extends Component {
|
||||||
onChange
|
onChange
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
if (!value || !_.some(values, (v) => v.key === value) || value === ADD_NEW_KEY) {
|
if (!value || !values.some((v) => v.key === value) || value === ADD_NEW_KEY) {
|
||||||
const defaultValue = values[0];
|
const defaultValue = values[0];
|
||||||
|
|
||||||
if (defaultValue.key === ADD_NEW_KEY) {
|
if (defaultValue.key === ADD_NEW_KEY) {
|
||||||
|
|
|
@ -128,6 +128,8 @@ class TextInput extends Component {
|
||||||
hasWarning,
|
hasWarning,
|
||||||
hasButton,
|
hasButton,
|
||||||
step,
|
step,
|
||||||
|
min,
|
||||||
|
max,
|
||||||
onBlur
|
onBlur
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
|
@ -148,6 +150,8 @@ class TextInput extends Component {
|
||||||
name={name}
|
name={name}
|
||||||
value={value}
|
value={value}
|
||||||
step={step}
|
step={step}
|
||||||
|
min={min}
|
||||||
|
max={max}
|
||||||
onChange={this.onChange}
|
onChange={this.onChange}
|
||||||
onFocus={this.onFocus}
|
onFocus={this.onFocus}
|
||||||
onBlur={onBlur}
|
onBlur={onBlur}
|
||||||
|
@ -171,6 +175,8 @@ TextInput.propTypes = {
|
||||||
hasWarning: PropTypes.bool,
|
hasWarning: PropTypes.bool,
|
||||||
hasButton: PropTypes.bool,
|
hasButton: PropTypes.bool,
|
||||||
step: PropTypes.number,
|
step: PropTypes.number,
|
||||||
|
min: PropTypes.number,
|
||||||
|
max: PropTypes.number,
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
onFocus: PropTypes.func,
|
onFocus: PropTypes.func,
|
||||||
onBlur: PropTypes.func,
|
onBlur: PropTypes.func,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue