fix entry point location

pull/7/head
yann300 8 years ago
parent 2eab7c0881
commit 8796ad21e8
  1. 2
      package.json
  2. 4
      src/Ethdebugger.js
  3. 21
      src/TxBrowser.js
  4. 4
      src/styles/basicStyles.js

@ -1,6 +1,6 @@
{ {
"name": "ethereum-remix", "name": "ethereum-remix",
"version": "0.0.2-alpha.0.0.3", "version": "0.0.2-alpha.0.0.4",
"description": "Ethereum IDE and tools for the web", "description": "Ethereum IDE and tools for the web",
"contributors": [ "contributors": [
{ {

@ -18,9 +18,11 @@ function Ethdebugger (_web3) {
this.statusMessage = '' this.statusMessage = ''
this.view this.view
this.displayConnectionSetting = true
if (_web3) { if (_web3) {
this.web3 = _web3 this.web3 = _web3
init.extendWeb3(this.web3) init.extendWeb3(this.web3)
this.displayConnectionSetting = false
} else { } else {
this.web3 = init.loadWeb3() this.web3 = init.loadWeb3()
} }
@ -28,7 +30,7 @@ function Ethdebugger (_web3) {
this.traceManager = new TraceManager(this.web3) this.traceManager = new TraceManager(this.web3)
var self = this var self = this
this.txBrowser = new TxBrowser(this.web3) this.txBrowser = new TxBrowser(this.web3, this.displayConnectionSetting)
this.txBrowser.register('newTxLoading', this, function () { this.txBrowser.register('newTxLoading', this, function () {
self.unLoad() self.unLoad()
}) })

@ -6,7 +6,7 @@ var yo = require('yo-yo')
var ui = require('./helpers/ui') var ui = require('./helpers/ui')
var init = require('./helpers/init') var init = require('./helpers/init')
function TxBrowser (_web3) { function TxBrowser (_web3, _displayConnectionSetting) {
util.extend(this, new EventManager()) util.extend(this, new EventManager())
this.web3 = _web3 this.web3 = _web3
@ -16,6 +16,10 @@ function TxBrowser (_web3) {
this.from this.from
this.to this.to
this.view this.view
this.displayConnectionSetting = true
if (_displayConnectionSetting !== undefined) {
this.displayConnectionSetting = _displayConnectionSetting
}
this.setDefaultValues() this.setDefaultValues()
} }
@ -113,13 +117,20 @@ TxBrowser.prototype.init = function (ev) {
yo.update(this.view, this.render()) yo.update(this.view, this.render())
} }
TxBrowser.prototype.connectionSetting = function () {
if (this.displayConnectionSetting) {
var self = this
return yo`<div style=${ui.formatCss(style.vmargin)}><span>Node URL: </span><input onkeyup=${function () { self.updateWeb3Url(arguments[0].target.value) }} value=${this.web3.currentProvider ? this.web3.currentProvider.host : ' - none - '} type='text' />
<span>${this.connectInfo}</span></div>`
} else {
return ''
}
}
TxBrowser.prototype.render = function () { TxBrowser.prototype.render = function () {
var self = this var self = this
var view = yo`<div style=${ui.formatCss(style.container)}> var view = yo`<div style=${ui.formatCss(style.container)}>
<span>Node URL: </span><input onkeyup=${function () { self.updateWeb3Url(arguments[0].target.value) }} value=${this.web3.currentProvider ? this.web3.currentProvider.host : ' - none - '} type='text' /> ${this.connectionSetting()}
<span>${this.connectInfo}</span>
<br />
<br />
<input onkeyup=${function () { self.updateBlockN(arguments[0]) }} type='text' placeholder=${'Block number (default 1000110)' + this.blockNumber} /> <input onkeyup=${function () { self.updateBlockN(arguments[0]) }} type='text' placeholder=${'Block number (default 1000110)' + this.blockNumber} />
<input id='txinput' onkeyup=${function () { self.updateTxN(arguments[0]) }} type='text' value=${this.txNumber} placeholder=${'Transaction Number or hash (default 2) ' + this.txNumber} /> <input id='txinput' onkeyup=${function () { self.updateTxN(arguments[0]) }} type='text' value=${this.txNumber} placeholder=${'Transaction Number or hash (default 2) ' + this.txNumber} />
<button id='load' onclick=${function () { self.submit() }}> <button id='load' onclick=${function () { self.submit() }}>

@ -49,5 +49,9 @@ module.exports = {
}, },
inline: { inline: {
'display': 'inline-block' 'display': 'inline-block'
},
vmargin: {
'margin-top': '10px',
'margin-bottom': '10px'
} }
} }

Loading…
Cancel
Save