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;
|
||||
isDropDisabled?: 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 shouldShowImageDetails = useAppSelector((s) => s.ui.shouldShowImageDetails);
|
||||
const imageName = useAppSelector(selectLastSelectedImageName);
|
||||
@ -78,7 +86,7 @@ const CurrentImagePreview = ({ isDragDisabled = false, isDropDisabled = false, w
|
||||
justifyContent="center"
|
||||
position="relative"
|
||||
>
|
||||
{hasDenoiseProgress && shouldShowProgressInViewer ? (
|
||||
{hasDenoiseProgress && (shouldShowProgressInViewer || alwaysShowProgress) ? (
|
||||
<ProgressImage />
|
||||
) : (
|
||||
<IAIDndImage
|
||||
@ -96,7 +104,7 @@ const CurrentImagePreview = ({ isDragDisabled = false, isDropDisabled = false, w
|
||||
/>
|
||||
)}
|
||||
<AnimatePresence>
|
||||
{shouldShowImageDetails && imageDTO && (
|
||||
{shouldShowImageDetails && imageDTO && withMetadata && (
|
||||
<Box
|
||||
as={motion.div}
|
||||
key="metadataViewer"
|
||||
|
@ -137,7 +137,13 @@ const FloatingImageViewerComponent = () => {
|
||||
<IconButton aria-label={t('common.close')} icon={<PiXBold />} size="sm" variant="link" onClick={onClose} />
|
||||
</Flex>
|
||||
<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>
|
||||
</Rnd>
|
||||
|
Loading…
Reference in New Issue
Block a user