mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): floating viewer always shows progress, never shows metadata
This commit is contained in:
parent
cce3144c74
commit
c0065a65a0
@ -26,9 +26,17 @@ type Props = {
|
|||||||
isDragDisabled?: boolean;
|
isDragDisabled?: boolean;
|
||||||
isDropDisabled?: boolean;
|
isDropDisabled?: boolean;
|
||||||
withNextPrevButtons?: boolean;
|
withNextPrevButtons?: boolean;
|
||||||
|
withMetadata?: boolean;
|
||||||
|
alwaysShowProgress?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const CurrentImagePreview = ({ isDragDisabled = false, isDropDisabled = false, withNextPrevButtons = true }: Props) => {
|
const CurrentImagePreview = ({
|
||||||
|
isDragDisabled = false,
|
||||||
|
isDropDisabled = false,
|
||||||
|
withNextPrevButtons = true,
|
||||||
|
withMetadata = true,
|
||||||
|
alwaysShowProgress = false,
|
||||||
|
}: Props) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const shouldShowImageDetails = useAppSelector((s) => s.ui.shouldShowImageDetails);
|
const shouldShowImageDetails = useAppSelector((s) => s.ui.shouldShowImageDetails);
|
||||||
const imageName = useAppSelector(selectLastSelectedImageName);
|
const imageName = useAppSelector(selectLastSelectedImageName);
|
||||||
@ -78,7 +86,7 @@ const CurrentImagePreview = ({ isDragDisabled = false, isDropDisabled = false, w
|
|||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
position="relative"
|
position="relative"
|
||||||
>
|
>
|
||||||
{hasDenoiseProgress && shouldShowProgressInViewer ? (
|
{hasDenoiseProgress && (shouldShowProgressInViewer || alwaysShowProgress) ? (
|
||||||
<ProgressImage />
|
<ProgressImage />
|
||||||
) : (
|
) : (
|
||||||
<IAIDndImage
|
<IAIDndImage
|
||||||
@ -96,7 +104,7 @@ const CurrentImagePreview = ({ isDragDisabled = false, isDropDisabled = false, w
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<AnimatePresence>
|
<AnimatePresence>
|
||||||
{shouldShowImageDetails && imageDTO && (
|
{shouldShowImageDetails && imageDTO && withMetadata && (
|
||||||
<Box
|
<Box
|
||||||
as={motion.div}
|
as={motion.div}
|
||||||
key="metadataViewer"
|
key="metadataViewer"
|
||||||
|
@ -137,7 +137,13 @@ const FloatingImageViewerComponent = () => {
|
|||||||
<IconButton aria-label={t('common.close')} icon={<PiXBold />} size="sm" variant="link" onClick={onClose} />
|
<IconButton aria-label={t('common.close')} icon={<PiXBold />} size="sm" variant="link" onClick={onClose} />
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex p={2} w="full" h="full">
|
<Flex p={2} w="full" h="full">
|
||||||
<CurrentImagePreview isDragDisabled={true} isDropDisabled={true} withNextPrevButtons={false} />
|
<CurrentImagePreview
|
||||||
|
isDragDisabled={true}
|
||||||
|
isDropDisabled={true}
|
||||||
|
withNextPrevButtons={false}
|
||||||
|
withMetadata={false}
|
||||||
|
alwaysShowProgress
|
||||||
|
/>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Rnd>
|
</Rnd>
|
||||||
|
Loading…
Reference in New Issue
Block a user