mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-04 15:25:00 -05:00
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
import { ButtonGroup, Flex } from '@invoke-ai/ui-library';
|
|
import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
|
|
import { memo } from 'react';
|
|
|
|
import ClearQueueButton from './ClearQueueButton';
|
|
import PauseProcessorButton from './PauseProcessorButton';
|
|
import PruneQueueButton from './PruneQueueButton';
|
|
import ResumeProcessorButton from './ResumeProcessorButton';
|
|
|
|
const QueueTabQueueControls = () => {
|
|
const isPauseEnabled = useFeatureStatus('pauseQueue');
|
|
const isResumeEnabled = useFeatureStatus('resumeQueue');
|
|
return (
|
|
<Flex layerStyle="first" borderRadius="base" p={2} gap={2}>
|
|
{isPauseEnabled || isResumeEnabled ? (
|
|
<ButtonGroup w={28} orientation="vertical" size="sm">
|
|
{isResumeEnabled ? <ResumeProcessorButton /> : <></>}
|
|
{isPauseEnabled ? <PauseProcessorButton /> : <></>}
|
|
</ButtonGroup>
|
|
) : (
|
|
<></>
|
|
)}
|
|
<ButtonGroup w={28} orientation="vertical" size="sm">
|
|
<PruneQueueButton />
|
|
<ClearQueueButton />
|
|
</ButtonGroup>
|
|
</Flex>
|
|
);
|
|
};
|
|
|
|
export default memo(QueueTabQueueControls);
|