Skip to content

Commit

Permalink
fix: tweak config panel style
Browse files Browse the repository at this point in the history
  • Loading branch information
luin committed Dec 4, 2016
1 parent ca29384 commit d92faf2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
9 changes: 4 additions & 5 deletions client/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,10 @@ const actions = {
function handleRedis(config, override) {
dispatch({ type: 'updateConnectStatus', data: 'Redis connecting...' });
if (config.ssl) {
config.tls = {
ca: config.ca,
key: config.key,
cert: config.cert
}
config.tls = {};
if (config.tlsca) config.tls.ca = config.tlsca;
if (config.tlskey) config.tls.key = config.tlskey;
if (config.tlscert) config.tls.cert = config.tlscert;
}
const redis = new Redis(_.assign({}, config, override, {
showFriendlyErrorStack: true,
Expand Down
8 changes: 4 additions & 4 deletions client/components/main/Main/ConnectionSelector/Config.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ class Config extends React.Component {
<input type="checkbox" id="ssl" onChange={this.handleChange.bind(this, 'ssl')} checked={this.getProp('ssl')} />
</div>
<div style={ { display: this.getProp('ssl') ? 'block' : 'none' } }>
{this.renderCertInput('Private Key', 'key')}
{this.renderCertInput('Certificate', 'cert')}
{this.renderCertInput('CA', 'ca')}
{this.renderCertInput('Private Key', 'tlskey')}
{this.renderCertInput('Certificate', 'tlscert')}
{this.renderCertInput('CA', 'tlsca')}
</div>
<div className="nt-form-row">
<label htmlFor="ssh">SSH Tunnel:</label>
Expand Down Expand Up @@ -191,7 +191,7 @@ class Config extends React.Component {
</div>
</div>
</div>
<div className="nt-button-group nt-button-group--pull-right" style={ { width: 500, margin: '10px auto 0' } }>
<div className="nt-button-group nt-button-group--pull-right" style={ { width: 500, margin: '10px auto 0', paddingBottom: 10 } }>
<button className="nt-button" style={
{ float: 'left' }
} onClick={() => {
Expand Down

0 comments on commit d92faf2

Please sign in to comment.