2
2
Launcher buttons shown for a running compute server.
3
3
*/
4
4
5
- import { Button , Modal , Spin } from "antd" ;
5
+ import { Button , Modal , Spin , Tooltip } from "antd" ;
6
6
import { Icon } from "@cocalc/frontend/components" ;
7
7
import { useImages } from "@cocalc/frontend/compute/images-hook" ;
8
8
import { useMemo , useState } from "react" ;
@@ -48,29 +48,46 @@ export default function Launcher({
48
48
</Button>*/ }
49
49
50
50
{ apps [ "jupyterlab" ] != null && (
51
- < Button
52
- onClick = { ( ) => setAppName ( "jupyterlab" ) }
53
- type = "text"
54
- size = "small"
55
- style = { { color : "#666" } }
56
- >
57
- < Icon
58
- name = { apps [ "jupyterlab" ] . icon }
59
- style = { { marginRight : "-5px" } }
60
- />
61
- JupyterLab
62
- </ Button >
51
+ < Tooltip title = { apps [ "jupyterlab" ] . tip } placement = "left" >
52
+ < Button
53
+ onClick = { ( ) => setAppName ( "jupyterlab" ) }
54
+ type = "text"
55
+ size = "small"
56
+ style = { { color : "#666" } }
57
+ >
58
+ < Icon
59
+ name = { apps [ "jupyterlab" ] . icon }
60
+ style = { { marginRight : "-5px" } }
61
+ />
62
+ JupyterLab
63
+ </ Button >
64
+ </ Tooltip >
63
65
) }
64
66
{ apps [ "vscode" ] != null && (
65
- < Button
66
- onClick = { ( ) => setAppName ( "vscode" ) }
67
- type = "text"
68
- size = "small"
69
- style = { { color : "#666" } }
70
- >
71
- < Icon name = { apps [ "vscode" ] . icon } style = { { marginRight : "-5px" } } />
72
- VS Code
73
- </ Button >
67
+ < Tooltip title = { apps [ "vscode" ] . tip } placement = "left" >
68
+ < Button
69
+ onClick = { ( ) => setAppName ( "vscode" ) }
70
+ type = "text"
71
+ size = "small"
72
+ style = { { color : "#666" } }
73
+ >
74
+ < Icon name = { apps [ "vscode" ] . icon } style = { { marginRight : "-5px" } } />
75
+ VS Code
76
+ </ Button >
77
+ </ Tooltip >
78
+ ) }
79
+ { apps [ "xpra" ] != null && (
80
+ < Tooltip title = { apps [ "xpra" ] . tip } placement = "left" >
81
+ < Button
82
+ onClick = { ( ) => setAppName ( "xpra" ) }
83
+ type = "text"
84
+ size = "small"
85
+ style = { { color : "#666" } }
86
+ >
87
+ < Icon name = { apps [ "xpra" ] . icon } style = { { marginRight : "-5px" } } />
88
+ Desktop
89
+ </ Button >
90
+ </ Tooltip >
74
91
) }
75
92
</ div >
76
93
) ;
@@ -151,7 +168,7 @@ export function AppLauncherModal({
151
168
return < Spin /> ;
152
169
}
153
170
const image = server . configuration ?. image ?? "defaults" ;
154
- const apps = IMAGES [ image ] ?. apps ?? IMAGES [ "defaults" ] ?. apps ?? { } ;
171
+ const apps = getApps ( image ) ;
155
172
156
173
return (
157
174
< Modal
@@ -169,6 +186,7 @@ export function AppLauncherModal({
169
186
onCancel = { close }
170
187
destroyOnClose
171
188
>
189
+ { apps [ name ] ?. tip }
172
190
< AppLauncher
173
191
name = { name }
174
192
configuration = { server . configuration }
0 commit comments