1
1
import { makeStyles } from "@material-ui/core/styles"
2
2
import { AppPreviewLink } from "components/AppLink/AppPreviewLink"
3
3
import { FC } from "react"
4
+ import { combineClasses } from "util/combineClasses"
4
5
import { WorkspaceAgent } from "../../api/typesGenerated"
5
6
import { Stack } from "../Stack/Stack"
6
7
@@ -23,22 +24,43 @@ export const AgentRowPreview: FC<AgentRowPreviewProps> = ({ agent }) => {
23
24
< div className = { styles . agentStatusWrapper } >
24
25
< div className = { styles . agentStatusPreview } > </ div >
25
26
</ div >
26
- < Stack alignItems = "baseline" direction = "row" >
27
- < div className = { styles . agentName } > { agent . name } </ div >
28
- < span className = { styles . agentOS } > { agent . operating_system } </ span >
29
- </ Stack >
30
- </ Stack >
27
+ < Stack
28
+ alignItems = "baseline"
29
+ direction = "row"
30
+ spacing = { 4 }
31
+ className = { styles . agentData }
32
+ >
33
+ < Stack direction = "row" alignItems = "baseline" spacing = { 1 } >
34
+ < span > Agent:</ span >
35
+ < span className = { styles . agentDataValue } > { agent . name } </ span >
36
+ </ Stack >
31
37
32
- < Stack
33
- direction = "row"
34
- alignItems = "center"
35
- spacing = { 0.5 }
36
- wrap = "wrap"
37
- className = { styles . appsColumn }
38
- >
39
- { agent . apps . map ( ( app ) => (
40
- < AppPreviewLink key = { app . name } app = { app } />
41
- ) ) }
38
+ < Stack direction = "row" alignItems = "baseline" spacing = { 1 } >
39
+ < span > OS:</ span >
40
+ < span
41
+ className = { combineClasses ( [
42
+ styles . agentDataValue ,
43
+ styles . agentOS ,
44
+ ] ) }
45
+ >
46
+ { agent . operating_system }
47
+ </ span >
48
+ </ Stack >
49
+
50
+ < Stack direction = "row" alignItems = "baseline" spacing = { 1 } >
51
+ < span > Apps:</ span >
52
+ < Stack
53
+ direction = "row"
54
+ alignItems = "center"
55
+ spacing = { 0.5 }
56
+ wrap = "wrap"
57
+ >
58
+ { agent . apps . map ( ( app ) => (
59
+ < AppPreviewLink key = { app . name } app = { app } />
60
+ ) ) }
61
+ </ Stack >
62
+ </ Stack >
63
+ </ Stack >
42
64
</ Stack >
43
65
</ Stack >
44
66
)
@@ -92,7 +114,12 @@ const useStyles = makeStyles((theme) => ({
92
114
color : theme . palette . text . secondary ,
93
115
} ,
94
116
95
- appsColumn : {
96
- minWidth : "50%" ,
117
+ agentData : {
118
+ fontSize : 14 ,
119
+ color : theme . palette . text . secondary ,
120
+ } ,
121
+
122
+ agentDataValue : {
123
+ color : theme . palette . text . primary ,
97
124
} ,
98
125
} ) )
0 commit comments