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