|
1 |
| -import { Button, Checkbox, Flex, FormControl, FormLabel, Input, Tooltip } from '@invoke-ai/ui-library'; |
| 1 | +import { Button, Checkbox, Flex, FormControl, FormHelperText, FormLabel, Input } from '@invoke-ai/ui-library'; |
2 | 2 | import { useAppDispatch } from 'app/store/storeHooks';
|
3 | 3 | import { addToast } from 'features/system/store/systemSlice';
|
4 | 4 | import { makeToast } from 'features/system/util/makeToast';
|
@@ -64,28 +64,36 @@ export const InstallModelForm = () => {
|
64 | 64 |
|
65 | 65 | return (
|
66 | 66 | <form onSubmit={handleSubmit(onSubmit)}>
|
67 |
| - <Flex gap={2} alignItems="flex-end" justifyContent="space-between"> |
68 |
| - <FormControl> |
69 |
| - <Flex direction="column" w="full"> |
| 67 | + <Flex flexDir="column" gap={4}> |
| 68 | + <Flex gap={2} alignItems="flex-end" justifyContent="space-between"> |
| 69 | + <FormControl orientation="vertical"> |
70 | 70 | <FormLabel>{t('modelManager.modelLocation')}</FormLabel>
|
71 | 71 | <Input {...register('location')} />
|
| 72 | + </FormControl> |
| 73 | + <Button |
| 74 | + onClick={handleSubmit(onSubmit)} |
| 75 | + isDisabled={!formState.isDirty} |
| 76 | + isLoading={isLoading} |
| 77 | + type="submit" |
| 78 | + size="sm" |
| 79 | + mb={1} |
| 80 | + > |
| 81 | + {t('modelManager.addModel')} |
| 82 | + </Button> |
| 83 | + </Flex> |
| 84 | + |
| 85 | + <FormControl> |
| 86 | + <Flex flexDir="column" gap={2}> |
| 87 | + <Flex gap={4}> |
| 88 | + <Checkbox {...register('inplace')} /> |
| 89 | + <FormLabel> |
| 90 | + {t('modelManager.inplaceInstall')} ({t('modelManager.localOnly')}) |
| 91 | + </FormLabel> |
| 92 | + </Flex> |
| 93 | + <FormHelperText>{t('modelManager.inplaceInstallDesc')}</FormHelperText> |
72 | 94 | </Flex>
|
73 | 95 | </FormControl>
|
74 |
| - <Button onClick={handleSubmit(onSubmit)} isDisabled={!formState.isDirty} isLoading={isLoading} type="submit"> |
75 |
| - {t('modelManager.addModel')} |
76 |
| - </Button> |
77 | 96 | </Flex>
|
78 |
| - |
79 |
| - <FormControl flexDir="column" gap="1" alignItems="flex-start" mt={3}> |
80 |
| - <Tooltip label={t('modelManager.inplaceInstallTooltip')}> |
81 |
| - <Flex gap={3}> |
82 |
| - <Checkbox {...register('inplace')} /> |
83 |
| - <FormLabel> |
84 |
| - {t('modelManager.inplaceInstall')} ({t('modelManager.localOnly')}) |
85 |
| - </FormLabel> |
86 |
| - </Flex> |
87 |
| - </Tooltip> |
88 |
| - </FormControl> |
89 | 97 | </form>
|
90 | 98 | );
|
91 | 99 | };
|
0 commit comments