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