File tree Expand file tree Collapse file tree 1 file changed +19
-8
lines changed
hub/gads-ui/src/components/Admin/Files Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -58,15 +58,25 @@ export default function UploadSeleniumJar() {
58
58
setAlertSeverity ( 'error' )
59
59
setAlertText ( 'Failed uploading Selenium jar file' )
60
60
setShowAlert ( true )
61
- } ) ;
61
+ } )
62
+ . finally ( ( ) => {
63
+ setTimeout ( ( ) => {
64
+ setShowAlert ( false )
65
+ } , 5000 )
66
+ } )
62
67
}
63
68
}
64
69
65
70
return (
66
71
< Box
67
72
id = 'upload-wrapper'
68
73
style = { {
69
- borderRadius : '10px'
74
+ borderRadius : '10px' ,
75
+ height : '280px' ,
76
+ display : 'flex' ,
77
+ flexDirection : 'column' ,
78
+ alignContent : 'center' ,
79
+ justifyContent : 'flex-start'
70
80
} }
71
81
>
72
82
< h3 > Upload Selenium jar</ h3 >
@@ -78,7 +88,7 @@ export default function UploadSeleniumJar() {
78
88
< Button
79
89
component = 'label'
80
90
variant = 'contained'
81
- startIcon = { < AttachFileIcon /> }
91
+ startIcon = { isUploading ? null : < AttachFileIcon /> }
82
92
style = { {
83
93
backgroundColor : "#2f3b26" ,
84
94
color : "#9ba984" ,
@@ -90,12 +100,13 @@ export default function UploadSeleniumJar() {
90
100
type = "file"
91
101
onChange = { ( event ) => handleUpload ( event ) }
92
102
/>
93
- Select and upload
103
+ { isUploading ? (
104
+ < CircularProgress size = { 25 } style = { { color : '#f4e6cd' } } />
105
+ ) : (
106
+ 'Select and upload'
107
+ ) }
94
108
</ Button >
95
- { isUploading &&
96
- < CircularProgress id = 'progress-indicator' size = { 30 } />
97
- }
98
- { showAlert && < Alert severity = { alertSeverity } > { alertText } </ Alert > }
109
+ { showAlert && < Alert size = 'small' severity = { alertSeverity } style = { { marginTop : '5px' , padding : '2px 4px' } } > { alertText } </ Alert > }
99
110
</ Box >
100
111
)
101
112
}
You can’t perform that action at this time.
0 commit comments