Merge pull request #122 from sensebox/update-login-button

Update login Button
This commit is contained in:
Mario Pesch 2021-10-17 17:51:26 +02:00 committed by GitHub
commit a23f504eec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,57 +124,59 @@ export class Login extends Component {
type={this.state.type} type={this.state.type}
key={this.state.key} key={this.state.key}
/> />
<TextField <form onSubmit={this.onSubmit}>
style={{ marginBottom: "10px" }} <TextField
// variant='outlined' style={{ marginBottom: "10px" }}
type="text" // variant='outlined'
label={Blockly.Msg.labels_username} type="text"
name="email" label={Blockly.Msg.labels_username}
value={this.state.email} name="email"
onChange={this.onChange} value={this.state.email}
fullWidth={true} onChange={this.onChange}
/> fullWidth={true}
<TextField />
// variant='outlined' <TextField
type={this.state.showPassword ? "text" : "password"} // variant='outlined'
label={Blockly.Msg.labels_password} type={this.state.showPassword ? "text" : "password"}
name="password" label={Blockly.Msg.labels_password}
value={this.state.password} name="password"
InputProps={{ value={this.state.password}
endAdornment: ( InputProps={{
<InputAdornment position="end"> endAdornment: (
<IconButton <InputAdornment position="end">
onClick={this.handleClickShowPassword} <IconButton
onMouseDown={this.handleMouseDownPassword} onClick={this.handleClickShowPassword}
edge="end" onMouseDown={this.handleMouseDownPassword}
> edge="end"
<FontAwesomeIcon >
size="xs" <FontAwesomeIcon
icon={this.state.showPassword ? faEyeSlash : faEye} size="xs"
/> icon={this.state.showPassword ? faEyeSlash : faEye}
</IconButton> />
</InputAdornment> </IconButton>
), </InputAdornment>
}} ),
onChange={this.onChange} }}
fullWidth={true} onChange={this.onChange}
/> fullWidth={true}
<p> />
<Button <p>
color="primary" <Button
variant="contained" color="primary"
onClick={this.onSubmit} variant="contained"
style={{ width: "100%" }} type="submit"
> style={{ width: "100%" }}
{this.props.progress ? ( >
<div style={{ height: "24.5px" }}> {this.props.progress ? (
<CircularProgress color="inherit" size={20} /> <div style={{ height: "24.5px" }}>
</div> <CircularProgress color="inherit" size={20} />
) : ( </div>
Blockly.Msg.button_login ) : (
)} Blockly.Msg.button_login
</Button> )}
</p> </Button>
</p>
</form>
<p style={{ textAlign: "center", fontSize: "0.8rem" }}> <p style={{ textAlign: "center", fontSize: "0.8rem" }}>
<Link <Link
rel="noreferrer" rel="noreferrer"