1
1
import {
2
2
Box ,
3
- CircularProgress ,
4
3
Fade ,
5
4
LinearProgress ,
6
5
Paper ,
7
6
Stack ,
8
- Typography ,
7
+ Typography
9
8
} from '@mui/material' ;
10
9
import { useEffect , useState } from 'react' ;
11
10
@@ -17,8 +16,7 @@ const LoadingState: React.FC<LoadingStateProps> = ({ appProps }) => {
17
16
const { configLoading, secretsLoading, catalogLoading, registryLoading } =
18
17
appProps ;
19
18
const [ progress , setProgress ] = useState ( 0 ) ;
20
- const isLoading =
21
- configLoading || secretsLoading || catalogLoading || registryLoading ;
19
+ const isLoading = configLoading || secretsLoading || catalogLoading || registryLoading ;
22
20
23
21
useEffect ( ( ) => {
24
22
const progress = [
@@ -54,78 +52,31 @@ const LoadingState: React.FC<LoadingStateProps> = ({ appProps }) => {
54
52
left : 0 ,
55
53
right : 0 ,
56
54
bottom : 0 ,
57
- backgroundColor : 'rgba(0, 0, 0, 0.6)' ,
58
55
display : 'flex' ,
59
56
alignItems : 'center' ,
60
57
justifyContent : 'center' ,
61
58
zIndex : 1200 ,
62
59
} }
63
60
>
64
- < Paper
65
- elevation = { 4 }
66
- sx = { {
67
- maxWidth : '500px' ,
68
- width : '90%' ,
69
- p : 3 ,
70
- borderRadius : 2 ,
71
- backgroundColor : 'background.paper' ,
72
- overflow : 'hidden' ,
73
- } }
74
- >
75
- < Stack spacing = { 2 } alignItems = "center" width = "100%" >
76
- < Typography variant = "h6" fontWeight = "medium" textAlign = "center" >
77
- { getLoadingText ( ) }
78
- </ Typography >
61
+ < Stack spacing = { 2 } alignItems = "center" width = "100%" >
62
+ < Typography variant = "h6" fontWeight = "medium" textAlign = "center" >
63
+ { getLoadingText ( ) }
64
+ </ Typography >
79
65
80
- < Box
81
- position = "relative"
82
- display = "flex"
83
- alignItems = "center"
84
- justifyContent = "center"
85
- my = { 1 }
86
- >
87
- < CircularProgress
88
- variant = "determinate"
89
- value = { 100 }
90
- size = { 80 }
91
- thickness = { 4 }
92
- sx = { { color : 'rgba(0, 0, 0, 0.1)' } }
93
- />
94
- < CircularProgress
95
- variant = "determinate"
96
- value = { progress }
97
- size = { 80 }
98
- thickness = { 4 }
99
- sx = { {
100
- color : 'primary.main' ,
101
- position : 'absolute' ,
102
- left : 0 ,
103
- } }
104
- />
105
- < Typography
106
- variant = "h6"
107
- component = "div"
108
- sx = { { position : 'absolute' } }
109
- >
110
- { progress } %
111
- </ Typography >
112
- </ Box >
113
-
114
- < LinearProgress
115
- sx = { {
116
- width : '100%' ,
117
- height : 8 ,
66
+ < LinearProgress
67
+ sx = { {
68
+ width : '60%' ,
69
+ height : 8 ,
70
+ borderRadius : 4 ,
71
+ '& .MuiLinearProgress-bar' : {
118
72
borderRadius : 4 ,
119
- '& .MuiLinearProgress-bar' : {
120
- borderRadius : 4 ,
121
- transition : 'transform 0.4s ease' ,
122
- } ,
123
- } }
124
- variant = "determinate"
125
- value = { progress }
126
- />
127
- </ Stack >
128
- </ Paper >
73
+ transition : 'transform 0.4s ease' ,
74
+ } ,
75
+ } }
76
+ variant = "determinate"
77
+ value = { progress }
78
+ />
79
+ </ Stack >
129
80
</ Box >
130
81
</ Fade >
131
82
) ;
0 commit comments