Commit bb27503a authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Merge branch 'v0.4.6-bugfixes' into v0.5.0-markus

parents ae1d14dc 0edac160
Pipeline #52255 passed with stages
in 14 minutes and 39 seconds
......@@ -41,6 +41,7 @@ class LoginLogout extends React.Component {
super(props)
this.handleLogout = this.handleLogout.bind(this)
this.handleChange = this.handleChange.bind(this)
this.handleKeyPress = this.handleKeyPress.bind(this)
}
state = {
......@@ -82,7 +83,7 @@ class LoginLogout extends React.Component {
handleChange = name => event => {
this.setState({
[name]: event.target.value
[name]: event.target.value, failure: false
})
}
......@@ -93,6 +94,13 @@ class LoginLogout extends React.Component {
}
}
handleKeyPress(ev) {
if (ev.key === 'Enter') {
ev.preventDefault()
this.handleLoginDialogClosed(true)
}
}
render() {
const { classes, user, variant, color, isLoggingIn } = this.props
const { failure } = this.state
......@@ -141,6 +149,7 @@ class LoginLogout extends React.Component {
fullWidth
value={this.state.userName}
onChange={this.handleChange('userName')}
onKeyPress={this.handleKeyPress}
/>
<TextField
autoComplete="current-password"
......@@ -152,6 +161,7 @@ class LoginLogout extends React.Component {
fullWidth
value={this.state.password}
onChange={this.handleChange('password')}
onKeyPress={this.handleKeyPress}
/>
</FormGroup>
</form>
......
#!/bin/sh
version=`git describe --tags`
sed -i -e "s/nomad-gui-version-placeholder/$version/g" package.json
rm package.json-e
\ No newline at end of file
rm -f package.json-e
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment