tuned the style of the compile tab1

pull/5370/head
LianaHus 5 years ago committed by Liana Husikyan
parent 85edcbb9bd
commit 78d6b69cfb
  1. 8
      src/app/tabs/compile-tab.js
  2. 10
      src/app/tabs/compileTab/compilerContainer.js
  3. 3
      src/app/tabs/styles/compile-tab-styles.js

@ -234,11 +234,11 @@ class CompileTab extends ViewPlugin {
let result = contractList.length let result = contractList.length
? yo`<section class="${css.container} clearfix"> ? yo`<section class="${css.container} clearfix">
<!-- Select Compiler Version --> <!-- Select Compiler Version -->
<div class="navbar navbar-light bg-light input-group mb-3"> <div class="navbar navbar-light bg-light input-group p-2 mb-3">
<label class="border-0 input-group-text" for="compiledContracts">Contract</label> <label class="border-0 input-group-text" for="compiledContracts">Contract</label>
${selectEl} ${selectEl}
</div> </div>
<article class="${css.compilerArticle}"> <article class="px-2 mt-2 pb-0">
<button class="btn btn-secondary btn-block" title="Publish on Swarm" onclick="${() => { this.publish('swarm') }}"> <button class="btn btn-secondary btn-block" title="Publish on Swarm" onclick="${() => { this.publish('swarm') }}">
<span>Publish on Swarm</span> <span>Publish on Swarm</span>
<img id="swarmLogo" class="${css.storageLogo} ml-2" src="${swarmImg}"> <img id="swarmLogo" class="${css.storageLogo} ml-2" src="${swarmImg}">
@ -267,8 +267,8 @@ class CompileTab extends ViewPlugin {
</div> </div>
</article> </article>
</section>` </section>`
: yo`<section class="${css.container} clearfix"><article class="${css.compilerArticle}"> : yo`<section class="${css.container} clearfix"><article class="px-2 mt-2 pb-0 d-flex">
<span class="alert alert-warning" role="alert">No Contract Compiled Yet</span> <span class="m-0 w-100 alert alert-warning" role="alert">No Contract Compiled Yet</span>
</article></section>` </article></section>`
if (contractList.length) { if (contractList.length) {

@ -105,7 +105,7 @@ class CompilerContainer {
if (!name) name = '' if (!name) name = ''
var displayed = name === '' ? '<no file selected>' : name var displayed = name === '' ? '<no file selected>' : name
var el = yo` var el = yo`
<div class="${css.compilerArticle}"> <div class="px-2 mt-2 pb-0 d-flex">
<button class="btn btn-primary btn-block ${name === '' ? 'disabled' : ''}" title="Compile" onclick="${this.compile.bind(this)}"> <button class="btn btn-primary btn-block ${name === '' ? 'disabled' : ''}" title="Compile" onclick="${this.compile.bind(this)}">
<span>${this._view.compileIcon} Compile ${displayed}</span> <span>${this._view.compileIcon} Compile ${displayed}</span>
</button> </button>
@ -210,7 +210,7 @@ class CompilerContainer {
<div class="col-sm-4"> <div class="col-sm-4">
<div class="d-flex flex-row justify-content-end"> <div class="d-flex flex-row justify-content-end">
<label class="${css.compilerLabel} input-group-text pr-0 border-0 w-100" for="versionSelector"> <label class="${css.compilerLabel} input-group-text pr-0 border-0 w-100" for="versionSelector">
<button class="far fa-plus-square border-0 p-0 m-2 text-dark btn-sm" onclick=${this.loadCompiler.bind(this)} title="Add a custom compiler with URL"></button> <button class="far fa-plus-square border-0 p-0 m-2 text-dark btn-sm" onclick="${(e)=>this.loadCompiler(e)}" title="Add a custom compiler with URL"></button>
Compiler Compiler
</label> </label>
</div> </div>
@ -243,7 +243,7 @@ class CompilerContainer {
${this._view.compilationButton} ${this._view.compilationButton}
</article> </article>
<!-- Config --> <!-- Config -->
<article> <article class="p-2">
<small class="${css.compilerSm}">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}">
@ -270,9 +270,7 @@ class CompilerContainer {
'Add a custom compiler', 'Add a custom compiler',
'URL', 'URL',
'', '',
(url) => { (url) => this.addCustomCompiler(url)
this.addCustomCompiler(url)
}
) )
} }

@ -1,9 +1,6 @@
const csjs = require('csjs-inject') const csjs = require('csjs-inject')
const css = csjs` const css = csjs`
.compilerArticle {
padding: 10px;
}
.title { .title {
font-size: 1.1em; font-size: 1.1em;
font-weight: bold; font-weight: bold;

Loading…
Cancel
Save