From fd178df1acb28b8fee21aaba24de7c4979e79a78 Mon Sep 17 00:00:00 2001 From: d11e9 Date: Tue, 6 Oct 2015 15:49:13 +0100 Subject: [PATCH] re-add contract size in bytes --- libs/universal-dapp.js | 3 +++ stylesheets/universal-dapp.css | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/libs/universal-dapp.js b/libs/universal-dapp.js index 5d7d6bb09d..57a0bd998f 100644 --- a/libs/universal-dapp.js +++ b/libs/universal-dapp.js @@ -39,6 +39,9 @@ UniversalDApp.prototype.render = function () { this.getInstanceInterface(this.contracts[c], this.contracts[c].address, $contractEl ); } else { var $title = $('').text( this.contracts[c].name ); + if (this.contracts[c].bytecode) { + $title.append($('
').text((this.contracts[c].bytecode.length / 2) + ' bytes')) + } $contractEl.append( $title ).append( this.getCreateInterface( $contractEl, this.contracts[c]) ); } this.$el.append( $contractEl ); diff --git a/stylesheets/universal-dapp.css b/stylesheets/universal-dapp.css index 31d4baa220..667cc99714 100644 --- a/stylesheets/universal-dapp.css +++ b/stylesheets/universal-dapp.css @@ -62,6 +62,14 @@ font-weight: bold; padding-right: 2em; word-wrap: break-word; + position: relative; +} + +.udapp .title .size { + position: absolute; + right: 2.2em; + top: 0.2em; + font-weight: normal; } .udapp .output {