1
1
import React from 'react' ;
2
- import { Alert , List , ListItem , ListItemText , Stack , Typography } from '@mui/material' ;
2
+ import { Alert , Box , Card , CardContent , CardHeader , Grid2 , List , ListItem , ListItemText , Stack , Typography } from '@mui/material' ;
3
3
import Secrets from '../../Secrets' ;
4
4
import { DD_BUILD_WITH_SECRET_SUPPORT , getUnsupportedSecretMessage } from '../../Constants' ;
5
5
@@ -18,25 +18,39 @@ const YourEnvironment: React.FC<YourEnvironmentProps> = ({ secrets, ddVersion, c
18
18
19
19
return (
20
20
< Stack direction = "column" spacing = { 2 } >
21
- < List subheader = {
22
- < Stack direction = "column" spacing = { 2 } alignItems = "center" >
23
- < Alert title = "Docker Secret Management" severity = "info" sx = { { fontSize : '1.2rem' , maxWidth : 600 } } >
24
- Docker Secret Management is a new feature in Docker Desktop that allows you to securely inject secrets into your containers.
25
- </ Alert >
26
- < Typography variant = "h2" >
27
- The following secrets are available to use in your prompts:
28
- </ Typography >
29
- </ Stack >
30
- } >
31
- { secrets . map ( ( secret ) => (
32
- < ListItem key = { secret . name } >
33
- < ListItemText primary = { < Typography variant = "h6" > { secret . name } </ Typography > } />
34
- </ ListItem >
21
+
22
+ < Stack direction = "column" spacing = { 2 } >
23
+
24
+ < Typography variant = "h3" >
25
+ The following secrets are available to use in your prompts:
26
+ </ Typography >
27
+ < Alert title = "Docker Secret Management" severity = "info" sx = { { width : '90vw' , maxWidth : 1000 , p : 1 } } >
28
+ Docker Secret Management is a new feature in Docker Desktop that allows you to securely inject secrets into your containers. Only the tools which need to access the secrets will be able to access them.
29
+ </ Alert >
30
+ </ Stack >
31
+ < Grid2 container spacing = { 1 } >
32
+ { secrets . sort ( ( a , b ) => a . name . localeCompare ( b . name ) ) . map ( ( secret ) => (
33
+ < Grid2 key = { secret . name } size = { { xs : 12 , sm : 6 , md : 4 , lg : 3 } } >
34
+ < Card raised sx = { { py : 0 , px : 2 } } >
35
+ < pre > { secret . name } </ pre >
36
+ </ Card >
37
+ </ Grid2 >
38
+ ) ) }
39
+ </ Grid2 >
40
+ < Typography variant = "h3" > The following configurations are available to use in your prompts:</ Typography >
41
+ < Grid2 container spacing = { 1 } >
42
+ { Object . keys ( config ) . sort ( ) . map ( ( key ) => (
43
+ < Grid2 key = { key } size = { { xs : 12 , sm : 6 , md : 4 , lg : 3 } } >
44
+ < Card raised sx = { { py : 1 , px : 2 } } >
45
+ < Typography variant = "h6" > { key } </ Typography >
46
+ < Box sx = { { overflow : 'auto' , maxHeight : 200 , backgroundColor : 'background.secondary' , borderRadius : 2 , p : 1 , mt : 1 } } >
47
+ < pre style = { { margin : 0 } } > { JSON . stringify ( config [ key ] , null , 2 ) } </ pre >
48
+ </ Box >
49
+ </ Card >
50
+ </ Grid2 >
35
51
) ) }
36
- </ List >
37
- < Typography variant = "h2" > The following configurations are available to use in your prompts:</ Typography >
38
- < pre > { JSON . stringify ( config , null , 2 ) } </ pre >
39
- </ Stack >
52
+ </ Grid2 >
53
+ </ Stack >
40
54
) ;
41
55
} ;
42
56
0 commit comments