mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
Show password feature (#1159)
* show password feauture Implemented * small typo * fixed typo
This commit is contained in:
parent
8ccdb3eedb
commit
ff82ca032d
1 changed files with 21 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ class LoginPage extends React.Component {
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
showPassword: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -22,6 +23,10 @@ class LoginPage extends React.Component {
|
||||||
this.setState({ [event.target.name]: event.target.value });
|
this.setState({ [event.target.name]: event.target.value });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleOnCheck = () => {
|
||||||
|
this.setState({ showPassword: !this.state.showPassword });
|
||||||
|
};
|
||||||
|
|
||||||
authUser = (e) => {
|
authUser = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
|
|
@ -85,7 +90,7 @@ class LoginPage extends React.Component {
|
||||||
<input
|
<input
|
||||||
onChange={this.handleChange}
|
onChange={this.handleChange}
|
||||||
name="password"
|
name="password"
|
||||||
type="password"
|
type={this.state.showPassword ?"text" : "password"}
|
||||||
className="form-control"
|
className="form-control"
|
||||||
placeholder="Password"
|
placeholder="Password"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
|
|
@ -94,6 +99,21 @@ class LoginPage extends React.Component {
|
||||||
<span className="input-group-text"></span>
|
<span className="input-group-text"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
class="form-check-input"
|
||||||
|
id="check-input"
|
||||||
|
name="check-input"
|
||||||
|
onChange = {this.handleOnCheck}
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
class="form-check-label"
|
||||||
|
for="check-input"
|
||||||
|
>
|
||||||
|
show password
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<div className="form-footer">
|
<div className="form-footer">
|
||||||
<button
|
<button
|
||||||
data-testid="loginButton"
|
data-testid="loginButton"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue