@@ -75,12 +75,12 @@ export default function SelectIDE(props: SelectIDEProps) {
75
75
const [ ideOptions , setIdeOptions ] = useState < IDEOptions | undefined > ( undefined ) ;
76
76
useEffect ( ( ) => {
77
77
( async ( ) => {
78
- const ideopts = await getGitpodService ( ) . server . getIDEOptions ( ) ;
78
+ const ideOptions = await getGitpodService ( ) . server . getIDEOptions ( ) ;
79
79
// TODO: Compatible with ide-config not deployed, need revert after ide-config deployed
80
- delete ideopts . options [ "code-latest" ] ;
81
- delete ideopts . options [ "code-desktop-insiders" ] ;
80
+ delete ideOptions . options [ "code-latest" ] ;
81
+ delete ideOptions . options [ "code-desktop-insiders" ] ;
82
82
83
- setIdeOptions ( ideopts ) ;
83
+ setIdeOptions ( ideOptions ) ;
84
84
} ) ( ) ;
85
85
} , [ ] ) ;
86
86
@@ -95,8 +95,9 @@ export default function SelectIDE(props: SelectIDEProps) {
95
95
< div className = { `my-4 gap-3 flex flex-wrap max-w-3xl` } >
96
96
{ allIdeOptions . map ( ( [ id , option ] ) => {
97
97
const selected = defaultIde === id ;
98
+ const version = useLatestVersion ? option . latestImageVersion : option . imageVersion ;
98
99
const onSelect = ( ) => actuallySetDefaultIde ( id ) ;
99
- return renderIdeOption ( option , selected , onSelect ) ;
100
+ return renderIdeOption ( option , selected , version , onSelect ) ;
100
101
} ) }
101
102
</ div >
102
103
{ ideOptions . options [ defaultIde ] ?. notes && (
@@ -176,20 +177,45 @@ function orderedIdeOptions(ideOptions: IDEOptions) {
176
177
} ) ;
177
178
}
178
179
179
- function renderIdeOption ( option : IDEOption , selected : boolean , onSelect : ( ) => void ) : JSX . Element {
180
+ function renderIdeOption (
181
+ option : IDEOption ,
182
+ selected : boolean ,
183
+ version : IDEOption [ "imageVersion" ] ,
184
+ onSelect : ( ) => void ,
185
+ ) : JSX . Element {
180
186
const label = option . type === "desktop" ? "" : option . type ;
181
187
const card = (
182
- < SelectableCardSolid className = "w-36 h-40 " title = { option . title } selected = { selected } onClick = { onSelect } >
188
+ < SelectableCardSolid className = "w-36 h-44 " title = { option . title } selected = { selected } onClick = { onSelect } >
183
189
< div className = "flex justify-center mt-3" >
184
190
< img className = "w-16 filter-grayscale self-center" src = { option . logo } alt = "logo" />
185
191
</ div >
186
- { label ? (
192
+ < div
193
+ className = "mt-2 px-3 py-1 self-center"
194
+ style = { {
195
+ minHeight : "1.75rem" ,
196
+ } }
197
+ >
198
+ { label ? (
199
+ < span
200
+ className = { `font-semibold text-sm ${
201
+ selected ? "text-gray-100 dark:text-gray-600" : "text-gray-600 dark:text-gray-500"
202
+ } uppercase`}
203
+ >
204
+ { label }
205
+ </ span >
206
+ ) : (
207
+ < > </ >
208
+ ) }
209
+ </ div >
210
+
211
+ { version ? (
187
212
< div
188
- className = { `font-semibold text-sm ${
213
+ className = { `font-semibold text-xs ${
189
214
selected ? "text-gray-100 dark:text-gray-600" : "text-gray-600 dark:text-gray-500"
190
- } uppercase mt-2 px-3 py-1 self-center`}
215
+ } uppercase px-3 self-center`}
216
+ title = "The IDE's current version on Gitpod"
191
217
>
192
- { label }
218
+ { version }
193
219
</ div >
194
220
) : (
195
221
< > </ >
0 commit comments