Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kyohei8 committed May 9, 2017
1 parent 99ae482 commit a757b1f
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 105 deletions.
7 changes: 2 additions & 5 deletions app/styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

.container {
margin-top: 20px;
max-width: 80rem;
max-width: 100rem;
}

.geth-options {
Expand All @@ -35,8 +35,5 @@
}

main {
position: absolute;
top: 0;
bottom: 0;
left: 240px;
position: absolute 0 0 0 240px;
}
23 changes: 14 additions & 9 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ const BrowserWindow = electron.BrowserWindow
const path = require('path')
const url = require('url')

// if(hot){
// require('electron-reload')(__dirname, {
// electron: path.join(__dirname, 'node_modules', '.bin', 'electron'),
// });
// }
/*
if(process.env.HOT){
require('electron-reload')(__dirname, {
electron: path.join(__dirname, 'node_modules', '.bin', 'electron'),
});
}
*/

var gethProcess = null;

Expand All @@ -23,7 +25,7 @@ let mainWindow

function createWindow () {
// Create the browser window.
mainWindow = new BrowserWindow({width: 1280, height: 600})
mainWindow = new BrowserWindow({width: 1200, height: 700})

// and load the index.html of the app.
mainWindow.loadURL(url.format({
Expand Down Expand Up @@ -107,12 +109,15 @@ ipcMain.on('start', function(event, arg) {
if(noDiscover) {
gethOption.push('--nodiscover');
}

gethProcess = spawn("geth", gethOption.concat([
const cmd = gethOption.concat([
'console'
// '2>>',
// '2017-03-07.log'
]), {
]);

console.log(cmd.join(' '));

gethProcess = spawn("geth", cmd, {
cwd: dir
});

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"devDependencies": {
"babel-core": "^6.24.1",
"babel-loader": "^7.0.0",
"babel-polyfill": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
Expand Down
2 changes: 1 addition & 1 deletion renderer/components/connectIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const defaultProps = {};
*/
const ConnectIcon = (props) => {
const { connecting } = props;
const bgImage = connecting ? 'images/connected.png' : 'images/disconnected.png';
const bgImage = `../app/assets/images/${connecting ? 'connected.png' : 'disconnected.png'}`;
return (
<span
className="icon icon__connect"
Expand Down
6 changes: 5 additions & 1 deletion renderer/components/setting.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ class Setting extends Component{
this.toggleMining = ::this.toggleMining;
this.sendGethCommand = ::this.sendGethCommand;

// 接続成功
ipcRenderer.on('success', (obj, res) => {
this.props.handleConnectingChange(true);
});

// 切断成功
ipcRenderer.on('disconnected', (obj, res) => {
this.props.handleConnectingChange(false);
});
Expand Down Expand Up @@ -106,7 +108,7 @@ class Setting extends Component{
</div>

<div className="row">
<div className="column column-25">
<div className="column column-50">
<div>
<input type="checkbox" id="nodiscover" checked={noDiscover} onChange={handleNoDiscoverChange} />
<label className="label-inline" htmlFor="nodiscover">noDiscover</label>
Expand All @@ -118,6 +120,7 @@ class Setting extends Component{
</div>
</div>

{/* rpcはデフォルトでON
<div className="row">
<div className="column column-100">
<input type="checkbox" id="rpc" checked={rpc} onChange={handleRPCChange} />
Expand All @@ -135,6 +138,7 @@ class Setting extends Component{
<input type="text" placeholder="8545" id="rpcPort" value={rpcPort} onChange={handleRpcPortChange}/>
</div>
</div>
*/}
</fieldset>

<div className="row">
Expand Down
Loading

0 comments on commit a757b1f

Please sign in to comment.