Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
121ffa83
Commit
121ffa83
authored
Apr 04, 2019
by
Rob Stupay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getting boostrap into the instance & multiparam manager
parent
ac227f6a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
17 deletions
+34
-17
run-tab-styles.js
src/app/tabs/styles/run-tab-styles.js
+1
-1
universal-dapp-styles.js
src/universal-dapp-styles.js
+20
-8
universal-dapp-ui.js
src/universal-dapp-ui.js
+13
-8
No files found.
src/app/tabs/styles/run-tab-styles.js
View file @
121ffa83
...
...
@@ -117,7 +117,7 @@ var css = csjs`
margin: 0;
min-width: 100px;
width: 100px;
font-size: 10px;
/* font-size: 10px; */
word-break: inherit;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
...
...
src/universal-dapp-styles.js
View file @
121ffa83
...
...
@@ -10,13 +10,14 @@ var css = csjs`
justify-content: space-between;
align-items: center;
font-size: 11px;
height: 30px;
width: 97%;
/* height: 30px; */
/* width: 97%; */
overflow: hidden;
word-break: break-word;
line-height: initial;
overflow: visible;
margin-bottom: 10px;
margin-bottom: 0px;
padding-left: 10px;
}
.noInstancesText {
...
...
@@ -26,7 +27,7 @@ var css = csjs`
align-items: baseline;
}
.titleText {
margin-right: 1em;
/* margin-right: 1em; */
word-break: break-word;
min-width: 230px;
}
...
...
@@ -34,12 +35,18 @@ var css = csjs`
.title .copy {
color: var(--primary);
}
.titleExpander {
margin-right: 10px;
}
.nameNbuts {
flex-wrap: nowrap;
}
.instance {
min-width: 310px;
display: block;
/* display: flex; */
flex-direction: column;
padding: 5px 0 0 10px;
/* padding: 5px 0 0 10px; */
margin-bottom: 10px;
}
.instance.hidesub .title {
...
...
@@ -59,7 +66,12 @@ var css = csjs`
vertical-align: top;
}
.cActionsWrapper {
padding: 10px;
border: 1px solid rgba(0,0,0,0.125);
border-top-left-radius: 0;
border-bottom-left-radius: 0.25rem;
border-top-rightt-radius: 0;
border-bottom-right-radius: 0.25rem;
}
.group:after {
content: "";
...
...
@@ -184,7 +196,7 @@ var css = csjs`
.contractProperty.constant .multiTitle {
display: inline-block;
width: 90%;
font-size: 10px;
/* font-size: 10px; */
height: 25px;
padding-left: 20px;
font-weight: bold;
...
...
@@ -232,7 +244,7 @@ var css = csjs`
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-right: 0;
height: 25px;
/* height: 25px; */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
...
...
src/universal-dapp-ui.js
View file @
121ffa83
...
...
@@ -63,19 +63,23 @@ UniversalDAppUI.prototype.renderInstance = function (contract, address, contract
UniversalDAppUI
.
prototype
.
renderInstanceFromABI
=
function
(
contractABI
,
address
,
contractName
)
{
var
self
=
this
address
=
(
address
.
slice
(
0
,
2
)
===
'0x'
?
''
:
'0x'
)
+
address
.
toString
(
'hex'
)
var
instance
=
yo
`<div class="instance
card
${
css
.
instance
}
${
css
.
hidesub
}
" id="instance
${
address
}
"></div>`
var
instance
=
yo
`<div class="instance
${
css
.
instance
}
${
css
.
hidesub
}
" id="instance
${
address
}
"></div>`
var
context
=
self
.
udapp
.
context
()
var
shortAddress
=
helper
.
shortenAddress
(
address
)
var
title
=
yo
`
<div class="
${
css
.
title
}
alert alert-dark">
<button onclick="
${(
e
)
=>
{
toggleClass
(
e
)
}}
"><i class="
fa
fa
-
caret
-
right
" aria-hidden="
true
"></i></button>
<div class="
$
{
css
.
titleText
}
">
${
contractName
}
at
${
shortAddress
}
(
${
context
}
) </div>
${
copyToClipboard
(()
=>
address
)}
<button class="btn btn-light
${
css
.
titleExpander
}
" onclick="
${(
e
)
=>
{
toggleClass
(
e
)
}}
"><i class="
fa
fa
-
caret
-
right
" aria-hidden="
true
"></i></button>
<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="btn-group">
<button class="btn btn-secondary">
${
copyToClipboard
(()
=>
address
)}
</button>
</div>
</div>
</div>`
var
close
=
yo
`<
div class="
${
css
.
udappClose
}
" onclick=
${
remove
}
><i class="
${
css
.
closeIcon
}
fa fa-close" aria-hidden="true"></i></div
>`
title
.
appendChild
(
close
)
var
close
=
yo
`<
button class="
${
css
.
udappClose
}
btn btn-secondary" onclick=
${
remove
}
><i class="
${
css
.
closeIcon
}
fa fa-close" aria-hidden="true"></i></button
>`
title
.
querySelector
(
'.btn-group'
).
appendChild
(
close
)
var
contractActionsWrapper
=
yo
`
<div class="
${
css
.
cActionsWrapper
}
">
...
...
@@ -94,11 +98,12 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address
}
instance
.
appendChild
(
title
)
instance
.
appendChild
(
contractActionsWrapper
)
// Add the fallback function
var
fallback
=
self
.
udapp
.
getFallbackInterface
(
contractABI
)
if
(
fallback
)
{
instance
.
appendChild
(
this
.
getCallButton
({
contractActionsWrapper
.
appendChild
(
this
.
getCallButton
({
funABI
:
fallback
,
address
:
address
,
contractAbi
:
contractABI
,
...
...
@@ -111,7 +116,7 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address
return
}
// @todo getData cannot be used with overloaded functions
instance
.
appendChild
(
this
.
getCallButton
({
contractActionsWrapper
.
appendChild
(
this
.
getCallButton
({
funABI
:
funABI
,
address
:
address
,
contractAbi
:
contractABI
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment