mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): floating params panel invoke button loading state
This commit is contained in:
parent
38ed720ff2
commit
d60605fcd8
@ -25,15 +25,13 @@ const FloatingSidePanelButtons = (props: Props) => {
|
|||||||
const { queueBack, isLoading, isDisabled } = useQueueBack();
|
const { queueBack, isLoading, isDisabled } = useQueueBack();
|
||||||
const { data: queueStatus } = useGetQueueStatusQuery();
|
const { data: queueStatus } = useGetQueueStatusQuery();
|
||||||
|
|
||||||
const queueButtonIcon = useMemo(
|
const queueButtonIcon = useMemo(() => {
|
||||||
() =>
|
const isProcessing = (queueStatus?.queue.in_progress ?? 0) > 0;
|
||||||
!isDisabled && queueStatus?.processor.is_processing ? (
|
if (!isDisabled && isProcessing) {
|
||||||
<Icon boxSize={6} as={PiCircleNotchBold} animation={spinAnimation} />
|
return <Icon boxSize={6} as={PiCircleNotchBold} animation={spinAnimation} />;
|
||||||
) : (
|
}
|
||||||
<RiSparklingFill size="16px" />
|
return <RiSparklingFill size="16px" />;
|
||||||
),
|
}, [isDisabled, queueStatus]);
|
||||||
[isDisabled, queueStatus?.processor.is_processing]
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!props.panelApi.isCollapsed) {
|
if (!props.panelApi.isCollapsed) {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user