mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): add reload schema button (#3252)
This commit is contained in:
commit
d0d8640711
@ -1,7 +1,9 @@
|
||||
import { HStack } from '@chakra-ui/react';
|
||||
import { useAppDispatch } from 'app/storeHooks';
|
||||
import IAIButton from 'common/components/IAIButton';
|
||||
import { memo, useCallback } from 'react';
|
||||
import { Panel } from 'reactflow';
|
||||
import { receivedOpenAPISchema } from 'services/thunks/schema';
|
||||
import { nodesGraphBuilt } from 'services/thunks/session';
|
||||
|
||||
const TopCenterPanel = () => {
|
||||
@ -11,11 +13,18 @@ const TopCenterPanel = () => {
|
||||
dispatch(nodesGraphBuilt());
|
||||
}, [dispatch]);
|
||||
|
||||
const handleReloadSchema = useCallback(() => {
|
||||
dispatch(receivedOpenAPISchema());
|
||||
}, [dispatch]);
|
||||
|
||||
return (
|
||||
<Panel position="top-center">
|
||||
<IAIButton colorScheme="accent" onClick={handleInvoke}>
|
||||
Will it blend?
|
||||
</IAIButton>
|
||||
<HStack>
|
||||
<IAIButton colorScheme="accent" onClick={handleInvoke}>
|
||||
Will it blend?
|
||||
</IAIButton>
|
||||
<IAIButton onClick={handleReloadSchema}>Reload Schema</IAIButton>
|
||||
</HStack>
|
||||
</Panel>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user