mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
hook up Add Model button
This commit is contained in:
parent
f1e21bc9a9
commit
da6c4bf493
@ -3,8 +3,16 @@ import { SyncModelsIconButton } from 'features/modelManager/components/SyncModel
|
|||||||
|
|
||||||
import ModelList from './ModelManagerPanel/ModelList';
|
import ModelList from './ModelManagerPanel/ModelList';
|
||||||
import { ModelListNavigation } from './ModelManagerPanel/ModelListNavigation';
|
import { ModelListNavigation } from './ModelManagerPanel/ModelListNavigation';
|
||||||
|
import { useCallback } from 'react';
|
||||||
|
import { useAppDispatch } from '../../../app/store/storeHooks';
|
||||||
|
import { setSelectedModelKey } from '../store/modelManagerV2Slice';
|
||||||
|
|
||||||
export const ModelManager = () => {
|
export const ModelManager = () => {
|
||||||
|
const dispatch = useAppDispatch();
|
||||||
|
const handleClickAddModel = useCallback(() => {
|
||||||
|
dispatch(setSelectedModelKey(null));
|
||||||
|
}, [dispatch]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box layerStyle="first" p={3} borderRadius="base" w="full" h="full">
|
<Box layerStyle="first" p={3} borderRadius="base" w="full" h="full">
|
||||||
<Flex w="full" p={3} justifyContent="space-between" alignItems="center">
|
<Flex w="full" p={3} justifyContent="space-between" alignItems="center">
|
||||||
@ -13,7 +21,9 @@ export const ModelManager = () => {
|
|||||||
<SyncModelsIconButton />
|
<SyncModelsIconButton />
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex gap={2}>
|
<Flex gap={2}>
|
||||||
<Button colorScheme="invokeYellow">Add Model</Button>
|
<Button colorScheme="invokeYellow" onClick={handleClickAddModel}>
|
||||||
|
Add Model
|
||||||
|
</Button>
|
||||||
<Button>Scan for Models</Button>
|
<Button>Scan for Models</Button>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
Loading…
Reference in New Issue
Block a user