From faf4796a1e3b2cf2ce07806f789e69e7c97551c0 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 22 Mar 2016 11:20:05 -0700 Subject: [PATCH] Electron working --- .gitignore | 1 + .../{UrlInput.js => RequestUrlBar.js} | 15 ++++-- app/containers/App.js | 7 ++- app/css/components/response.scss | 4 ++ app/css/components/sidebar.scss | 4 ++ app/electron.html | 17 +++++++ app/index.html | 11 ----- electron.js | 46 +++++++++++++++++++ package.json | 13 +++++- webpack/base.config.js | 5 +- webpack/dev.config.js | 34 +++++++++----- webpack/server.js | 33 +++++++------ 12 files changed, 141 insertions(+), 49 deletions(-) rename app/components/{UrlInput.js => RequestUrlBar.js} (73%) create mode 100644 app/electron.html delete mode 100644 app/index.html create mode 100644 electron.js diff --git a/.gitignore b/.gitignore index 8bea256a6..bf508eb6c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules .idea dist +npm-debug.log diff --git a/app/components/UrlInput.js b/app/components/RequestUrlBar.js similarity index 73% rename from app/components/UrlInput.js rename to app/components/RequestUrlBar.js index 16332dca2..66ba7e14a 100644 --- a/app/components/UrlInput.js +++ b/app/components/RequestUrlBar.js @@ -4,13 +4,16 @@ import Dropdown from './base/Dropdown'; import {METHODS} from '../constants/global'; class UrlInput extends Component { + shouldComponentUpdate(nextProps) { + return this.props.request.url !== nextProps.request.url; + } render () { - const {onUrlChange, onMethodChange, urlValue, method} = this.props; + const {onUrlChange, onMethodChange, request} = this.props; return (
    {METHODS.map((method) => ( @@ -25,7 +28,7 @@ class UrlInput extends Component {