fix(ui): do not show loading state on floating invoke button if disabled

This commit is contained in:
psychedelicious 2024-01-04 23:47:19 +11:00 committed by Kent Keirsey
parent 0b7dc721cf
commit 2347a00a70

View File

@ -31,12 +31,12 @@ const FloatingSidePanelButtons = (props: Props) => {
const queueButtonIcon = useMemo(
() =>
queueStatus?.processor.is_processing ? (
!isDisabled && queueStatus?.processor.is_processing ? (
<SpinnerIcon animation={spinAnimationSlow} />
) : (
<IoSparkles />
),
[queueStatus?.processor.is_processing]
[isDisabled, queueStatus?.processor.is_processing]
);
if (!props.panelApi.isCollapsed) {
@ -57,8 +57,8 @@ const FloatingSidePanelButtons = (props: Props) => {
>
<InvButtonGroup orientation="vertical" flexGrow={3}>
<InvIconButton
tooltip={t('parameters.showOptionsPanel')}
aria-label={t('parameters.showOptionsPanel')}
tooltip={t('accessibility.showOptionsPanel')}
aria-label={t('accessibility.showOptionsPanel')}
onClick={props.panelApi.expand}
sx={floatingButtonStyles}
icon={<FaSlidersH />}