Merge pull request #1802 from ethereum/bootstrap_compiletab_tighten

Bootstrap compiletab tighten
pull/1/head
yann300 6 years ago committed by GitHub
commit d59c05b44e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      src/app/tabs/compile-tab.js
  2. 2
      src/app/tabs/compileTab/compilerContainer.js
  3. 9
      src/app/tabs/styles/compile-tab-styles.js

@ -161,7 +161,7 @@ class CompileTab extends ApiFactory {
*/ */
contractSelection (contractList = []) { contractSelection (contractList = []) {
return contractList.length !== 0 return contractList.length !== 0
? yo`<section class="${css.container}"> ? yo`<section class="${css.container} clearfix">
<!-- Select Compiler Version --> <!-- Select Compiler Version -->
<header class="navbar navbar-light bg-light input-group mb-3 ${css.compilerArticle}"> <header class="navbar navbar-light bg-light input-group mb-3 ${css.compilerArticle}">
<div class="input-group-prepend"> <div class="input-group-prepend">
@ -181,8 +181,11 @@ class CompileTab extends ApiFactory {
</button> </button>
<!-- Copy to Clipboard --> <!-- Copy to Clipboard -->
<div class="${css.contractHelperButtons}"> <div class="${css.contractHelperButtons}">
<span class="${css.copyToClipboard}">Copy to Clipboard : </span> <div class="input-group">
<div class="btn-group" role="group" aria-label="Copy to clipboard"> <div class="input-group-prepend">
<span class="input-group-text">Copy to clipboard</span>
</div>
<div class="btn-group" role="group" aria-label="Copy to Clipboard">
<button class="btn btn-secondary" title="Copy ABI to clipboard" onclick="${() => { this.copyABI() }}"> <button class="btn btn-secondary" title="Copy ABI to clipboard" onclick="${() => { this.copyABI() }}">
<i class="${css.copyIcon} fa fa-clipboard" aria-hidden="true"></i> <i class="${css.copyIcon} fa fa-clipboard" aria-hidden="true"></i>
<span>ABI</span> <span>ABI</span>
@ -193,9 +196,10 @@ class CompileTab extends ApiFactory {
</button> </button>
</div> </div>
</div> </div>
</div>
</article> </article>
</section>` </section>`
: yo`<section class="${css.container}"><article class="${css.compilerArticle}"> : yo`<section class="${css.container} clearfix"><article class="${css.compilerArticle}">
<span class="alert alert-warning" role="alert">No Contract Compiled Yet</span> <span class="alert alert-warning" role="alert">No Contract Compiled Yet</span>
</article></section>` </article></section>`
} }
@ -347,7 +351,7 @@ class CompileTab extends ApiFactory {
this.listenToEvents() this.listenToEvents()
this.compilerContainer.activate() this.compilerContainer.activate()
this._view.errorContainer = yo`<div></div>` this._view.errorContainer = yo`<div class="${css.errorBlobs}"></div>`
this._view.contractSelection = this.contractSelection() this._view.contractSelection = this.contractSelection()
this._view.compilerContainer = this.compilerContainer.render() this._view.compilerContainer = this.compilerContainer.render()
const currentFile = this.fileManager.currentFile() const currentFile = this.fileManager.currentFile()

@ -149,7 +149,7 @@ class CompilerContainer {
</article> </article>
<!-- Config --> <!-- Config -->
<article> <article>
<small>Compiler Configuration</small> <small class="${css.compilerSm}">Compiler Configuration</small>
<ul class="list-group list-group-flush"> <ul class="list-group list-group-flush">
<li class="list-group-item form-group ${css.compilerConfig}"> <li class="list-group-item form-group ${css.compilerConfig}">
${this._view.autoCompile} ${this._view.autoCompile}

@ -67,6 +67,9 @@ const css = csjs`
.compilerConfig label { .compilerConfig label {
margin: 0; margin: 0;
} }
.compilerSm {
padding-left: 1.25rem;
}
.name { .name {
display: flex; display: flex;
} }
@ -99,9 +102,9 @@ const css = csjs`
.contractHelperButtons { .contractHelperButtons {
margin-top: 10px; margin-top: 10px;
display: flex; display: flex;
cursor: pointer;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
float: right;
} }
.copyToClipboard { .copyToClipboard {
font-size: 1rem; font-size: 1rem;
@ -146,6 +149,10 @@ const css = csjs`
margin-right: .3em; margin-right: .3em;
animation: bounce 2s infinite; animation: bounce 2s infinite;
} }
.errorBlobs {
padding-left: 5px;
padding-right: 5px;
}
@keyframes spin { @keyframes spin {
0% { transform: rotate(0deg); } 0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); } 100% { transform: rotate(360deg); }

Loading…
Cancel
Save