mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-04 22:15:08 -05:00
- Improved/more thorough checking before invoking for control layers - Improved styling for the tooltip
44 lines
1.4 KiB
TypeScript
44 lines
1.4 KiB
TypeScript
import { Button, Flex, Spacer } from '@invoke-ai/ui-library';
|
|
import { useAppSelector } from 'app/store/storeHooks';
|
|
import { QueueIterationsNumberInput } from 'features/queue/components/QueueIterationsNumberInput';
|
|
import { useQueueBack } from 'features/queue/hooks/useQueueBack';
|
|
import { memo } from 'react';
|
|
import { RiSparkling2Fill } from 'react-icons/ri';
|
|
|
|
import { QueueButtonTooltip } from './QueueButtonTooltip';
|
|
|
|
const invoke = 'Invoke';
|
|
|
|
export const InvokeQueueBackButton = memo(() => {
|
|
const { queueBack, isLoading, isDisabled } = useQueueBack();
|
|
const isLoadingDynamicPrompts = useAppSelector((s) => s.dynamicPrompts.isLoading);
|
|
|
|
return (
|
|
<Flex pos="relative" flexGrow={1} minW="240px">
|
|
<QueueIterationsNumberInput />
|
|
<QueueButtonTooltip>
|
|
<Button
|
|
onClick={queueBack}
|
|
isLoading={isLoading || isLoadingDynamicPrompts}
|
|
loadingText={invoke}
|
|
isDisabled={isDisabled}
|
|
rightIcon={<RiSparkling2Fill />}
|
|
variant="solid"
|
|
zIndex={1}
|
|
colorScheme="invokeYellow"
|
|
size="lg"
|
|
w="calc(100% - 60px)"
|
|
flexShrink={0}
|
|
justifyContent="space-between"
|
|
spinnerPlacement="end"
|
|
>
|
|
<span>{invoke}</span>
|
|
<Spacer />
|
|
</Button>
|
|
</QueueButtonTooltip>
|
|
</Flex>
|
|
);
|
|
});
|
|
|
|
InvokeQueueBackButton.displayName = 'InvokeQueueBackButton';
|