Add option to hex encode the source IP of a client and use it as the ident, closes #24

This commit is contained in:
Ken-Håvard Lieng 2018-08-10 20:24:29 +02:00
parent e2c6cedc27
commit c975c5d120
17 changed files with 163 additions and 41 deletions

View file

@ -29,14 +29,20 @@ class Connect extends Component {
this.setState({ showOptionals: !this.state.showOptionals });
};
renderOptionals = () => (
<div>
<TextInput name="username" placeholder="Username" />
{this.renderError('username')}
<TextInput type="password" name="password" placeholder="Password" />
<TextInput name="realname" placeholder="Realname" />
</div>
);
renderOptionals = () => {
const { hexIP } = this.props;
return (
<div>
{!hexIP && [
<TextInput name="username" placeholder="Username" />,
this.renderError('username')
]}
<TextInput type="password" name="password" placeholder="Password" />
<TextInput name="realname" placeholder="Realname" />
</div>
);
};
renderError = name => {
const { touched, errors } = this.props;