Commit 90a27495 authored by yann300's avatar yann300

styling

parent 27b3922e
...@@ -80,21 +80,13 @@ TxBrowser.prototype.setState = function (state) { ...@@ -80,21 +80,13 @@ TxBrowser.prototype.setState = function (state) {
} }
} }
TxBrowser.prototype.setTx = function (blockNumber, txNumber) {
this.blockNumber = blockNumber
this.txNumber = txNumber
if (this.view) {
yo.update(this.view, this.render())
}
}
TxBrowser.prototype.render = function () { TxBrowser.prototype.render = function () {
var self = this var self = this
var view = yo`<div class="${css.container}"> var view = yo`<div class="${css.container}">
<div class="${css.txContainer}"> <div class="${css.txContainer}">
<div class="${css.txinputs} p-1 input-group"> <div class="${css.txinputs} p-1 input-group">
<input value=${this.blockNumber || ''} class="form-control ${css.txinput}" onkeyup=${function () { self.updateBlockN(arguments[0]) }} type='text' placeholder=${'Block number'} /> <input value="${this.blockNumber || ''}" class="form-control ${css.txinput}" onkeyup=${function () { self.updateBlockN(arguments[0]) }} type='text' placeholder=${'Block number'} />
<input value=${this.txNumber || ''} class="form-control ${css.txinput}" id='txinput' onkeyup=${function () { self.updateTxN(arguments[0]) }} type='text' placeholder=${'Transaction index or hash'} /> <input value="${this.txNumber || ''}" class="form-control ${css.txinput}" id='txinput' onkeyup=${function () { self.updateTxN(arguments[0]) }} type='text' placeholder=${'Transaction index or hash'} />
</div> </div>
<div class="${css.txbuttons} btn-group p-1"> <div class="${css.txbuttons} btn-group p-1">
<button class='btn btn-primary btn-sm ${css.txbutton}' id='load' title='${this.debugging ? 'Stop' : 'Start'} debugging' onclick=${function () { self.submit() }}>${this.debugging ? 'Stop' : 'Start'} debugging</button> <button class='btn btn-primary btn-sm ${css.txbutton}' id='load' title='${this.debugging ? 'Stop' : 'Start'} debugging' onclick=${function () { self.submit() }}>${this.debugging ? 'Stop' : 'Start'} debugging</button>
...@@ -102,7 +94,9 @@ TxBrowser.prototype.render = function () { ...@@ -102,7 +94,9 @@ TxBrowser.prototype.render = function () {
</div> </div>
<span id='error'></span> <span id='error'></span>
</div>` </div>`
if (this.debugging) {
view.querySelectorAll('input').forEach(element => { element.setAttribute('disabled', '') })
}
if (!this.view) { if (!this.view) {
this.view = view this.view = view
} }
......
...@@ -16,8 +16,10 @@ var DropdownPanel = require('./vmDebugger/DropdownPanel') ...@@ -16,8 +16,10 @@ var DropdownPanel = require('./vmDebugger/DropdownPanel')
var css = csjs` var css = csjs`
.asmCode { .asmCode {
width: 100%;
} }
.stepDetail { .stepDetail {
width: 100%;
} }
.vmheadView { .vmheadView {
margin-top:10px; margin-top:10px;
......
...@@ -121,7 +121,7 @@ DropdownPanel.prototype.render = function (overridestyle, node) { ...@@ -121,7 +121,7 @@ DropdownPanel.prototype.render = function (overridestyle, node) {
<div class='message' style='display:none'></div> <div class='message' style='display:none'></div>
</div>` </div>`
var view = yo` var view = yo`
<div class="border border-primary rounded p-1 m-1"> <div class="border rounded p-1 m-1 bg-light">
<style> <style>
@-moz-keyframes spin { @-moz-keyframes spin {
to { -moz-transform: rotate(359deg); } to { -moz-transform: rotate(359deg); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment