mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
refactor(ui): use image names for selection instead of dtos
Update the frontend to incorporate the previous changes to how image selection and general image identification is handled in the frontend.
This commit is contained in:
@@ -21,10 +21,10 @@ import { Trans, useTranslation } from 'react-i18next';
|
||||
import { PiFrameCornersBold } from 'react-icons/pi';
|
||||
import type { ImageDTO } from 'services/api/types';
|
||||
|
||||
type Props = { imageDTO?: ImageDTO };
|
||||
type Props = { imageDTO: ImageDTO | null; isDisabled: boolean };
|
||||
|
||||
export const PostProcessingPopover = memo((props: Props) => {
|
||||
const { imageDTO } = props;
|
||||
const { imageDTO, isDisabled } = props;
|
||||
const dispatch = useAppDispatch();
|
||||
const postProcessingModel = useAppSelector(selectPostProcessingModel);
|
||||
const inProgress = useIsQueueMutationInProgress();
|
||||
@@ -49,6 +49,7 @@ export const PostProcessingPopover = memo((props: Props) => {
|
||||
aria-label={t('parameters.postProcessing')}
|
||||
variant="link"
|
||||
alignSelf="stretch"
|
||||
isDisabled={isDisabled}
|
||||
/>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent>
|
||||
@@ -56,7 +57,11 @@ export const PostProcessingPopover = memo((props: Props) => {
|
||||
<Flex flexDirection="column" gap={4}>
|
||||
<ParamPostProcessingModel />
|
||||
{!postProcessingModel && <MissingModelWarning />}
|
||||
<Button size="sm" isDisabled={!imageDTO || inProgress || !postProcessingModel} onClick={handleClickUpscale}>
|
||||
<Button
|
||||
size="sm"
|
||||
isDisabled={isDisabled || !imageDTO || inProgress || !postProcessingModel}
|
||||
onClick={handleClickUpscale}
|
||||
>
|
||||
{t('parameters.processImage')}
|
||||
</Button>
|
||||
</Flex>
|
||||
|
||||
Reference in New Issue
Block a user