1
- import { Button , Flex , Grid , Heading , Icon , Text } from '@invoke-ai/ui-library' ;
1
+ import { Button , Flex , Grid , Heading , Text } from '@invoke-ai/ui-library' ;
2
2
import ScrollableContent from 'common/components/OverlayScrollbars/ScrollableContent' ;
3
3
import { map } from 'es-toolkit/compat' ;
4
4
import { setInstallModelsTabByName } from 'features/modelManagerV2/store/installModelsStore' ;
@@ -10,6 +10,8 @@ import { PiFolderOpenBold, PiLinkBold, PiStarBold } from 'react-icons/pi';
10
10
import { SiHuggingface } from 'react-icons/si' ;
11
11
import { useGetStarterModelsQuery } from 'services/api/endpoints/models' ;
12
12
13
+ import { LaunchpadButton } from './LaunchpadButton' ;
14
+
13
15
export const LaunchpadForm = memo ( ( ) => {
14
16
const { t } = useTranslation ( ) ;
15
17
const { data : starterModelsData } = useGetStarterModelsQuery ( ) ;
@@ -43,77 +45,24 @@ export const LaunchpadForm = memo(() => {
43
45
< Flex flexDir = "column" gap = { 2 } alignItems = "flex-start" >
44
46
< Heading size = "sm" > { t ( 'modelManager.launchpad.manualInstall' ) } </ Heading >
45
47
< Grid templateColumns = "repeat(auto-fit, minmax(280px, 1fr))" gap = { 3 } w = "full" >
46
- < Button
48
+ < LaunchpadButton
47
49
onClick = { navigateToUrlTab }
48
- variant = "outline"
49
- p = { 4 }
50
- textAlign = "left"
51
- flexDir = "column"
52
- gap = { 2 }
53
- h = "unset"
54
- >
55
- < Flex alignItems = "center" gap = { 4 } w = "full" >
56
- < Icon as = { PiLinkBold } boxSize = { 8 } color = "base.300" />
57
- < Heading size = "sm" color = "base.100" >
58
- { t ( 'modelManager.urlOrLocalPath' ) }
59
- </ Heading >
60
- </ Flex >
61
- < Text lineHeight = "1.4" flex = "1" whiteSpace = "normal" wordBreak = "break-word" >
62
- { t ( 'modelManager.launchpad.urlDescription' ) }
63
- </ Text >
64
- </ Button >
65
- < Button
50
+ icon = { PiLinkBold }
51
+ title = { t ( 'modelManager.urlOrLocalPath' ) }
52
+ description = { t ( 'modelManager.launchpad.urlDescription' ) }
53
+ />
54
+ < LaunchpadButton
66
55
onClick = { navigateToHuggingFaceTab }
67
- variant = "outline"
68
- p = { 4 }
69
- textAlign = "left"
70
- flexDir = "column"
71
- gap = { 2 }
72
- h = "unset"
73
- >
74
- < Flex alignItems = "center" gap = { 4 } w = "full" >
75
- < Icon as = { SiHuggingface } boxSize = { 8 } color = "base.300" />
76
- < Heading size = "sm" color = "base.100" >
77
- { t ( 'modelManager.huggingFace' ) }
78
- </ Heading >
79
- </ Flex >
80
- < Text
81
- fontSize = "sm"
82
- color = "base.400"
83
- lineHeight = "1.4"
84
- flex = "1"
85
- whiteSpace = "normal"
86
- wordBreak = "break-word"
87
- >
88
- { t ( 'modelManager.launchpad.huggingFaceDescription' ) }
89
- </ Text >
90
- </ Button >
91
- < Button
56
+ icon = { SiHuggingface }
57
+ title = { t ( 'modelManager.huggingFace' ) }
58
+ description = { t ( 'modelManager.launchpad.huggingFaceDescription' ) }
59
+ />
60
+ < LaunchpadButton
92
61
onClick = { navigateToScanFolderTab }
93
- variant = "outline"
94
- p = { 4 }
95
- textAlign = "left"
96
- flexDir = "column"
97
- gap = { 2 }
98
- h = "unset"
99
- >
100
- < Flex alignItems = "center" gap = { 4 } w = "full" >
101
- < Icon as = { PiFolderOpenBold } boxSize = { 8 } color = "base.300" />
102
- < Heading size = "sm" color = "base.100" >
103
- { t ( 'modelManager.scanFolder' ) }
104
- </ Heading >
105
- </ Flex >
106
- < Text
107
- fontSize = "sm"
108
- color = "base.400"
109
- lineHeight = "1.4"
110
- flex = "1"
111
- whiteSpace = "normal"
112
- wordBreak = "break-word"
113
- >
114
- { t ( 'modelManager.launchpad.scanFolderDescription' ) }
115
- </ Text >
116
- </ Button >
62
+ icon = { PiFolderOpenBold }
63
+ title = { t ( 'modelManager.scanFolder' ) }
64
+ description = { t ( 'modelManager.launchpad.scanFolderDescription' ) }
65
+ />
117
66
</ Grid >
118
67
</ Flex >
119
68
{ /* Recommended Section */ }
0 commit comments