Skip to content

Commit

Permalink
Fixed default pass
Browse files Browse the repository at this point in the history
  • Loading branch information
githubsaturn committed Oct 24, 2024
1 parent e567c17 commit 0669399
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/containers/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class NormalLoginForm extends React.Component<

this.state = {
loginOption: NO_SESSION,
passwordEntered: ``,
passwordEntered: this.getDefaultPassword(),
otpEntered: ``,
}
}
Expand All @@ -155,7 +155,7 @@ class NormalLoginForm extends React.Component<
return (
<form onSubmit={this.handleSubmit}>
<Input.Password
defaultValue={this.isDemo ? 'captain42' : ''}
defaultValue={this.getDefaultPassword()}
required
onKeyDown={(key) => {
if (
Expand Down Expand Up @@ -256,4 +256,8 @@ class NormalLoginForm extends React.Component<
</form>
)
}

private getDefaultPassword(): string {
return this.isDemo ? 'captain42' : ''
}
}

0 comments on commit 0669399

Please sign in to comment.