@@ -175,86 +175,90 @@ const Index: React.FC = () => {
175
175
return (
176
176
< Container style = { { paddingTop : '4rem' , paddingBottom : '5rem' } } >
177
177
< WelcomeTitle />
178
- { step === 1 && canOriginalLogin ? (
178
+ { step === 1 ? (
179
179
< Col className = "mx-auto" md = { 6 } lg = { 4 } xl = { 3 } >
180
180
{ ucAgentInfo ? (
181
181
< PluginUcLogin className = "mb-5" />
182
182
) : (
183
183
< PluginOauth className = "mb-5" />
184
184
) }
185
- < Form noValidate onSubmit = { handleSubmit } >
186
- < Form . Group controlId = "email" className = "mb-3" >
187
- < Form . Label > { t ( 'email.label' ) } </ Form . Label >
188
- < Form . Control
189
- required
190
- tabIndex = { 1 }
191
- type = "email"
192
- value = { formData . e_mail . value }
193
- isInvalid = { formData . e_mail . isInvalid }
194
- onChange = { ( e ) =>
195
- handleChange ( {
196
- e_mail : {
197
- value : e . target . value ,
198
- isInvalid : false ,
199
- errorMsg : '' ,
200
- } ,
201
- } )
202
- }
203
- />
204
- < Form . Control . Feedback type = "invalid" >
205
- { formData . e_mail . errorMsg }
206
- </ Form . Control . Feedback >
207
- </ Form . Group >
185
+ { canOriginalLogin ? (
186
+ < >
187
+ < Form noValidate onSubmit = { handleSubmit } >
188
+ < Form . Group controlId = "email" className = "mb-3" >
189
+ < Form . Label > { t ( 'email.label' ) } </ Form . Label >
190
+ < Form . Control
191
+ required
192
+ tabIndex = { 1 }
193
+ type = "email"
194
+ value = { formData . e_mail . value }
195
+ isInvalid = { formData . e_mail . isInvalid }
196
+ onChange = { ( e ) =>
197
+ handleChange ( {
198
+ e_mail : {
199
+ value : e . target . value ,
200
+ isInvalid : false ,
201
+ errorMsg : '' ,
202
+ } ,
203
+ } )
204
+ }
205
+ />
206
+ < Form . Control . Feedback type = "invalid" >
207
+ { formData . e_mail . errorMsg }
208
+ </ Form . Control . Feedback >
209
+ </ Form . Group >
208
210
209
- < Form . Group controlId = "password" className = "mb-3" >
210
- < div className = "d-flex justify-content-between" >
211
- < Form . Label > { t ( 'password.label' ) } </ Form . Label >
212
- < Link to = "/users/account-recovery" tabIndex = { 2 } >
213
- < small > { t ( 'forgot_pass' ) } </ small >
214
- </ Link >
215
- </ div >
211
+ < Form . Group controlId = "password" className = "mb-3" >
212
+ < div className = "d-flex justify-content-between" >
213
+ < Form . Label > { t ( 'password.label' ) } </ Form . Label >
214
+ < Link to = "/users/account-recovery" tabIndex = { 2 } >
215
+ < small > { t ( 'forgot_pass' ) } </ small >
216
+ </ Link >
217
+ </ div >
216
218
217
- < Form . Control
218
- required
219
- tabIndex = { 1 }
220
- type = "password"
221
- // value={formData.pass.value}
222
- maxLength = { 32 }
223
- isInvalid = { formData . pass . isInvalid }
224
- onChange = { ( e ) =>
225
- handleChange ( {
226
- pass : {
227
- value : e . target . value ,
228
- isInvalid : false ,
229
- errorMsg : '' ,
230
- } ,
231
- } )
232
- }
233
- />
234
- < Form . Control . Feedback type = "invalid" >
235
- { formData . pass . errorMsg }
236
- </ Form . Control . Feedback >
237
- </ Form . Group >
219
+ < Form . Control
220
+ required
221
+ tabIndex = { 1 }
222
+ type = "password"
223
+ // value={formData.pass.value}
224
+ maxLength = { 32 }
225
+ isInvalid = { formData . pass . isInvalid }
226
+ onChange = { ( e ) =>
227
+ handleChange ( {
228
+ pass : {
229
+ value : e . target . value ,
230
+ isInvalid : false ,
231
+ errorMsg : '' ,
232
+ } ,
233
+ } )
234
+ }
235
+ />
236
+ < Form . Control . Feedback type = "invalid" >
237
+ { formData . pass . errorMsg }
238
+ </ Form . Control . Feedback >
239
+ </ Form . Group >
238
240
239
- < div className = "d-grid" >
240
- < Button variant = "primary" type = "submit" tabIndex = { 1 } >
241
- { t ( 'login' , { keyPrefix : 'btns' } ) }
242
- </ Button >
243
- </ div >
244
- </ Form >
245
- { loginSetting . allow_new_registrations && (
246
- < div className = "text-center mt-5" >
247
- < Trans i18nKey = "login.info_sign" ns = "translation" >
248
- Don’t have an account?
249
- < Link
250
- to = { userCenter . getSignUpUrl ( ) }
251
- tabIndex = { 2 }
252
- onClick = { floppyNavigation . handleRouteLinkClick } >
253
- Sign up
254
- </ Link >
255
- </ Trans >
256
- </ div >
257
- ) }
241
+ < div className = "d-grid" >
242
+ < Button variant = "primary" type = "submit" tabIndex = { 1 } >
243
+ { t ( 'login' , { keyPrefix : 'btns' } ) }
244
+ </ Button >
245
+ </ div >
246
+ </ Form >
247
+ { loginSetting . allow_new_registrations && (
248
+ < div className = "text-center mt-5" >
249
+ < Trans i18nKey = "login.info_sign" ns = "translation" >
250
+ Don’t have an account?
251
+ < Link
252
+ to = { userCenter . getSignUpUrl ( ) }
253
+ tabIndex = { 2 }
254
+ onClick = { floppyNavigation . handleRouteLinkClick } >
255
+ Sign up
256
+ </ Link >
257
+ </ Trans >
258
+ </ div >
259
+ ) }
260
+ </ >
261
+ ) : null }
258
262
</ Col >
259
263
) : null }
260
264
0 commit comments