mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): bug where viewer would disappear on upscaling tab
This commit is contained in:
parent
c3a8184431
commit
2e0cebb571
@ -9,7 +9,13 @@ import CurrentImageButtons from './CurrentImageButtons';
|
|||||||
import { ViewerToggleMenu } from './ViewerToggleMenu';
|
import { ViewerToggleMenu } from './ViewerToggleMenu';
|
||||||
|
|
||||||
export const ViewerToolbar = memo(() => {
|
export const ViewerToolbar = memo(() => {
|
||||||
const tab = useAppSelector(activeTabNameSelector);
|
const showToggle = useAppSelector((s) => {
|
||||||
|
const tab = activeTabNameSelector(s);
|
||||||
|
if (tab === 'upscaling' || tab === 'workflows') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
return (
|
return (
|
||||||
<Flex w="full" gap={2}>
|
<Flex w="full" gap={2}>
|
||||||
<Flex flex={1} justifyContent="center">
|
<Flex flex={1} justifyContent="center">
|
||||||
@ -23,7 +29,7 @@ export const ViewerToolbar = memo(() => {
|
|||||||
</Flex>
|
</Flex>
|
||||||
<Flex flex={1} justifyContent="center">
|
<Flex flex={1} justifyContent="center">
|
||||||
<Flex gap={2} marginInlineStart="auto">
|
<Flex gap={2} marginInlineStart="auto">
|
||||||
{tab !== 'workflows' && <ViewerToggleMenu />}
|
{showToggle && <ViewerToggleMenu />}
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
import { Box } from '@invoke-ai/ui-library';
|
import { Box } from '@invoke-ai/ui-library';
|
||||||
import { ImageViewer } from 'features/gallery/components/ImageViewer/ImageViewer';
|
import { ImageViewer } from 'features/gallery/components/ImageViewer/ImageViewer';
|
||||||
import { useImageViewer } from 'features/gallery/components/ImageViewer/useImageViewer';
|
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
|
|
||||||
const UpscalingTab = () => {
|
const UpscalingTab = () => {
|
||||||
const imageViewer = useImageViewer();
|
|
||||||
return (
|
return (
|
||||||
<Box layerStyle="first" position="relative" w="full" h="full" p={2} borderRadius="base">
|
<Box layerStyle="first" position="relative" w="full" h="full" p={2} borderRadius="base">
|
||||||
{imageViewer.isOpen && <ImageViewer />}
|
<ImageViewer />
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user