@@ -4,17 +4,26 @@ import { supported, create, get, parseCreationOptionsFromJSON, parseRequestOptio
4
4
import { useEffect , useState } from 'react' ;
5
5
import objectPath from 'object-path' ;
6
6
7
+ import Avatar from '@mui/material/Avatar' ;
7
8
import Box from '@mui/material/Box' ;
8
9
import Button from '@mui/material/Button' ;
9
10
import CircularProgress from '@mui/material/CircularProgress' ;
11
+ import DeleteIcon from '@mui/icons-material/Delete' ;
12
+ import EditIcon from '@mui/icons-material/Edit' ;
10
13
import Grid from "@mui/material/Grid" ;
11
14
import HowToRegIcon from '@mui/icons-material/HowToReg' ;
12
15
import KeyIcon from '@mui/icons-material/Key' ;
13
16
import Link from '@mui/material/Link' ;
17
+ import List from '@mui/material/List' ;
18
+ import ListItem from '@mui/material/ListItem' ;
19
+ import ListItemAvatar from '@mui/material/ListItemAvatar' ;
20
+ import ListItemText from '@mui/material/ListItemText' ;
14
21
import PersonIcon from '@mui/icons-material/Person' ;
15
22
import ReplayIcon from '@mui/icons-material/Replay' ;
16
23
import Stack from '@mui/material/Stack' ;
17
24
import TextField from '@mui/material/TextField' ;
25
+ import Typography from '@mui/material/Typography' ;
26
+ import VisibilityIcon from '@mui/icons-material/Visibility' ;
18
27
19
28
export default function Login ( { challenge, clinical= false , authonly= false , client= '' , setEmail, locations= [ ] } : { challenge : string , clinical : boolean , authonly : boolean , client ?: string , setEmail ?: any , locations ?: any } ) {
20
29
const router = useRouter ( ) ;
@@ -237,20 +246,44 @@ export default function Login({ challenge, clinical=false, authonly=false, clien
237
246
< div >
238
247
{ clientExist ? (
239
248
< div >
240
- < p > Sign Into { client } </ p >
241
- < p > To access the following resource URLs :</ p >
242
- < ul >
249
+ < Typography variant = "h6" component = "div" > Sign In To { client } </ Typography >
250
+ < Typography variant = "body1" component = "div" > For access to the following resources :</ Typography >
251
+ < List >
243
252
{
244
253
locations . map ( ( value : any , index :number ) => {
245
- return < li key = { index } >
246
- { value . locations . join ( ', ' ) } [{ value . actions . join ( ', ' ) } ], Purpose: { value . purpose }
247
- </ li >
254
+ return < ListItem key = { index } >
255
+ {
256
+ value . actions . map ( ( value0 : string , index0 : number ) => {
257
+ {
258
+ if ( value0 === 'read' ) {
259
+ return < ListItemAvatar > < Avatar > < VisibilityIcon /> </ Avatar > </ ListItemAvatar >
260
+ }
261
+ if ( value0 === 'write' ) {
262
+ return < ListItemAvatar > < Avatar > < EditIcon /> </ Avatar > </ ListItemAvatar >
263
+ }
264
+ if ( value0 === 'delete' ) {
265
+ return < ListItemAvatar > < Avatar > < DeleteIcon /> </ Avatar > </ ListItemAvatar >
266
+ }
267
+ }
268
+ } )
269
+ }
270
+ < ListItemText >
271
+ < Typography variant = "body2" component = "div" > Purpose: { value . purpose } </ Typography >
272
+ {
273
+ value . locations . map ( ( value1 : string , index1 : number ) => {
274
+ {
275
+ return < Typography variant = "caption" component = "div" > { value1 } </ Typography >
276
+ }
277
+ } )
278
+ }
279
+ </ ListItemText >
280
+ </ ListItem >
248
281
} )
249
282
}
250
- </ ul >
283
+ </ List >
251
284
</ div >
252
285
) : (
253
- < p > Sign In</ p >
286
+ < Typography variant = "h6" component = "div" > Sign In</ Typography >
254
287
) }
255
288
</ div >
256
289
) : (
0 commit comments