File tree 1 file changed +20
-1
lines changed
components/dashboard/src/settings
1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,20 @@ interface SelectIDEProps {
20
20
location : IDEChangedTrackLocation ;
21
21
}
22
22
23
+ const makeVersionHumanReadable = ( versionString ?: string ) => {
24
+ if ( ! versionString ) {
25
+ return undefined ;
26
+ }
27
+
28
+ let [ version , pre ] = versionString . split ( "-" ) ;
29
+ if ( pre ) {
30
+ // Capitalize the string, so that 1.74.0-insider becomes 1.74.0 Insider
31
+ pre = pre [ 0 ] . toUpperCase ( ) + pre . slice ( 1 ) ;
32
+ }
33
+
34
+ return [ version , pre ] . join ( " " ) . trim ( ) ;
35
+ } ;
36
+
23
37
export const updateUserIDEInfo = async (
24
38
user : User ,
25
39
selectedIde : string ,
@@ -92,7 +106,12 @@ export default function SelectIDE(props: SelectIDEProps) {
92
106
const selected = defaultIde === id ;
93
107
const version = useLatestVersion ? option . latestImageVersion : option . imageVersion ;
94
108
const onSelect = ( ) => actuallySetDefaultIde ( id ) ;
95
- return renderIdeOption ( option , selected , version , onSelect ) ;
109
+ return renderIdeOption (
110
+ option ,
111
+ selected ,
112
+ makeVersionHumanReadable ( version ) ,
113
+ onSelect ,
114
+ ) ;
96
115
} ) }
97
116
</ div >
98
117
{ ideOptions . options [ defaultIde ] ?. notes && (
You can’t perform that action at this time.
0 commit comments