File tree 3 files changed +24
-8
lines changed
3 files changed +24
-8
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ const useStyles = makeStyles((theme: Theme) => ({
69
69
margin : 0 ,
70
70
// Set a fixed width for the select. It avoids selects having different sizes
71
71
// depending on how many roles they have selected.
72
- width : theme . spacing ( 25 ) ,
72
+ width : theme . spacing ( 32 ) ,
73
73
"& .MuiSelect-root" : {
74
74
// Adjusting padding because it does not have label
75
75
paddingTop : theme . spacing ( 1.5 ) ,
Original file line number Diff line number Diff line change @@ -54,10 +54,10 @@ export const UsersTable: FC<React.PropsWithChildren<UsersTableProps>> = ({
54
54
< Table >
55
55
< TableHead >
56
56
< TableRow >
57
- < TableCell width = "50 %" > { Language . usernameLabel } </ TableCell >
58
- < TableCell width = "25 %" > { Language . statusLabel } </ TableCell >
59
- < TableCell width = "50 %" > { Language . lastSeenLabel } </ TableCell >
60
- < TableCell width = "25 %" >
57
+ < TableCell width = "35 %" > { Language . usernameLabel } </ TableCell >
58
+ < TableCell width = "15 %" > { Language . statusLabel } </ TableCell >
59
+ < TableCell width = "15 %" > { Language . lastSeenLabel } </ TableCell >
60
+ < TableCell width = "35 %" >
61
61
< Stack direction = "row" spacing = { 1 } alignItems = "center" >
62
62
< span > { Language . rolesLabel } </ span >
63
63
< UserRoleHelpTooltip />
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import TableCell from "@material-ui/core/TableCell"
4
4
import TableRow from "@material-ui/core/TableRow"
5
5
import { ChooseOne , Cond } from "components/Conditionals/ChooseOne"
6
6
import { LastUsed } from "components/LastUsed/LastUsed"
7
+ import { Pill } from "components/Pill/Pill"
7
8
import { FC } from "react"
8
9
import { useTranslation } from "react-i18next"
9
10
import * as TypesGen from "../../api/typesGenerated"
@@ -136,9 +137,15 @@ export const UsersTableBody: FC<
136
137
} }
137
138
/>
138
139
) : (
139
- < >
140
- { userRoles . map ( ( role ) => role . display_name ) . join ( ", " ) }
141
- </ >
140
+ < div className = { styles . roles } >
141
+ { userRoles . map ( ( role ) => (
142
+ < Pill
143
+ key = { role . name }
144
+ text = { role . display_name }
145
+ className = { styles . rolePill }
146
+ />
147
+ ) ) }
148
+ </ div >
142
149
) }
143
150
</ TableCell >
144
151
{ canEditUsers && (
@@ -199,4 +206,13 @@ const useStyles = makeStyles((theme) => ({
199
206
height : theme . spacing ( 4.5 ) ,
200
207
borderRadius : "100%" ,
201
208
} ,
209
+ roles : {
210
+ display : "flex" ,
211
+ gap : theme . spacing ( 1 ) ,
212
+ flexWrap : "wrap" ,
213
+ } ,
214
+ rolePill : {
215
+ backgroundColor : theme . palette . background . paperLight ,
216
+ borderColor : theme . palette . divider ,
217
+ } ,
202
218
} ) )
You can’t perform that action at this time.
0 commit comments