re-add contract size in bytes

pull/1/head
d11e9 9 years ago
parent fec3d2ce89
commit fd178df1ac
  1. 3
      libs/universal-dapp.js
  2. 8
      stylesheets/universal-dapp.css

@ -39,6 +39,9 @@ UniversalDApp.prototype.render = function () {
this.getInstanceInterface(this.contracts[c], this.contracts[c].address, $contractEl ); this.getInstanceInterface(this.contracts[c], this.contracts[c].address, $contractEl );
} else { } else {
var $title = $('<span class="title"/>').text( this.contracts[c].name ); var $title = $('<span class="title"/>').text( this.contracts[c].name );
if (this.contracts[c].bytecode) {
$title.append($('<div class="size"/>').text((this.contracts[c].bytecode.length / 2) + ' bytes'))
}
$contractEl.append( $title ).append( this.getCreateInterface( $contractEl, this.contracts[c]) ); $contractEl.append( $title ).append( this.getCreateInterface( $contractEl, this.contracts[c]) );
} }
this.$el.append( $contractEl ); this.$el.append( $contractEl );

@ -62,6 +62,14 @@
font-weight: bold; font-weight: bold;
padding-right: 2em; padding-right: 2em;
word-wrap: break-word; word-wrap: break-word;
position: relative;
}
.udapp .title .size {
position: absolute;
right: 2.2em;
top: 0.2em;
font-weight: normal;
} }
.udapp .output { .udapp .output {

Loading…
Cancel
Save