mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
feat(ui): improved dynamic prompts behaviour
- Bump `@invoke-ai/ui` for updated styles - Update regex to parse prompts with newlines - Update styling of overlay button when prompt has an error - Fix bug where loading and error state sometimes weren't cleared
This commit is contained in:
committed by
Kent Keirsey
parent
2aed6e2dba
commit
a0e68705dd
@@ -13,7 +13,11 @@ const loadingStyles: SystemStyleObject = {
|
||||
export const ShowDynamicPromptsPreviewButton = memo(() => {
|
||||
const { t } = useTranslation();
|
||||
const isLoading = useAppSelector((s) => s.dynamicPrompts.isLoading);
|
||||
const isError = useAppSelector((s) =>
|
||||
Boolean(s.dynamicPrompts.isError || s.dynamicPrompts.parsingError)
|
||||
);
|
||||
const { isOpen, onOpen } = useDynamicPromptsModal();
|
||||
|
||||
return (
|
||||
<Tooltip
|
||||
label={
|
||||
@@ -30,6 +34,7 @@ export const ShowDynamicPromptsPreviewButton = memo(() => {
|
||||
icon={<BsBracesAsterisk />}
|
||||
onClick={onOpen}
|
||||
sx={isLoading ? loadingStyles : undefined}
|
||||
colorScheme={isError && !isLoading ? 'error' : 'base'}
|
||||
/>
|
||||
</Tooltip>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user