Skip to content

Commit d92faf2

Browse files
committed
fix: tweak config panel style
1 parent ca29384 commit d92faf2

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

client/actions.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,10 @@ const actions = {
6060
function handleRedis(config, override) {
6161
dispatch({ type: 'updateConnectStatus', data: 'Redis connecting...' });
6262
if (config.ssl) {
63-
config.tls = {
64-
ca: config.ca,
65-
key: config.key,
66-
cert: config.cert
67-
}
63+
config.tls = {};
64+
if (config.tlsca) config.tls.ca = config.tlsca;
65+
if (config.tlskey) config.tls.key = config.tlskey;
66+
if (config.tlscert) config.tls.cert = config.tlscert;
6867
}
6968
const redis = new Redis(_.assign({}, config, override, {
7069
showFriendlyErrorStack: true,

client/components/main/Main/ConnectionSelector/Config.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ class Config extends React.Component {
132132
<input type="checkbox" id="ssl" onChange={this.handleChange.bind(this, 'ssl')} checked={this.getProp('ssl')} />
133133
</div>
134134
<div style={ { display: this.getProp('ssl') ? 'block' : 'none' } }>
135-
{this.renderCertInput('Private Key', 'key')}
136-
{this.renderCertInput('Certificate', 'cert')}
137-
{this.renderCertInput('CA', 'ca')}
135+
{this.renderCertInput('Private Key', 'tlskey')}
136+
{this.renderCertInput('Certificate', 'tlscert')}
137+
{this.renderCertInput('CA', 'tlsca')}
138138
</div>
139139
<div className="nt-form-row">
140140
<label htmlFor="ssh">SSH Tunnel:</label>
@@ -191,7 +191,7 @@ class Config extends React.Component {
191191
</div>
192192
</div>
193193
</div>
194-
<div className="nt-button-group nt-button-group--pull-right" style={ { width: 500, margin: '10px auto 0' } }>
194+
<div className="nt-button-group nt-button-group--pull-right" style={ { width: 500, margin: '10px auto 0', paddingBottom: 10 } }>
195195
<button className="nt-button" style={
196196
{ float: 'left' }
197197
} onClick={() => {

0 commit comments

Comments
 (0)