mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
import { Flex } from '@invoke-ai/ui-library';
|
|
import { useAppSelector } from 'app/store/storeHooks';
|
|
import { ToggleMetadataViewerButton } from 'features/gallery/components/ImageViewer/ToggleMetadataViewerButton';
|
|
import { ToggleProgressButton } from 'features/gallery/components/ImageViewer/ToggleProgressButton';
|
|
import { activeTabNameSelector } from 'features/ui/store/uiSelectors';
|
|
import { memo } from 'react';
|
|
|
|
import CurrentImageButtons from './CurrentImageButtons';
|
|
import { ViewerToggleMenu } from './ViewerToggleMenu';
|
|
|
|
export const ViewerToolbar = memo(() => {
|
|
const tab = useAppSelector(activeTabNameSelector);
|
|
return (
|
|
<Flex w="full" gap={2}>
|
|
<Flex flex={1} justifyContent="center">
|
|
<Flex gap={2} marginInlineEnd="auto">
|
|
<ToggleProgressButton />
|
|
<ToggleMetadataViewerButton />
|
|
</Flex>
|
|
</Flex>
|
|
<Flex flex={1} gap={2} justifyContent="center">
|
|
<CurrentImageButtons />
|
|
</Flex>
|
|
<Flex flex={1} justifyContent="center">
|
|
<Flex gap={2} marginInlineStart="auto">
|
|
{tab !== 'workflows' && <ViewerToggleMenu />}
|
|
</Flex>
|
|
</Flex>
|
|
</Flex>
|
|
);
|
|
});
|
|
|
|
ViewerToolbar.displayName = 'ViewerToolbar';
|