pull/3094/head
LianaHus 5 years ago
parent 4c999e0edf
commit 6a68ec0213
  1. 4
      src/app/tabs/compileTab/compilerContainer.js
  2. 27
      src/universal-dapp-ui.js

@ -110,7 +110,7 @@ class CompilerContainer {
return el return el
} }
_retriveVersion () { _retrieveVersion () {
let version = this._view.versionSelector.value let version = this._view.versionSelector.value
return version.substring(9, 14) return version.substring(9, 14)
} }
@ -306,7 +306,7 @@ class CompilerContainer {
} }
_updateLanguageSelector () { _updateLanguageSelector () {
if (this._retriveVersion() < '0.5.7') { if (this._retrieveVersion() < '0.5.7') {
this._view.languageSelector.setAttribute('disabled', '') this._view.languageSelector.setAttribute('disabled', '')
this._view.languageSelector.value = 'Solidity' this._view.languageSelector.value = 'Solidity'
this.compileTabLogic.setLanguage('Solidity') this.compileTabLogic.setLanguage('Solidity')

@ -69,21 +69,36 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address
var shortAddress = helper.shortenAddress(address) var shortAddress = helper.shortenAddress(address)
var title = yo` var title = yo`
<div class="${css.title} alert alert-secondary p-2"> <div class="${css.title} alert alert-secondary p-2">
<button class="btn ${css.titleExpander}" onclick="${(e) => { toggleClass(e) }}"><i class="fas fa-angle-right" aria-hidden="true"></i></button> <button class="btn ${css.titleExpander}" onclick="${(e) => { toggleClass(e) }}">
<i class="fas fa-angle-right" aria-hidden="true"></i>
</button>
<div class="input-group ${css.nameNbuts}"> <div class="input-group ${css.nameNbuts}">
<div class="${css.titleText} input-group-prepend"><span class="input-group-text ${css.spanTitleText}"> ${contractName} at ${shortAddress} (${context})</span></div> <div class="${css.titleText} input-group-prepend">
<span class="input-group-text ${css.spanTitleText}">
${contractName} at ${shortAddress} (${context})
</span>
</div>
<div class="btn-group"> <div class="btn-group">
<button class="btn p-1 btn-secondary">${copyToClipboard(() => address)}</button> <button class="btn p-1 btn-secondary">${copyToClipboard(() => address)}</button>
</div> </div>
</div> </div>
</div>` </div>
`
var close = yo`<button class="${css.udappClose} p-1 btn btn-secondary" onclick=${remove} title="Remove from the list"><i class="${css.closeIcon} fas fa-times" aria-hidden="true"></i></button>` var close = yo`
<button
class="${css.udappClose} p-1 btn btn-secondary"
onclick=${remove}
title="Remove from the list"
>
<i class="${css.closeIcon} fas fa-times" aria-hidden="true"></i>
</button>`
title.querySelector('.btn-group').appendChild(close) title.querySelector('.btn-group').appendChild(close)
var contractActionsWrapper = yo` var contractActionsWrapper = yo`
<div class="${css.cActionsWrapper}"> <div class="${css.cActionsWrapper}">
</div>` </div>
`
function remove () { function remove () {
instance.remove() instance.remove()

Loading…
Cancel
Save