feat(ui): remove shouldShowDeleteButton

- remove this state entirely
- use `state.hotkeys.shift` directly to hide and show the icon on gallery
- also formatting
This commit is contained in:
psychedelicious
2023-08-16 11:50:57 +10:00
parent 5b1099193d
commit 0f8606914e
8 changed files with 51 additions and 70 deletions

View File

@ -1,10 +1,4 @@
import {
Box,
Flex,
Spinner,
SystemStyleObject,
useColorModeValue,
} from '@chakra-ui/react';
import { Box, Flex, Spinner, SystemStyleObject } from '@chakra-ui/react';
import { createSelector } from '@reduxjs/toolkit';
import { skipToken } from '@reduxjs/toolkit/dist/query';
import {
@ -16,14 +10,14 @@ import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
import IAIDndImage from 'common/components/IAIDndImage';
import { memo, useCallback, useMemo, useState } from 'react';
import { FaUndo } from 'react-icons/fa';
import { useGetImageDTOQuery } from 'services/api/endpoints/images';
import { PostUploadAction } from 'services/api/types';
import IAIDndImageIcon from '../../../common/components/IAIDndImageIcon';
import {
ControlNetConfig,
controlNetImageChanged,
} from '../store/controlNetSlice';
import { FaUndo } from 'react-icons/fa';
import IAIDndImageIcon from '../../../common/components/IAIDndImageIcon';
type Props = {
controlNet: ControlNetConfig;
@ -101,11 +95,6 @@ const ControlNetImagePreview = (props: Props) => {
[controlNetId]
);
const resetIconShadow = useColorModeValue(
`drop-shadow(0px 0px 0.1rem var(--invokeai-colors-base-600))`,
`drop-shadow(0px 0px 0.1rem var(--invokeai-colors-base-800))`
);
const shouldShowProcessedImage =
controlImage &&
processedControlImage &&