Skip to content

Commit c0065a6

Browse files
psychedelicioushipsterusername
authored andcommitted
feat(ui): floating viewer always shows progress, never shows metadata
1 parent cce3144 commit c0065a6

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

invokeai/frontend/web/src/features/gallery/components/ImageViewer/CurrentImagePreview.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,17 @@ type Props = {
2626
isDragDisabled?: boolean;
2727
isDropDisabled?: boolean;
2828
withNextPrevButtons?: boolean;
29+
withMetadata?: boolean;
30+
alwaysShowProgress?: boolean;
2931
};
3032

31-
const CurrentImagePreview = ({ isDragDisabled = false, isDropDisabled = false, withNextPrevButtons = true }: Props) => {
33+
const CurrentImagePreview = ({
34+
isDragDisabled = false,
35+
isDropDisabled = false,
36+
withNextPrevButtons = true,
37+
withMetadata = true,
38+
alwaysShowProgress = false,
39+
}: Props) => {
3240
const { t } = useTranslation();
3341
const shouldShowImageDetails = useAppSelector((s) => s.ui.shouldShowImageDetails);
3442
const imageName = useAppSelector(selectLastSelectedImageName);
@@ -78,7 +86,7 @@ const CurrentImagePreview = ({ isDragDisabled = false, isDropDisabled = false, w
7886
justifyContent="center"
7987
position="relative"
8088
>
81-
{hasDenoiseProgress && shouldShowProgressInViewer ? (
89+
{hasDenoiseProgress && (shouldShowProgressInViewer || alwaysShowProgress) ? (
8290
<ProgressImage />
8391
) : (
8492
<IAIDndImage
@@ -96,7 +104,7 @@ const CurrentImagePreview = ({ isDragDisabled = false, isDropDisabled = false, w
96104
/>
97105
)}
98106
<AnimatePresence>
99-
{shouldShowImageDetails && imageDTO && (
107+
{shouldShowImageDetails && imageDTO && withMetadata && (
100108
<Box
101109
as={motion.div}
102110
key="metadataViewer"

invokeai/frontend/web/src/features/gallery/components/ImageViewer/FloatingImageViewer.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,13 @@ const FloatingImageViewerComponent = () => {
137137
<IconButton aria-label={t('common.close')} icon={<PiXBold />} size="sm" variant="link" onClick={onClose} />
138138
</Flex>
139139
<Flex p={2} w="full" h="full">
140-
<CurrentImagePreview isDragDisabled={true} isDropDisabled={true} withNextPrevButtons={false} />
140+
<CurrentImagePreview
141+
isDragDisabled={true}
142+
isDropDisabled={true}
143+
withNextPrevButtons={false}
144+
withMetadata={false}
145+
alwaysShowProgress
146+
/>
141147
</Flex>
142148
</Flex>
143149
</Rnd>

0 commit comments

Comments
 (0)