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 />} icon={<FaSeedling />}
tooltip={`${t('parameters.useSeed')} (S)`} tooltip={`${t('parameters.useSeed')} (S)`}
aria-label={`${t('parameters.useSeed')} (S)`} aria-label={`${t('parameters.useSeed')} (S)`}
isDisabled={!image?.metadata?.sd_metadata?.seed} isDisabled={!image?.metadata?.invokeai?.node?.seed}
onClick={handleUseSeed} 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 { useAppDispatch } from 'app/store/storeHooks';
import { isFinite, isString } from 'lodash-es'; import { isFinite, isString } from 'lodash-es';
import { useCallback } from 'react'; import { useCallback } from 'react';
@ -51,7 +51,7 @@ export const useParameters = () => {
toast({ toast({
title: t('toast.seedNotSet'), title: t('toast.seedNotSet'),
description: t('toast.seedNotSetDesc'), description: t('toast.seedNotSetDesc'),
status: 'error', status: 'warning',
duration: 2500, duration: 2500,
isClosable: true, isClosable: true,
}); });
@ -61,7 +61,7 @@ export const useParameters = () => {
dispatch(setSeed(s)); dispatch(setSeed(s));
toast({ toast({
title: t('toast.seedSet'), title: t('toast.seedSet'),
status: 'success', status: 'info',
duration: 2500, duration: 2500,
isClosable: true, isClosable: true,
}); });
@ -78,7 +78,7 @@ export const useParameters = () => {
toast({ toast({
title: t('toast.initialImageNotSet'), title: t('toast.initialImageNotSet'),
description: t('toast.initialImageNotSetDesc'), description: t('toast.initialImageNotSetDesc'),
status: 'error', status: 'warning',
duration: 2500, duration: 2500,
isClosable: true, isClosable: true,
}); });
@ -90,7 +90,7 @@ export const useParameters = () => {
); );
toast({ toast({
title: t('toast.initialImageSet'), title: t('toast.initialImageSet'),
status: 'success', status: 'info',
duration: 2500, duration: 2500,
isClosable: true, isClosable: true,
}); });
@ -107,7 +107,7 @@ export const useParameters = () => {
toast({ toast({
title: t('toast.imageNotLoaded'), title: t('toast.imageNotLoaded'),
description: t('toast.imageNotLoadedDesc'), description: t('toast.imageNotLoadedDesc'),
status: 'error', status: 'warning',
duration: 2500, duration: 2500,
isClosable: true, isClosable: true,
}); });
@ -115,10 +115,9 @@ export const useParameters = () => {
} }
dispatch(initialImageSelected({ name: image.name, type: image.type })); dispatch(initialImageSelected({ name: image.name, type: image.type }));
toast({ toast({
title: t('toast.sentToImageToImage'), title: t('toast.sentToImageToImage'),
status: 'success', status: 'info',
duration: 2500, duration: 2500,
isClosable: true, isClosable: true,
}); });