@@ -19,6 +19,7 @@ import { connect } from "react-redux";
19
19
import { OutlinedInputProps } from "@mui/material/OutlinedInput" ;
20
20
import {
21
21
CircularProgress ,
22
+ InputAdornment ,
22
23
LinearProgress ,
23
24
Paper ,
24
25
TextFieldProps ,
@@ -40,31 +41,10 @@ import history from "../../history";
40
41
import RefreshIcon from "../../icons/RefreshIcon" ;
41
42
import MainError from "../Console/Common/MainError/MainError" ;
42
43
import { encodeFileName } from "../../common/utils" ;
44
+ import { LockIcon , UsersIcon , VersionIcon } from "../../icons" ;
43
45
44
46
const styles = ( theme : Theme ) =>
45
47
createStyles ( {
46
- "@global" : {
47
- body : {
48
- backgroundColor : "#FAFAFA" ,
49
- } ,
50
- } ,
51
- paper : {
52
- borderRadius : 8 ,
53
- display : "flex" ,
54
- flexDirection : "column" ,
55
- alignItems : "center" ,
56
- width : 800 ,
57
- height : 424 ,
58
- margin : "auto" ,
59
- position : "absolute" ,
60
- top : "50%" ,
61
- left : "50%" ,
62
- marginLeft : - 400 ,
63
- marginTop : - 212 ,
64
- "&.MuiPaper-root" : {
65
- borderRadius : 8 ,
66
- } ,
67
- } ,
68
48
avatar : {
69
49
margin : theme . spacing ( 1 ) ,
70
50
backgroundColor : theme . palette . secondary . main ,
@@ -86,42 +66,117 @@ const styles = (theme: Theme) =>
86
66
justifyContent : "center" ,
87
67
alignItems : "center" ,
88
68
position : "absolute" ,
69
+ zIndex : 9 ,
89
70
left : "50%" ,
90
71
top : "50%" ,
91
- marginLeft : - 400 ,
92
- marginTop : - 290 ,
72
+
93
73
color : "#fff" ,
94
74
fontWeight : 700 ,
95
75
fontSize : 14 ,
96
76
borderRadius : 8 ,
97
77
padding : 10 ,
98
78
boxSizing : "border-box" ,
99
79
} ,
100
- mainContainer : {
80
+ loginPage : {
81
+ height : "100%" ,
82
+ display : "flex" ,
83
+ flexFlow : "column" ,
84
+ alignItems : "stretch" ,
101
85
position : "relative" ,
102
- height : 424 ,
86
+ padding : 84 ,
87
+
88
+ "@media (max-width: 900px)" : {
89
+ padding : 0 ,
90
+ } ,
103
91
} ,
104
- theOcean : {
105
- borderTopLeftRadius : 8 ,
106
- borderBottomLeftRadius : 8 ,
107
- background :
108
- "transparent linear-gradient(to bottom, #073052 0%,#05122b 100%); 0% 0% no-repeat padding-box;" ,
92
+ shadowBox : {
93
+ boxShadow : "0px 3px 10px #00000014" ,
94
+ height : "100%" ,
109
95
} ,
110
- oceanBg : {
111
- backgroundImage : "url(/images/BG_Illustration.svg)" ,
112
- backgroundRepeat : "no-repeat" ,
113
- backgroundPosition : "bottom left" ,
96
+ loginContainer : {
97
+ flex : 1 ,
114
98
height : "100%" ,
115
- width : 324 ,
99
+
100
+ "& .right-items" : {
101
+ padding : 50 ,
102
+ flex : 1 ,
103
+ height : "100%" ,
104
+ display : "flex" ,
105
+ flexFlow : "column" ,
106
+ alignItems : "center" ,
107
+ justifyContent : "center" ,
108
+ maxWidth : "33%" ,
109
+
110
+ "@media (max-width: 900px)" : {
111
+ maxWidth : "100%" ,
112
+ margin : "auto" ,
113
+ } ,
114
+ } ,
115
+ "& .consoleTextBanner" : {
116
+ fontWeight : 300 ,
117
+ fontSize : "calc(3vw + 3vh + 1.5vmin)" ,
118
+ lineHeight : 1.15 ,
119
+ color : "#ffffff" ,
120
+ flex : 1 ,
121
+ textAlign : "center" ,
122
+ height : "100%" ,
123
+ display : "flex" ,
124
+ justifyContent : "flex-start" ,
125
+ margin : "auto" ,
126
+ flexFlow : "column" ,
127
+ background : "linear-gradient(120deg,#081c42,#073052)" ,
128
+
129
+ "& .logoLine" : {
130
+ display : "flex" ,
131
+ alignItems : "center" ,
132
+ fontSize : 18 ,
133
+ marginTop : 40 ,
134
+ } ,
135
+ "& .left-items" : {
136
+ margin : "auto" ,
137
+ textAlign : "left" ,
138
+ } ,
139
+ } ,
116
140
} ,
117
- theLogin : {
118
- padding : "40px 45px 20px 45px" ,
141
+ "@media (max-width: 900px)" : {
142
+ loginContainer : {
143
+ display : "flex" ,
144
+ flexFlow : "column" ,
145
+
146
+ "& .consoleTextBanner" : {
147
+ margin : 0 ,
148
+ flex : 2 ,
149
+
150
+ "& .left-items" : {
151
+ alignItems : "center" ,
152
+ textAlign : "center" ,
153
+ } ,
154
+
155
+ "& .logoLine" : {
156
+ justifyContent : "center" ,
157
+ } ,
158
+ } ,
159
+ } ,
160
+ } ,
161
+ inputField : {
162
+ "& input" : {
163
+ padding : 5 ,
164
+ "&::placeholder" : {
165
+ fontSize : 12 ,
166
+ } ,
167
+ "@media (max-width: 900px)" : {
168
+ padding : 10 ,
169
+ } ,
170
+ } ,
171
+ "& svg" : { height : 16 } ,
119
172
} ,
173
+
120
174
loadingLoginStrategy : {
121
175
textAlign : "center" ,
122
176
} ,
123
177
headerTitle : {
124
- marginBottom : 10 ,
178
+ marginRight : "auto" ,
179
+ marginBottom : 15 ,
125
180
} ,
126
181
submitContainer : {
127
182
textAlign : "right" ,
@@ -292,29 +347,47 @@ const Login = ({
292
347
< LoginField
293
348
fullWidth
294
349
id = "accessKey"
350
+ className = { classes . inputField }
295
351
value = { accessKey }
296
352
onChange = { ( e : React . ChangeEvent < HTMLInputElement > ) =>
297
353
setAccessKey ( e . target . value )
298
354
}
299
- label = "Enter Username"
355
+ placeholder = { "Enter Username" }
300
356
name = "accessKey"
301
357
autoComplete = "username"
302
358
disabled = { loginSending }
359
+ variant = { "outlined" }
360
+ InputProps = { {
361
+ startAdornment : (
362
+ < InputAdornment position = "start" >
363
+ < UsersIcon />
364
+ </ InputAdornment >
365
+ ) ,
366
+ } }
303
367
/>
304
368
</ Grid >
305
369
< Grid item xs = { 12 } >
306
370
< LoginField
307
371
fullWidth
372
+ className = { classes . inputField }
308
373
value = { secretKey }
309
374
onChange = { ( e : React . ChangeEvent < HTMLInputElement > ) =>
310
375
setSecretKey ( e . target . value )
311
376
}
312
377
name = "secretKey"
313
- label = "Enter Password"
314
378
type = "password"
315
379
id = "secretKey"
316
380
autoComplete = "current-password"
317
381
disabled = { loginSending }
382
+ placeholder = { "Enter Password" }
383
+ variant = { "outlined" }
384
+ InputProps = { {
385
+ startAdornment : (
386
+ < InputAdornment position = "start" >
387
+ < LockIcon />
388
+ </ InputAdornment >
389
+ ) ,
390
+ } }
318
391
/>
319
392
</ Grid >
320
393
</ Grid >
@@ -340,13 +413,6 @@ const Login = ({
340
413
case loginStrategyType . redirect : {
341
414
loginComponent = (
342
415
< React . Fragment >
343
- < Typography
344
- component = "h1"
345
- variant = "h6"
346
- className = { classes . headerTitle }
347
- >
348
- Welcome
349
- </ Typography >
350
416
< Button
351
417
component = { "a" }
352
418
href = { loginStrategy . redirect }
@@ -376,16 +442,25 @@ const Login = ({
376
442
< Grid item xs = { 12 } className = { classes . jwtInput } >
377
443
< LoginField
378
444
required
445
+ className = { classes . inputField }
379
446
fullWidth
380
447
id = "jwt"
381
448
value = { jwt }
382
449
onChange = { ( e : React . ChangeEvent < HTMLInputElement > ) =>
383
450
setJwt ( e . target . value )
384
451
}
385
- label = "JWT"
386
452
name = "jwt"
387
453
autoComplete = "off"
388
454
disabled = { loginSending }
455
+ placeholder = { "Enter JWT" }
456
+ variant = { "outlined" }
457
+ InputProps = { {
458
+ startAdornment : (
459
+ < InputAdornment position = "start" >
460
+ < LockIcon />
461
+ </ InputAdornment >
462
+ ) ,
463
+ } }
389
464
/>
390
465
</ Grid >
391
466
</ Grid >
@@ -425,6 +500,7 @@ const Login = ({
425
500
} }
426
501
endIcon = { < RefreshIcon /> }
427
502
color = { "primary" }
503
+ variant = "outlined"
428
504
className = { classes . retryButton }
429
505
>
430
506
Retry
@@ -436,18 +512,31 @@ const Login = ({
436
512
) ;
437
513
}
438
514
515
+ const consoleText =
516
+ loginStrategy . loginStrategy === loginStrategyType . serviceAccount
517
+ ? "Operator"
518
+ : "Console" ;
519
+
439
520
return (
440
521
< React . Fragment >
441
- < Paper className = { classes . paper } >
442
- < MainError customStyle = { { marginTop : - 140 } } />
443
- < Grid container className = { classes . mainContainer } >
444
- < Grid item xs = { 7 } className = { classes . theOcean } >
445
- < div className = { classes . oceanBg } />
446
- </ Grid >
447
- < Grid item xs = { 5 } className = { classes . theLogin } >
448
- { loginComponent }
522
+ < Paper className = { classes . loginPage } >
523
+ < MainError />
524
+ < div className = { classes . shadowBox } >
525
+ < Grid container className = { classes . loginContainer } >
526
+ < Grid item className = "consoleTextBanner" >
527
+ < div className = "left-items" >
528
+ < div className = "text-line1" > Welcome to</ div >
529
+ < div className = "text-line2" > { consoleText } </ div >
530
+ < div className = "logoLine" >
531
+ < VersionIcon /> MinIO { consoleText }
532
+ </ div >
533
+ </ div >
534
+ </ Grid >
535
+ < Grid item className = "right-items" >
536
+ { loginComponent }
537
+ </ Grid >
449
538
</ Grid >
450
- </ Grid >
539
+ </ div >
451
540
</ Paper >
452
541
</ React . Fragment >
453
542
) ;
0 commit comments