mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-15 06:45:21 -05:00
(ui) add Canvas Alert for invocation progress messages
This commit is contained in:
committed by
psychedelicious
parent
9bbb5644af
commit
bdbdb22b74
@@ -0,0 +1,21 @@
|
||||
import { Alert, AlertIcon, AlertTitle } from '@invoke-ai/ui-library';
|
||||
import { useStore } from '@nanostores/react';
|
||||
import { memo } from 'react';
|
||||
import { $progressEventMessage } from 'services/events/stores';
|
||||
|
||||
export const CanvasAlertsInvocationProgress = memo(() => {
|
||||
const progressEventMessage = useStore($progressEventMessage);
|
||||
|
||||
if (!progressEventMessage) {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
return (
|
||||
<Alert status="loading" borderRadius="base" fontSize="sm" shadow="md" w="fit-content">
|
||||
<AlertIcon />
|
||||
<AlertTitle>{progressEventMessage}</AlertTitle>
|
||||
</Alert>
|
||||
);
|
||||
});
|
||||
|
||||
CanvasAlertsInvocationProgress.displayName = 'CanvasAlertsInvocationProgress';
|
||||
@@ -21,6 +21,8 @@ import { GatedImageViewer } from 'features/gallery/components/ImageViewer/ImageV
|
||||
import { memo, useCallback, useRef } from 'react';
|
||||
import { PiDotsThreeOutlineVerticalFill } from 'react-icons/pi';
|
||||
|
||||
import { CanvasAlertsInvocationProgress } from './CanvasAlerts/CanvasAlertsInvocationProgress';
|
||||
|
||||
const MenuContent = () => {
|
||||
return (
|
||||
<CanvasManagerProviderGate>
|
||||
@@ -83,6 +85,7 @@ export const CanvasMainPanelContent = memo(() => {
|
||||
{showHUD && <CanvasHUD />}
|
||||
<CanvasAlertsSelectedEntityStatus />
|
||||
<CanvasAlertsPreserveMask />
|
||||
<CanvasAlertsInvocationProgress />
|
||||
<CanvasAlertsSendingToGallery />
|
||||
</Flex>
|
||||
<Flex position="absolute" top={1} insetInlineEnd={1}>
|
||||
|
||||
Reference in New Issue
Block a user