@@ -12,9 +12,11 @@ import LaunchIcon from "@mui/icons-material/LaunchOutlined";
12
12
import DocsIcon from "@mui/icons-material/MenuBook" ;
13
13
import Divider from "@mui/material/Divider" ;
14
14
import MenuItem from "@mui/material/MenuItem" ;
15
+ import Tooltip from "@mui/material/Tooltip" ;
15
16
import type { FC } from "react" ;
16
17
import { Link } from "react-router-dom" ;
17
18
import type * as TypesGen from "api/typesGenerated" ;
19
+ import { CopyButton } from "components/CopyButton/CopyButton" ;
18
20
import { ExternalImage } from "components/ExternalImage/ExternalImage" ;
19
21
import { usePopover } from "components/Popover/Popover" ;
20
22
import { Stack } from "components/Stack/Stack" ;
@@ -161,15 +163,51 @@ export const UserDropdownContent: FC<UserDropdownContentProps> = ({
161
163
< Divider css = { { marginBottom : "0 !important" } } />
162
164
163
165
< Stack css = { styles . info } spacing = { 0 } >
164
- < a
165
- title = "Browse Source Code"
166
- css = { [ styles . footerText , styles . buildInfo ] }
167
- href = { buildInfo ?. external_url }
168
- target = "_blank"
169
- rel = "noreferrer"
170
- >
171
- { buildInfo ?. version } < LaunchIcon />
172
- </ a >
166
+ < Tooltip title = "Coder Version" >
167
+ < a
168
+ title = "Browse Source Code"
169
+ css = { [ styles . footerText , styles . buildInfo ] }
170
+ href = { buildInfo ?. external_url }
171
+ target = "_blank"
172
+ rel = "noreferrer"
173
+ >
174
+ { buildInfo ?. version } < LaunchIcon />
175
+ </ a >
176
+ </ Tooltip >
177
+
178
+ { Boolean ( buildInfo ?. deployment_id ) && (
179
+ < div
180
+ css = { css `
181
+ font-size : 12px ;
182
+ display : flex;
183
+ align-items : center;
184
+ ` }
185
+ >
186
+ < Tooltip title = "Deployment Identifier" >
187
+ < div
188
+ css = { css `
189
+ white-space : nowrap;
190
+ overflow : hidden;
191
+ text-overflow : ellipsis;
192
+ ` }
193
+ >
194
+ { buildInfo ?. deployment_id }
195
+ </ div >
196
+ </ Tooltip >
197
+ < CopyButton
198
+ text = { buildInfo ! . deployment_id }
199
+ buttonStyles = { css `
200
+ width : 16px ;
201
+ height : 16px ;
202
+
203
+ svg {
204
+ width : 16px ;
205
+ height : 16px ;
206
+ }
207
+ ` }
208
+ />
209
+ </ div >
210
+ ) }
173
211
174
212
< div css = { styles . footerText } > { Language . copyrightText } </ div >
175
213
</ Stack >
0 commit comments