Merge pull request #941 from ethereum/warn_comp_fail2

warning on run-tab for compiler failure
pull/1/head
yann300 7 years ago committed by GitHub
commit a646f103dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      src/app/tabs/run-tab.js

@ -85,13 +85,16 @@ var css = csjs`
.contractNames {
${styles.rightPanel.runTab.dropdown_RunTab}
width: 100%;
border: 1px solid
}
.contractNamesError {
border: 1px solid ${styles.appProperties.errorText_Color}
}
.subcontainer {
display: flex;
flex-direction: row;
align-items: baseline;
}
.button {
display: flex;
align-items: center;
@ -151,15 +154,11 @@ var css = csjs`
margin-left: 10%;
}
.errorIcon {
color: ${styles.colors.red};
margin-left: 15px;
}
.errorIcon {
color: ${styles.colors.red};
color: ${styles.appProperties.errorText_Color};
margin-left: 15px;
}
.failDesc {
color: ${styles.colors.red};
color: ${styles.appProperties.errorText_Color};
padding-left: 10px;
display: inline;
}
@ -357,13 +356,15 @@ function makeRecorder (events, appAPI, appEvents) {
function contractDropdown (events, appAPI, appEvents, instanceContainer) {
instanceContainer.appendChild(noInstancesText)
var compFails = yo`<i title="Contract compilation failed. Please check the compile tab for more information." class="fa fa-thumbs-down ${css.errorIcon}" ></i>`
var compFails = yo`<i title="Contract compilation failed. Please check the compile tab for more information." class="fa fa-times-circle ${css.errorIcon}" ></i>`
appEvents.compiler.register('compilationFinished', function (success, data, source) {
getContractNames(success, data)
if (success) {
compFails.style.display = 'none'
document.querySelector(`.${css.contractNames}`).classList.remove(css.contractNamesError)
} else {
compFails.style.display = 'block'
document.querySelector(`.${css.contractNames}`).classList.add(css.contractNamesError)
}
})

Loading…
Cancel
Save