From 35a9e3ca9e66436d9098f96ddbd1115b0039dc54 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Mon, 12 Sep 2016 13:04:15 -0700 Subject: [PATCH] More flexible proxy setting and toggle sidebar --- app/app.js | 8 ++++++++ app/components/editors/AuthEditor.js | 6 +++--- app/components/sidebar/Sidebar.js | 3 +++ app/containers/App.js | 21 ++++++++++++++++++--- app/css/components/sidebar.less | 3 +++ app/database/index.js | 3 ++- app/lib/__tests__/render.test.js | 22 ---------------------- app/lib/__tests__/util.test.js | 22 ++++++++++++++++++++++ app/lib/network.js | 5 +++-- app/lib/render.js | 10 +--------- app/lib/util.js | 9 +++++++++ 11 files changed, 72 insertions(+), 40 deletions(-) diff --git a/app/app.js b/app/app.js index cf4637e95..f803dc08f 100644 --- a/app/app.js +++ b/app/app.js @@ -372,6 +372,14 @@ function createWindow () { saveZoomFactor(zoomFactor); } + }, + { + label: "Toggle Sidebar", + accelerator: "CmdOrCtrl+\\", + click: () => { + const window = BrowserWindow.getFocusedWindow(); + window && window.webContents.send('toggle-sidebar'); + } } ] }, { diff --git a/app/components/editors/AuthEditor.js b/app/components/editors/AuthEditor.js index 5987c8a10..5af5c46e0 100644 --- a/app/components/editors/AuthEditor.js +++ b/app/components/editors/AuthEditor.js @@ -16,9 +16,9 @@ const AuthEditor = ({request, showPasswords, onChange, ...other}) => { valuePlaceholder="********" valueInputType={showPasswords ? 'text' : 'password'} onChange={pairs => onChange({ - username: pairs.length ? pairs[0].name : '', - password: pairs.length ? pairs[0].value : '' - })} + username: pairs.length ? pairs[0].name : '', + password: pairs.length ? pairs[0].value : '' + })} {...other} /> ); diff --git a/app/components/sidebar/Sidebar.js b/app/components/sidebar/Sidebar.js index 83bc61ae6..453ce915b 100644 --- a/app/components/sidebar/Sidebar.js +++ b/app/components/sidebar/Sidebar.js @@ -101,6 +101,7 @@ class Sidebar extends Component { changeFilter, filter, children, + hidden, requestCreate, requestGroupCreate, width @@ -108,6 +109,7 @@ class Sidebar extends Component { return (