mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Removes reasonsWhyNotReady
The popover doesn't play well with the button being disabled, and I don't think adds any value.
This commit is contained in:
parent
b72b61b790
commit
5ed6a31b97
@ -1,4 +1,4 @@
|
|||||||
import { ListItem, UnorderedList } from '@chakra-ui/react';
|
import { Flex, ListItem, Tooltip, UnorderedList } from '@chakra-ui/react';
|
||||||
import { useHotkeys } from 'react-hotkeys-hook';
|
import { useHotkeys } from 'react-hotkeys-hook';
|
||||||
import { FaPlay } from 'react-icons/fa';
|
import { FaPlay } from 'react-icons/fa';
|
||||||
import { readinessSelector } from 'app/selectors/readinessSelector';
|
import { readinessSelector } from 'app/selectors/readinessSelector';
|
||||||
@ -36,7 +36,7 @@ export default function InvokeButton(props: InvokeButton) {
|
|||||||
[isReady, activeTabName]
|
[isReady, activeTabName]
|
||||||
);
|
);
|
||||||
|
|
||||||
const buttonComponent = (
|
return (
|
||||||
<div style={{ flexGrow: 4 }}>
|
<div style={{ flexGrow: 4 }}>
|
||||||
{iconButton ? (
|
{iconButton ? (
|
||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
@ -64,18 +64,4 @@ export default function InvokeButton(props: InvokeButton) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
return isReady ? (
|
|
||||||
buttonComponent
|
|
||||||
) : (
|
|
||||||
<IAIPopover trigger="hover" triggerComponent={buttonComponent}>
|
|
||||||
{reasonsWhyNotReady && (
|
|
||||||
<UnorderedList>
|
|
||||||
{reasonsWhyNotReady.map((reason, i) => (
|
|
||||||
<ListItem key={i}>{reason}</ListItem>
|
|
||||||
))}
|
|
||||||
</UnorderedList>
|
|
||||||
)}
|
|
||||||
</IAIPopover>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user