mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-15 01:23:53 -07:00
New: Mass Editor is now part of artists list
(cherry picked from commit a731d24e23b83484da1376d331b2ce998e216690)
This commit is contained in:
parent
84d5f2bcee
commit
fae94f4b8e
45 changed files with 1626 additions and 61 deletions
|
@ -12,7 +12,8 @@ function createMapStateToProps() {
|
|||
(state, { value }) => value,
|
||||
(state, { includeMissingValue }) => includeMissingValue,
|
||||
(state, { includeNoChange }) => includeNoChange,
|
||||
(rootFolders, value, includeMissingValue, includeNoChange) => {
|
||||
(state, { includeNoChangeDisabled }) => includeNoChangeDisabled,
|
||||
(rootFolders, value, includeMissingValue, includeNoChange, includeNoChangeDisabled = true) => {
|
||||
const values = rootFolders.items.map((rootFolder) => {
|
||||
return {
|
||||
key: rootFolder.path,
|
||||
|
@ -26,9 +27,8 @@ function createMapStateToProps() {
|
|||
if (includeNoChange) {
|
||||
values.unshift({
|
||||
key: 'noChange',
|
||||
value: '',
|
||||
name: 'No Change',
|
||||
isDisabled: true,
|
||||
value: 'No Change',
|
||||
isDisabled: includeNoChangeDisabled,
|
||||
isMissing: false
|
||||
});
|
||||
}
|
||||
|
@ -46,7 +46,6 @@ function createMapStateToProps() {
|
|||
values.push({
|
||||
key: '',
|
||||
value: '',
|
||||
name: '',
|
||||
isDisabled: true,
|
||||
isHidden: true
|
||||
});
|
||||
|
@ -54,8 +53,7 @@ function createMapStateToProps() {
|
|||
|
||||
values.push({
|
||||
key: ADD_NEW_KEY,
|
||||
value: '',
|
||||
name: 'Add a new path'
|
||||
value: 'Add a new path'
|
||||
});
|
||||
|
||||
return {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import SelectInput from './SelectInput';
|
||||
import EnhancedSelectInput from './EnhancedSelectInput';
|
||||
|
||||
const artistTypeOptions = [
|
||||
{ key: 'standard', value: 'Standard' },
|
||||
|
@ -14,6 +14,7 @@ function SeriesTypeSelectInput(props) {
|
|||
|
||||
const {
|
||||
includeNoChange,
|
||||
includeNoChangeDisabled = true,
|
||||
includeMixed
|
||||
} = props;
|
||||
|
||||
|
@ -21,7 +22,7 @@ function SeriesTypeSelectInput(props) {
|
|||
values.unshift({
|
||||
key: 'noChange',
|
||||
value: translate('NoChange'),
|
||||
disabled: true
|
||||
disabled: includeNoChangeDisabled
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -34,7 +35,7 @@ function SeriesTypeSelectInput(props) {
|
|||
}
|
||||
|
||||
return (
|
||||
<SelectInput
|
||||
<EnhancedSelectInput
|
||||
{...props}
|
||||
values={values}
|
||||
/>
|
||||
|
@ -43,6 +44,7 @@ function SeriesTypeSelectInput(props) {
|
|||
|
||||
SeriesTypeSelectInput.propTypes = {
|
||||
includeNoChange: PropTypes.bool.isRequired,
|
||||
includeNoChangeDisabled: PropTypes.bool,
|
||||
includeMixed: PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
|
|
|
@ -8,14 +8,6 @@
|
|||
@media only screen and (max-width: $breakpointSmall) {
|
||||
.contentFooter {
|
||||
display: block;
|
||||
|
||||
div {
|
||||
margin-top: 10px;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
.icon {
|
||||
margin-right: 8px;
|
||||
}
|
7
frontend/src/Components/Page/Toolbar/PageToolbarOverflowMenuItem.css.d.ts
vendored
Normal file
7
frontend/src/Components/Page/Toolbar/PageToolbarOverflowMenuItem.css.d.ts
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
// This file is automatically generated.
|
||||
// Please do not change this file!
|
||||
interface CssExports {
|
||||
'icon': string;
|
||||
}
|
||||
export const cssExports: CssExports;
|
||||
export default cssExports;
|
|
@ -0,0 +1,41 @@
|
|||
import { IconDefinition } from '@fortawesome/fontawesome-common-types';
|
||||
import React from 'react';
|
||||
import MenuItem from 'Components/Menu/MenuItem';
|
||||
import SpinnerIcon from 'Components/SpinnerIcon';
|
||||
import styles from './PageToolbarOverflowMenuItem.css';
|
||||
|
||||
interface PageToolbarOverflowMenuItemProps {
|
||||
iconName: IconDefinition;
|
||||
spinningName?: IconDefinition;
|
||||
isDisabled?: boolean;
|
||||
isSpinning?: boolean;
|
||||
showIndicator?: boolean;
|
||||
label: string;
|
||||
text?: string;
|
||||
onPress: () => void;
|
||||
}
|
||||
|
||||
function PageToolbarOverflowMenuItem(props: PageToolbarOverflowMenuItemProps) {
|
||||
const {
|
||||
iconName,
|
||||
spinningName,
|
||||
label,
|
||||
isDisabled,
|
||||
isSpinning = false,
|
||||
...otherProps
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<MenuItem key={label} isDisabled={isDisabled || isSpinning} {...otherProps}>
|
||||
<SpinnerIcon
|
||||
className={styles.icon}
|
||||
name={iconName}
|
||||
spinningName={spinningName}
|
||||
isSpinning={isSpinning}
|
||||
/>
|
||||
{label}
|
||||
</MenuItem>
|
||||
);
|
||||
}
|
||||
|
||||
export default PageToolbarOverflowMenuItem;
|
|
@ -4,12 +4,11 @@ import React, { Component } from 'react';
|
|||
import Measure from 'Components/Measure';
|
||||
import Menu from 'Components/Menu/Menu';
|
||||
import MenuContent from 'Components/Menu/MenuContent';
|
||||
import MenuItem from 'Components/Menu/MenuItem';
|
||||
import ToolbarMenuButton from 'Components/Menu/ToolbarMenuButton';
|
||||
import SpinnerIcon from 'Components/SpinnerIcon';
|
||||
import { forEach } from 'Helpers/elementChildren';
|
||||
import { align, icons } from 'Helpers/Props';
|
||||
import dimensions from 'Styles/Variables/dimensions';
|
||||
import PageToolbarOverflowMenuItem from './PageToolbarOverflowMenuItem';
|
||||
import styles from './PageToolbarSection.css';
|
||||
|
||||
const BUTTON_WIDTH = parseInt(dimensions.toolbarButtonWidth);
|
||||
|
@ -168,28 +167,15 @@ class PageToolbarSection extends Component {
|
|||
{
|
||||
overflowItems.map((item) => {
|
||||
const {
|
||||
iconName,
|
||||
spinningName,
|
||||
label,
|
||||
isDisabled,
|
||||
isSpinning,
|
||||
...otherProps
|
||||
overflowComponent: OverflowComponent = PageToolbarOverflowMenuItem
|
||||
} = item;
|
||||
|
||||
return (
|
||||
<MenuItem
|
||||
<OverflowComponent
|
||||
key={label}
|
||||
isDisabled={isDisabled || isSpinning}
|
||||
{...otherProps}
|
||||
>
|
||||
<SpinnerIcon
|
||||
className={styles.overflowMenuItemIcon}
|
||||
name={iconName}
|
||||
spinningName={spinningName}
|
||||
isSpinning={isSpinning}
|
||||
/>
|
||||
{label}
|
||||
</MenuItem>
|
||||
{...item}
|
||||
/>
|
||||
);
|
||||
})
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ function SpinnerIcon(props) {
|
|||
}
|
||||
|
||||
SpinnerIcon.propTypes = {
|
||||
className: PropTypes.string,
|
||||
name: PropTypes.object.isRequired,
|
||||
spinningName: PropTypes.object.isRequired,
|
||||
isSpinning: PropTypes.bool.isRequired
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue