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
ac227f6a
Commit
ac227f6a
authored
Apr 04, 2019
by
Rob Stupay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updating styles in universal dapp
parent
25723964
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
universal-dapp-styles.js
src/universal-dapp-styles.js
+3
-0
universal-dapp-ui.js
src/universal-dapp-ui.js
+10
-4
No files found.
src/universal-dapp-styles.js
View file @
ac227f6a
...
@@ -58,6 +58,9 @@ var css = csjs`
...
@@ -58,6 +58,9 @@ var css = csjs`
padding-top: 5px;
padding-top: 5px;
vertical-align: top;
vertical-align: top;
}
}
.cActionsWrapper {
}
.group:after {
.group:after {
content: "";
content: "";
display: table;
display: table;
...
...
src/universal-dapp-ui.js
View file @
ac227f6a
...
@@ -68,8 +68,8 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address
...
@@ -68,8 +68,8 @@ 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
}
">
<div class="
${
css
.
title
}
alert alert-dark
">
<button onclick=
${
toggleClass
}
"><i class="fa fa-caret-square-o
-right" aria-hidden="true"></i></button>
<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>
<div class="
$
{
css
.
titleText
}
">
${
contractName
}
at
${
shortAddress
}
(
${
context
}
) </div>
${
copyToClipboard
(()
=>
address
)}
${
copyToClipboard
(()
=>
address
)}
</div>`
</div>`
...
@@ -77,14 +77,20 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address
...
@@ -77,14 +77,20 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address
var
close
=
yo
`<div class="
${
css
.
udappClose
}
" onclick=
${
remove
}
><i class="
${
css
.
closeIcon
}
fa fa-close" aria-hidden="true"></i></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
)
title
.
appendChild
(
close
)
var
contractActionsWrapper
=
yo
`
<div class="
${
css
.
cActionsWrapper
}
">
</div>`
function
remove
()
{
function
remove
()
{
instance
.
remove
()
instance
.
remove
()
// @TODO perhaps add a callack here to warn the caller that the instance has been removed
// @TODO perhaps add a callack here to warn the caller that the instance has been removed
}
}
function
toggleClass
()
{
function
toggleClass
(
e
)
{
console
.
log
(
'hit'
)
$
(
instance
).
toggleClass
(
`
${
css
.
hidesub
}
`
)
$
(
instance
).
toggleClass
(
`
${
css
.
hidesub
}
`
)
// e.currentTarget.querySelector('i')
e
.
currentTarget
.
querySelector
(
'i'
).
classList
.
toggle
(
`fa-caret-right`
)
e
.
currentTarget
.
querySelector
(
'i'
).
classList
.
toggle
(
`fa-caret-down`
)
}
}
instance
.
appendChild
(
title
)
instance
.
appendChild
(
title
)
...
...
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