Merge pull request #1886 from ethereum/bootstrap_runtab_aliscious

Bootstrap runtab aliscious
pull/1/head
yann300 6 years ago committed by GitHub
commit ed434c5c7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/multiParamManager.js
  2. 29
      src/universal-dapp-styles.js
  3. 10
      src/universal-dapp-ui.js

@ -168,7 +168,7 @@ class MultiParamManager {
} else { } else {
return encodeObj.data return encodeObj.data
} }
}, 'Encode values of input fields & copy to clipboard', 'fa-briefcase')} }, 'Encode values of input fields & copy to clipboard', 'fa-clipboard')}
</div> </div>
</div> </div>
</div>` </div>`

@ -17,7 +17,8 @@ var css = csjs`
line-height: initial; line-height: initial;
overflow: visible; overflow: visible;
margin-bottom: 0px; margin-bottom: 0px;
padding-left: 10px; padding-left: 0px;
padding-right: 10px;
} }
.noInstancesText { .noInstancesText {
@ -29,7 +30,13 @@ var css = csjs`
.titleText { .titleText {
/* margin-right: 1em; */ /* margin-right: 1em; */
word-break: break-word; word-break: break-word;
min-width: 230px; min-width: 170px;
width: 100%;
}
.spanTitleText {
/* font-size: .8rem; */
font-size: 11px;
width:100%;
} }
.inputGroupText { .inputGroupText {
width: 100%; width: 100%;
@ -38,10 +45,12 @@ var css = csjs`
color: var(--primary); color: var(--primary);
} }
.titleExpander { .titleExpander {
margin-right: 10px; /* margin-right: 10px; */
padding: 5px 7px;
} }
.nameNbuts { .nameNbuts {
flex-wrap: nowrap; flex-wrap: nowrap;
width: 100%;
} }
.instance { .instance {
display: block; display: block;
@ -67,7 +76,7 @@ var css = csjs`
vertical-align: top; vertical-align: top;
} }
.cActionsWrapper { .cActionsWrapper {
padding: 10px; padding: 0px 0 10px 10px;
border: 1px solid rgba(0,0,0,0.125); border: 1px solid rgba(0,0,0,0.125);
border-top-left-radius: 0; border-top-left-radius: 0;
border-bottom-left-radius: 0.25rem; border-bottom-left-radius: 0.25rem;
@ -164,7 +173,7 @@ var css = csjs`
} }
.contractActionsContainerMultiInner { .contractActionsContainerMultiInner {
margin-bottom: 10px; margin-bottom: 10px;
padding: 0px 5px 5px 0px; padding: 0px 5px 5px 5px;
background-color: var(--light); background-color: var(--light);
width: 99%; width: 99%;
border-radius: 3px; border-radius: 3px;
@ -187,6 +196,7 @@ var css = csjs`
font-weight: bold; font-weight: bold;
line-height: 25px; line-height: 25px;
cursor: default; cursor: default;
padding-top: 5px;
} }
.contractProperty .contractActionsContainerMultiInner .multiArg label{ .contractProperty .contractActionsContainerMultiInner .multiArg label{
text-align: right; text-align: right;
@ -207,7 +217,8 @@ var css = csjs`
} }
.multiArg { .multiArg {
margin-bottom: 8px; margin-bottom: 8px;
display: flex; /* display: flex; */
clear:both;
} }
.multiArg input{ .multiArg input{
padding: 5px; padding: 5px;
@ -217,7 +228,9 @@ var css = csjs`
float: left; float: left;
margin-right: 6px; margin-right: 6px;
font-size: 10px; font-size: 10px;
min-width: 30%; width: 30%;
padding-top: 5px;
word-break: break-all;
} }
.multiArg button { .multiArg button {
border-radius: 3px; border-radius: 3px;
@ -232,7 +245,7 @@ var css = csjs`
} }
.hasArgs .multiArg input { .hasArgs .multiArg input {
border-left: 1px solid #dddddd; border-left: 1px solid #dddddd;
width: 100%; width: 67%;
} }
.hasArgs input { .hasArgs input {
display: block; display: block;

@ -68,10 +68,10 @@ 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-dark"> <div class="${css.title} alert alert-secondary">
<button class="btn btn-light ${css.titleExpander}" onclick="${(e) => { toggleClass(e) }}"><i class="fas fa-caret-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"> ${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 btn-secondary">${copyToClipboard(() => address)}</button> <button class="btn btn-secondary">${copyToClipboard(() => address)}</button>
</div> </div>
@ -93,8 +93,8 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address
function toggleClass (e) { function toggleClass (e) {
$(instance).toggleClass(`${css.hidesub}`) $(instance).toggleClass(`${css.hidesub}`)
// e.currentTarget.querySelector('i') // e.currentTarget.querySelector('i')
e.currentTarget.querySelector('i').classList.toggle(`fa-caret-right`) e.currentTarget.querySelector('i').classList.toggle(`fa-angle-right`)
e.currentTarget.querySelector('i').classList.toggle(`fa-caret-down`) e.currentTarget.querySelector('i').classList.toggle(`fa-angle-down`)
} }
instance.appendChild(title) instance.appendChild(title)

Loading…
Cancel
Save