17
17
import React , { useState } from "react" ;
18
18
import { connect } from "react-redux" ;
19
19
import { createStyles , Theme , withStyles } from "@material-ui/core/styles" ;
20
- import { LinearProgress } from "@material-ui/core" ;
20
+ import { LinearProgress , TextField } from "@material-ui/core" ;
21
21
import Grid from "@material-ui/core/Grid" ;
22
22
import Typography from "@material-ui/core/Typography" ;
23
- import TextField from "@material-ui/core/TextField" ;
24
23
import Button from "@material-ui/core/Button" ;
25
24
import { containerForHeader } from "../Common/FormComponents/common/styleLibrary" ;
26
25
import { SubscriptionActivateRequest } from "../Buckets/types" ;
27
26
import { setModalErrorSnackMessage } from "../../../actions" ;
28
27
import ModalWrapper from "../Common/ModalWrapper/ModalWrapper" ;
29
28
import InputBoxWrapper from "../Common/FormComponents/InputBoxWrapper/InputBoxWrapper" ;
30
29
import api from "../../../common/api" ;
30
+ import PersonOutlineOutlinedIcon from "@material-ui/icons/PersonOutlineOutlined" ;
31
+ import LockOutlinedIcon from "@material-ui/icons/LockOutlined" ;
31
32
32
33
const styles = ( theme : Theme ) =>
33
34
createStyles ( {
@@ -37,16 +38,32 @@ const styles = (theme: Theme) =>
37
38
subnetLicenseKey : {
38
39
padding : "10px 10px 10px 0px" ,
39
40
borderRight : "1px solid rgba(0, 0, 0, 0.12)" ,
41
+ opacity : 0.5 ,
42
+ "&:hover" : { opacity : 1 } ,
40
43
} ,
41
44
subnetLoginForm : {
42
45
padding : "10px 0px 10px 10px" ,
46
+ opacity : 0.5 ,
47
+ "&:hover" : { opacity : 1 } ,
43
48
} ,
44
- licenseKeyField : {
45
- marginBottom : 20 ,
46
- } ,
49
+ licenseKeyField : { } ,
47
50
pageTitle : {
48
51
marginBottom : 20 ,
49
52
} ,
53
+ button : {
54
+ textTransform : "none" ,
55
+ fontSize : 15 ,
56
+ fontWeight : 700 ,
57
+ background :
58
+ "transparent linear-gradient(90deg, #073052 0%, #081c42 100%) 0% 0% no-repeat padding-box" ,
59
+ color : "#fff" ,
60
+ } ,
61
+ buttonSignup : {
62
+ textTransform : "none" ,
63
+ fontSize : 15 ,
64
+ fontWeight : 700 ,
65
+ marginLeft : 15 ,
66
+ } ,
50
67
...containerForHeader ( theme . spacing ( 4 ) ) ,
51
68
} ) ;
52
69
@@ -110,28 +127,32 @@ const ActivationModal = ({
110
127
aria-describedby = "alert-dialog-description"
111
128
>
112
129
< Grid container alignItems = "center" item xs = { 12 } >
130
+ < Grid item xs = { 12 } >
131
+ < Typography component = "h2" variant = "h6" className = { classes . pageTitle } >
132
+ Activate SUBNET License
133
+ </ Typography >
134
+ </ Grid >
113
135
< Grid item className = { classes . subnetLicenseKey } xs = { 6 } >
114
136
< Grid item xs = { 12 } >
115
- < Typography
116
- component = "h2"
117
- variant = "h6"
118
- className = { classes . pageTitle }
119
- >
120
- License Key
137
+ < Typography variant = "caption" display = "block" gutterBottom >
138
+ Enter your license key here
121
139
</ Typography >
122
140
</ Grid >
123
141
< TextField
124
142
id = "license-key"
125
- placeholder = "Enter your license key here "
143
+ placeholder = ""
126
144
multiline
127
- rows = { 6 }
145
+ rows = { 3 }
128
146
value = { license }
129
147
onChange = { ( event : React . ChangeEvent < HTMLInputElement > ) =>
130
148
setLicense ( event . target . value )
131
149
}
132
150
fullWidth
133
151
className = { classes . licenseKeyField }
152
+ variant = "outlined"
134
153
/>
154
+ < br />
155
+ < br />
135
156
< Button
136
157
variant = "contained"
137
158
color = "primary"
@@ -142,52 +163,62 @@ const ActivationModal = ({
142
163
</ Button >
143
164
</ Grid >
144
165
< Grid item className = { classes . subnetLoginForm } xs = { 6 } >
145
- < Grid item xs = { 12 } >
146
- < Typography
147
- component = "h2"
148
- variant = "h6"
149
- className = { classes . pageTitle }
150
- >
151
- Subscription Network (SUBNET)
152
- </ Typography >
153
- </ Grid >
154
166
< Grid container >
155
167
< Grid item xs = { 12 } >
156
168
< InputBoxWrapper
169
+ overlayIcon = { < PersonOutlineOutlinedIcon /> }
157
170
id = "subnet-email"
158
171
name = "subnet-email"
159
172
onChange = { ( event : React . ChangeEvent < HTMLInputElement > ) => {
160
173
setSubnetEmail ( event . target . value ) ;
161
174
} }
162
- label = "Email"
175
+ placeholder = "email"
176
+ label = ""
163
177
type = "text"
164
178
value = { subnetEmail }
165
179
/>
166
180
</ Grid >
167
181
< Grid item xs = { 12 } >
168
182
< InputBoxWrapper
183
+ overlayIcon = { < LockOutlinedIcon /> }
169
184
id = "subnet-password"
170
185
name = "subnet-password"
171
186
onChange = { ( event : React . ChangeEvent < HTMLInputElement > ) => {
172
187
setSubnetPassword ( event . target . value ) ;
173
188
} }
174
- label = "Password"
189
+ placeholder = "password"
190
+ label = ""
175
191
type = "password"
176
192
value = { subnetPassword }
177
193
/>
178
194
</ Grid >
179
195
< Grid item xs = { 12 } >
180
196
< Button
181
- variant = "contained"
197
+ className = { classes . button }
182
198
color = "primary"
183
199
onClick = { ( ) => activateProduct ( ) }
184
200
disabled = {
185
201
loading ||
186
202
subnetEmail . trim ( ) . length === 0 ||
187
203
subnetPassword . trim ( ) . length === 0
188
204
}
205
+ variant = "contained"
206
+ >
207
+ Activate
208
+ </ Button >
209
+ < Button
210
+ className = { classes . buttonSignup }
211
+ color = "primary"
212
+ target = "_blank"
213
+ rel = "noopener noreferrer"
214
+ href = "#"
215
+ onClick = { ( e ) => {
216
+ e . preventDefault ( ) ;
217
+ window . open ( "https://min.io/pricing" , "_blank" ) ;
218
+ } }
219
+ variant = "outlined"
189
220
>
190
- Login
221
+ Sign Up
191
222
</ Button >
192
223
</ Grid >
193
224
</ Grid >
0 commit comments