New: Mass Editor is now part of artists list

(cherry picked from commit a731d24e23b83484da1376d331b2ce998e216690)
This commit is contained in:
Mark McDowall 2023-01-15 10:47:40 -08:00 committed by Bogdan
parent 84d5f2bcee
commit fae94f4b8e
45 changed files with 1626 additions and 61 deletions

View file

@ -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;