mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -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
|
@ -3,7 +3,14 @@ import { SelectActionType, useSelect } from 'App/SelectContext';
|
|||
import PageToolbarButton from 'Components/Page/Toolbar/PageToolbarButton';
|
||||
import { icons } from 'Helpers/Props';
|
||||
|
||||
function ArtistIndexSelectAllButton() {
|
||||
interface ArtistIndexSelectAllButtonProps {
|
||||
label: string;
|
||||
isSelectMode: boolean;
|
||||
overflowComponent: React.FunctionComponent;
|
||||
}
|
||||
|
||||
function ArtistIndexSelectAllButton(props: ArtistIndexSelectAllButtonProps) {
|
||||
const { isSelectMode } = props;
|
||||
const [selectState, selectDispatch] = useSelect();
|
||||
const { allSelected, allUnselected } = selectState;
|
||||
|
||||
|
@ -23,13 +30,13 @@ function ArtistIndexSelectAllButton() {
|
|||
});
|
||||
}, [allSelected, selectDispatch]);
|
||||
|
||||
return (
|
||||
return isSelectMode ? (
|
||||
<PageToolbarButton
|
||||
label={allSelected ? 'Unselect All' : 'Select All'}
|
||||
iconName={icon}
|
||||
onPress={onPress}
|
||||
/>
|
||||
);
|
||||
) : null;
|
||||
}
|
||||
|
||||
export default ArtistIndexSelectAllButton;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue