fix(ui): fix current image seed button

This commit is contained in:
psychedelicious 2023-04-30 01:11:54 +10:00
parent 258895bcc9
commit adaecada20
2 changed files with 8 additions and 9 deletions

View File

@ -510,7 +510,7 @@ const CurrentImageButtons = (props: CurrentImageButtonsProps) => {
icon={<FaSeedling />}
tooltip={`${t('parameters.useSeed')} (S)`}
aria-label={`${t('parameters.useSeed')} (S)`}
isDisabled={!image?.metadata?.sd_metadata?.seed}
isDisabled={!image?.metadata?.invokeai?.node?.seed}
onClick={handleUseSeed}
/>

View File

@ -1,4 +1,4 @@
import { useToast } from '@chakra-ui/react';
import { UseToastOptions, useToast } from '@chakra-ui/react';
import { useAppDispatch } from 'app/store/storeHooks';
import { isFinite, isString } from 'lodash-es';
import { useCallback } from 'react';
@ -51,7 +51,7 @@ export const useParameters = () => {
toast({
title: t('toast.seedNotSet'),
description: t('toast.seedNotSetDesc'),
status: 'error',
status: 'warning',
duration: 2500,
isClosable: true,
});
@ -61,7 +61,7 @@ export const useParameters = () => {
dispatch(setSeed(s));
toast({
title: t('toast.seedSet'),
status: 'success',
status: 'info',
duration: 2500,
isClosable: true,
});
@ -78,7 +78,7 @@ export const useParameters = () => {
toast({
title: t('toast.initialImageNotSet'),
description: t('toast.initialImageNotSetDesc'),
status: 'error',
status: 'warning',
duration: 2500,
isClosable: true,
});
@ -90,7 +90,7 @@ export const useParameters = () => {
);
toast({
title: t('toast.initialImageSet'),
status: 'success',
status: 'info',
duration: 2500,
isClosable: true,
});
@ -107,7 +107,7 @@ export const useParameters = () => {
toast({
title: t('toast.imageNotLoaded'),
description: t('toast.imageNotLoadedDesc'),
status: 'error',
status: 'warning',
duration: 2500,
isClosable: true,
});
@ -115,10 +115,9 @@ export const useParameters = () => {
}
dispatch(initialImageSelected({ name: image.name, type: image.type }));
toast({
title: t('toast.sentToImageToImage'),
status: 'success',
status: 'info',
duration: 2500,
isClosable: true,
});