|
|
@ -195,14 +195,6 @@ module.exports = class CompileTab { |
|
|
|
if (self.data.allversions && self.data.selectedVersion) self._updateVersionSelector() |
|
|
|
if (self.data.allversions && self.data.selectedVersion) self._updateVersionSelector() |
|
|
|
self._view.version = yo`<span id="version"></span>` |
|
|
|
self._view.version = yo`<span id="version"></span>` |
|
|
|
|
|
|
|
|
|
|
|
self._view.config.solidity = yo` |
|
|
|
|
|
|
|
<div class="${css.info}"> |
|
|
|
|
|
|
|
<span>Current version:</span> ${self._view.version} |
|
|
|
|
|
|
|
<div class="${css.crow}"> |
|
|
|
|
|
|
|
${self._view.versionSelector} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div>` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self._view.warnCompilationSlow = yo`<i title="Compilation Slow" style="visibility:hidden" class="${css.warnCompilationSlow} fa fa-exclamation-triangle" aria-hidden="true"></i>` |
|
|
|
self._view.warnCompilationSlow = yo`<i title="Compilation Slow" style="visibility:hidden" class="${css.warnCompilationSlow} fa fa-exclamation-triangle" aria-hidden="true"></i>` |
|
|
|
self._view.compileIcon = yo`<i class="fa fa-refresh ${css.icon}" aria-hidden="true"></i>` |
|
|
|
self._view.compileIcon = yo`<i class="fa fa-refresh ${css.icon}" aria-hidden="true"></i>` |
|
|
|
self._view.compileButton = yo`<div class="${css.compileButton}" onclick=${compile} id="compile" title="Compile source code">${self._view.compileIcon} Start to compile</div>` |
|
|
|
self._view.compileButton = yo`<div class="${css.compileButton}" onclick=${compile} id="compile" title="Compile source code">${self._view.compileIcon} Start to compile</div>` |
|
|
@ -212,21 +204,27 @@ module.exports = class CompileTab { |
|
|
|
if (self.data.hideWarnings) self._view.hideWarningsBox.setAttribute('checked', '') |
|
|
|
if (self.data.hideWarnings) self._view.hideWarningsBox.setAttribute('checked', '') |
|
|
|
self._view.compileContainer = yo` |
|
|
|
self._view.compileContainer = yo` |
|
|
|
<div class="${css.compileContainer}"> |
|
|
|
<div class="${css.compileContainer}"> |
|
|
|
${self._view.config.solidity} |
|
|
|
<div class="${css.info}"> |
|
|
|
<div class="${css.compileButtons}"> |
|
|
|
<span>Current version:</span> ${self._view.version} |
|
|
|
${self._view.compileButton} |
|
|
|
|
|
|
|
${self._view.warnCompilationSlow} |
|
|
|
|
|
|
|
<div class="${css.autocompileContainer}"> |
|
|
|
|
|
|
|
${self._view.autoCompile} |
|
|
|
|
|
|
|
<span class="${css.autocompileText}">Auto compile</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="${css.crow}"> |
|
|
|
<div class="${css.crow}"> |
|
|
|
<div>${self._view.optimize}</div> |
|
|
|
${self._view.versionSelector} |
|
|
|
<span class="${css.checkboxText}">Enable Optimization</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class=${css.hideWarningsContainer}> |
|
|
|
<div class="${css.compileButtons}"> |
|
|
|
${self._view.hideWarningsBox} |
|
|
|
<div class=${css.checkboxes}> |
|
|
|
<span class="${css.autocompileText}">Hide warnings</span> |
|
|
|
<div class="${css.autocompileContainer}"> |
|
|
|
|
|
|
|
${self._view.autoCompile} |
|
|
|
|
|
|
|
<span class="${css.autocompileText}">Auto compile</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="${css.optimizeContainer}"> |
|
|
|
|
|
|
|
<div>${self._view.optimize}</div> |
|
|
|
|
|
|
|
<span class="${css.checkboxText}">Enable Optimization</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class=${css.hideWarningsContainer}> |
|
|
|
|
|
|
|
${self._view.hideWarningsBox} |
|
|
|
|
|
|
|
<span class="${css.autocompileText}">Hide warnings</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
${self._view.compileButton} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div>` |
|
|
|
</div>` |
|
|
@ -237,10 +235,12 @@ module.exports = class CompileTab { |
|
|
|
<div class="${css.container}"> |
|
|
|
<div class="${css.container}"> |
|
|
|
<div class="${css.contractContainer}"> |
|
|
|
<div class="${css.contractContainer}"> |
|
|
|
${self._view.contractNames} |
|
|
|
${self._view.contractNames} |
|
|
|
|
|
|
|
<div title="Publish on Swarm" class="${css.publish}" onclick=${publish}> |
|
|
|
|
|
|
|
<i class="${css.copyIcon} fa fa-upload" aria-hidden="true"></i><span>Swarm</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="${css.contractHelperButtons}"> |
|
|
|
<div class="${css.contractHelperButtons}"> |
|
|
|
<div title="Display Contract Details" class="${css.details}" onclick=${details}>Details</div> |
|
|
|
<div title="Display Contract Details" class="${css.details}" onclick=${details}>Details</div> |
|
|
|
<div title="Publish on Swarm" class="${css.publish}" onclick=${publish}>Publish on Swarm</div> |
|
|
|
|
|
|
|
<div title="Copy ABI to clipboard" class="${css.copyButton}" onclick=${copyABI}> |
|
|
|
<div title="Copy ABI to clipboard" class="${css.copyButton}" onclick=${copyABI}> |
|
|
|
<i class="${css.copyIcon} fa fa-clipboard" aria-hidden="true"></i> ABI |
|
|
|
<i class="${css.copyIcon} fa fa-clipboard" aria-hidden="true"></i> ABI |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -462,7 +462,7 @@ const css = csjs` |
|
|
|
} |
|
|
|
} |
|
|
|
.select { |
|
|
|
.select { |
|
|
|
font-weight: bold; |
|
|
|
font-weight: bold; |
|
|
|
margin-top: 1em; |
|
|
|
margin: 10px 0px; |
|
|
|
${styles.rightPanel.settingsTab.dropdown_SelectCompiler}; |
|
|
|
${styles.rightPanel.settingsTab.dropdown_SelectCompiler}; |
|
|
|
} |
|
|
|
} |
|
|
|
.info { |
|
|
|
.info { |
|
|
@ -509,6 +509,7 @@ const css = csjs` |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
align-items: center; |
|
|
|
flex-wrap: wrap; |
|
|
|
flex-wrap: wrap; |
|
|
|
|
|
|
|
justify-content: flex-end; |
|
|
|
} |
|
|
|
} |
|
|
|
.name { |
|
|
|
.name { |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
@ -516,11 +517,16 @@ const css = csjs` |
|
|
|
.size { |
|
|
|
.size { |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.checkboxes { |
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
width: 100%; |
|
|
|
|
|
|
|
justify-content: space-between; |
|
|
|
|
|
|
|
flex-wrap: wrap; |
|
|
|
|
|
|
|
} |
|
|
|
.compileButton { |
|
|
|
.compileButton { |
|
|
|
${styles.rightPanel.compileTab.button_Compile}; |
|
|
|
${styles.rightPanel.compileTab.button_Compile}; |
|
|
|
width: 120px; |
|
|
|
width: 100%; |
|
|
|
min-width: 110px; |
|
|
|
margin: 15px 0 10px 0; |
|
|
|
margin-right: 1%; |
|
|
|
|
|
|
|
font-size: 12px; |
|
|
|
font-size: 12px; |
|
|
|
} |
|
|
|
} |
|
|
|
.container { |
|
|
|
.container { |
|
|
@ -533,13 +539,19 @@ const css = csjs` |
|
|
|
align-items: center; |
|
|
|
align-items: center; |
|
|
|
margin-bottom: 2%; |
|
|
|
margin-bottom: 2%; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.optimizeContainer { |
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
} |
|
|
|
.contractNames { |
|
|
|
.contractNames { |
|
|
|
${styles.rightPanel.compileTab.dropdown_CompileContract}; |
|
|
|
${styles.rightPanel.compileTab.dropdown_CompileContract}; |
|
|
|
|
|
|
|
width:78%; |
|
|
|
} |
|
|
|
} |
|
|
|
.contractHelperButtons { |
|
|
|
.contractHelperButtons { |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
cursor: pointer; |
|
|
|
cursor: pointer; |
|
|
|
text-align: center; |
|
|
|
text-align: center; |
|
|
|
|
|
|
|
justify-content: flex-end; |
|
|
|
|
|
|
|
margin: 15px 15px 10px 0; |
|
|
|
} |
|
|
|
} |
|
|
|
.copyButton { |
|
|
|
.copyButton { |
|
|
|
${styles.rightPanel.compileTab.button_Details}; |
|
|
|
${styles.rightPanel.compileTab.button_Details}; |
|
|
@ -547,6 +559,8 @@ const css = csjs` |
|
|
|
min-width: 50px; |
|
|
|
min-width: 50px; |
|
|
|
width: auto; |
|
|
|
width: auto; |
|
|
|
margin-left: 5px; |
|
|
|
margin-left: 5px; |
|
|
|
|
|
|
|
background-color: inherit; |
|
|
|
|
|
|
|
border: inherit; |
|
|
|
} |
|
|
|
} |
|
|
|
.bytecodeButton { |
|
|
|
.bytecodeButton { |
|
|
|
min-width: 80px; |
|
|
|
min-width: 80px; |
|
|
@ -556,12 +570,14 @@ const css = csjs` |
|
|
|
} |
|
|
|
} |
|
|
|
.details { |
|
|
|
.details { |
|
|
|
${styles.rightPanel.compileTab.button_Details}; |
|
|
|
${styles.rightPanel.compileTab.button_Details}; |
|
|
|
|
|
|
|
min-width: 70px; |
|
|
|
|
|
|
|
width: 80px; |
|
|
|
} |
|
|
|
} |
|
|
|
.publish { |
|
|
|
.publish { |
|
|
|
${styles.rightPanel.compileTab.button_Publish}; |
|
|
|
display: flex; |
|
|
|
margin-left: 5px; |
|
|
|
align-items: center; |
|
|
|
margin-right: 5px; |
|
|
|
margin-left: 10px; |
|
|
|
width: 120px; |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
} |
|
|
|
.log { |
|
|
|
.log { |
|
|
|
${styles.rightPanel.compileTab.box_CompileContainer}; |
|
|
|
${styles.rightPanel.compileTab.box_CompileContainer}; |
|
|
|