Merge pull request #61 from yann300/fea1

Display/Hide connection setting
pull/7/head
yann300 8 years ago committed by GitHub
commit 7b7f154817
  1. 4
      ci/browser_tests.sh
  2. 4
      nightwatch.js
  3. 2
      package.json
  4. 4
      src/Ethdebugger.js
  5. 21
      src/TxBrowser.js
  6. 4
      src/styles/basicStyles.js

@ -2,8 +2,8 @@
SAUCECONNECT_URL="https://saucelabs.com/downloads/sc-4.3.16-linux.tar.gz"
SAUCECONNECT_USERNAME="yann300"
SAUCECONNECT_ACCESSKEY="e6f430f2-daa0-48bb-90fd-8bee20f429eb"
SAUCECONNECT_USERNAME="yanneth"
SAUCECONNECT_ACCESSKEY="1f5a4560-b02b-41aa-b52b-f033aad30870"
SAUCECONNECT_JOBIDENTIFIER="remix_tests_${TRAVIS_JOB_NUMBER}"
SAUCECONNECT_READYFILE="sc.ready"
TEST_EXITCODE=0

@ -28,8 +28,8 @@ module.exports = {
'selenium_host': 'ondemand.saucelabs.com',
'selenium_port': 80,
'silent': true,
'username': 'yann300',
'access_key': 'e6f430f2-daa0-48bb-90fd-8bee20f429eb',
'username': 'yanneth',
'access_key': '1f5a4560-b02b-41aa-b52b-f033aad30870',
'use_ssl': false,
'globals': {
'waitForConditionTimeout': 10000,

@ -1,6 +1,6 @@
{
"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",
"contributors": [
{

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

@ -6,7 +6,7 @@ var yo = require('yo-yo')
var ui = require('./helpers/ui')
var init = require('./helpers/init')
function TxBrowser (_web3) {
function TxBrowser (_web3, _displayConnectionSetting) {
util.extend(this, new EventManager())
this.web3 = _web3
@ -16,6 +16,10 @@ function TxBrowser (_web3) {
this.from
this.to
this.view
this.displayConnectionSetting = true
if (_displayConnectionSetting !== undefined) {
this.displayConnectionSetting = _displayConnectionSetting
}
this.setDefaultValues()
}
@ -113,13 +117,20 @@ TxBrowser.prototype.init = function (ev) {
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 () {
var self = this
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' />
<span>${this.connectInfo}</span>
<br />
<br />
${this.connectionSetting()}
<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} />
<button id='load' onclick=${function () { self.submit() }}>

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

Loading…
Cancel
Save