From d92faf2fca725b34dadc16455c257cd7b04ebb34 Mon Sep 17 00:00:00 2001 From: luin Date: Sun, 4 Dec 2016 12:31:32 +0800 Subject: [PATCH] fix: tweak config panel style --- client/actions.js | 9 ++++----- .../components/main/Main/ConnectionSelector/Config.jsx | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/client/actions.js b/client/actions.js index 582e8b4c..02b677d5 100644 --- a/client/actions.js +++ b/client/actions.js @@ -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, diff --git a/client/components/main/Main/ConnectionSelector/Config.jsx b/client/components/main/Main/ConnectionSelector/Config.jsx index 61ce2ab0..86eec97e 100644 --- a/client/components/main/Main/ConnectionSelector/Config.jsx +++ b/client/components/main/Main/ConnectionSelector/Config.jsx @@ -132,9 +132,9 @@ class Config extends React.Component {
- {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')}
@@ -191,7 +191,7 @@ class Config extends React.Component {
-
+