Use correct ssl property name, closes #14
This commit is contained in:
parent
d27d108a07
commit
2f2c500453
File diff suppressed because one or more lines are too long
@ -26,7 +26,7 @@ class Connect extends Component {
|
|||||||
} else if (!e.target.checked && values.port === '6697') {
|
} else if (!e.target.checked && values.port === '6697') {
|
||||||
setFieldValue('port', '6667', false);
|
setFieldValue('port', '6667', false);
|
||||||
}
|
}
|
||||||
setFieldValue('ssl', e.target.checked);
|
setFieldValue('tls', e.target.checked);
|
||||||
};
|
};
|
||||||
|
|
||||||
handleShowClick = () => {
|
handleShowClick = () => {
|
||||||
@ -77,7 +77,7 @@ class Connect extends Component {
|
|||||||
<div className="connect-form-address">
|
<div className="connect-form-address">
|
||||||
<TextInput name="host" placeholder="Host" />
|
<TextInput name="host" placeholder="Host" />
|
||||||
<TextInput name="port" placeholder="Port" />
|
<TextInput name="port" placeholder="Port" />
|
||||||
<Checkbox name="ssl" label="SSL" onChange={this.handleSSLChange} />
|
<Checkbox name="tls" label="SSL" onChange={this.handleSSLChange} />
|
||||||
</div>
|
</div>
|
||||||
{touched.host && <Error>{errors.host}</Error>}
|
{touched.host && <Error>{errors.host}</Error>}
|
||||||
{touched.port && <Error>{errors.port}</Error>}
|
{touched.port && <Error>{errors.port}</Error>}
|
||||||
@ -119,7 +119,7 @@ export default withFormik({
|
|||||||
username: '',
|
username: '',
|
||||||
password: defaults.password ? ' ' : '',
|
password: defaults.password ? ' ' : '',
|
||||||
realname: '',
|
realname: '',
|
||||||
ssl: defaults.ssl
|
tls: defaults.ssl
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
validate: values => {
|
validate: values => {
|
||||||
@ -138,7 +138,7 @@ export default withFormik({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!values.port) {
|
if (!values.port) {
|
||||||
values.port = values.ssl ? '6697' : '6667';
|
values.port = values.tls ? '6697' : '6667';
|
||||||
} else if (!isInt(values.port, 1, 65535)) {
|
} else if (!isInt(values.port, 1, 65535)) {
|
||||||
errors.port = 'Invalid port';
|
errors.port = 'Invalid port';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user