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
8eaab4fc
Unverified
Commit
8eaab4fc
authored
May 22, 2019
by
yann300
Committed by
GitHub
May 22, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2006 from ethereum/master_l
fixes publish Swarm
parents
1de5dd72
0c34ac2d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
7 deletions
+39
-7
TxBrowser.js
src/app/debugger/debuggerUI/TxBrowser.js
+12
-1
compile-tab.js
src/app/tabs/compile-tab.js
+18
-5
tooltip.js
src/app/ui/tooltip.js
+9
-1
No files found.
src/app/debugger/debuggerUI/TxBrowser.js
View file @
8eaab4fc
...
@@ -18,6 +18,10 @@ var css = csjs`
...
@@ -18,6 +18,10 @@ var css = csjs`
}
}
.txinput {
.txinput {
width: inherit;
width: inherit;
font-size: small;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.txbuttons {
.txbuttons {
width: 100%;
width: 100%;
...
@@ -80,7 +84,14 @@ TxBrowser.prototype.render = function () {
...
@@ -80,7 +84,14 @@ TxBrowser.prototype.render = function () {
var
view
=
yo
`<div class="
${
css
.
container
}
">
var
view
=
yo
`<div class="
${
css
.
container
}
">
<div class="
${
css
.
txContainer
}
">
<div class="
${
css
.
txContainer
}
">
<div class="
${
css
.
txinputs
}
p-1 input-group">
<div class="
${
css
.
txinputs
}
p-1 input-group">
<input value="
${
this
.
state
.
txNumber
||
''
}
" class="form-control
${
css
.
txinput
}
" id='txinput' onkeyup=
${
function
()
{
self
.
updateTxN
(
arguments
[
0
])
}
} type='text' placeholder=
${
'Transaction hash'
}
/>
<input
value="
${
this
.
state
.
txNumber
||
''
}
"
class="form-control m-0
${
css
.
txinput
}
"
id='txinput'
onkeyup=
${
function
()
{
self
.
updateTxN
(
arguments
[
0
])
}
}
type='text'
placeholder=
${
'Transaction hash'
}
/>
</div>
</div>
<div class="
${
css
.
txbuttons
}
btn-group p-1">
<div class="
${
css
.
txbuttons
}
btn-group p-1">
<button class='btn btn-primary btn-sm
${
css
.
txbutton
}
' id='load' title='
${
this
.
state
.
debugging
?
'Stop'
:
'Start'
}
debugging' onclick=
${
function
()
{
self
.
submit
()
}
}>
${
this
.
state
.
debugging
?
'Stop'
:
'Start'
}
debugging</button>
<button class='btn btn-primary btn-sm
${
css
.
txbutton
}
' id='load' title='
${
this
.
state
.
debugging
?
'Stop'
:
'Start'
}
debugging' onclick=
${
function
()
{
self
.
submit
()
}
}>
${
this
.
state
.
debugging
?
'Stop'
:
'Start'
}
debugging</button>
...
...
src/app/tabs/compile-tab.js
View file @
8eaab4fc
...
@@ -182,14 +182,20 @@ class CompileTab extends CompilerApi {
...
@@ -182,14 +182,20 @@ class CompileTab extends CompilerApi {
* @param {string[]} contractList Names of the compiled contracts
* @param {string[]} contractList Names of the compiled contracts
*/
*/
contractSelection
(
contractList
=
[],
sourceFile
)
{
contractSelection
(
contractList
=
[],
sourceFile
)
{
return
contractList
.
length
!==
0
let
selectEl
=
yo
`
<select
onchange="
${
e
=>
this
.
selectContract
(
e
.
target
.
value
)}
"
id="compiledContracts" class="custom-select"
>
${
contractList
.
map
((
name
)
=>
yo
`<option value="
${
name
}
">
${
name
}
</option>`
)}
</select>
`
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 mb-3">
<label class="border-0 input-group-text" for="compiledContracts">Contract</label>
<label class="border-0 input-group-text" for="compiledContracts">Contract</label>
<select onchange="
${
e
=>
this
.
selectContract
(
e
.
target
.
value
)}
" onload="
${
e
=>
{
this
.
selectedContract
=
e
.
value
}}
" id="
compiledContracts
" class="
custom
-
select
">
${
selectEl
}
${contractList.map((name) => yo`<option value="
$
{
name
}
">
${
name
}
</option>`
)}
<
/select>
</div>
</div>
<article class="
${
css
.
compilerArticle
}
">
<article class="
${
css
.
compilerArticle
}
">
...
@@ -220,6 +226,13 @@ class CompileTab extends CompilerApi {
...
@@ -220,6 +226,13 @@ class CompileTab extends CompilerApi {
:
yo
`<section class="
${
css
.
container
}
clearfix"><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>`
if
(
contractList
.
length
)
{
this
.
selectedContract
=
selectEl
.
value
}
else
{
delete
this
.
selectedContract
}
return
result
}
}
// TODO : Add success alert when compilation succeed
// TODO : Add success alert when compilation succeed
...
...
src/app/ui/tooltip.js
View file @
8eaab4fc
...
@@ -8,6 +8,7 @@ var modal = require('./modal-dialog-custom')
...
@@ -8,6 +8,7 @@ var modal = require('./modal-dialog-custom')
* @param {function} [action] Returns An HTMLElement to display for action
* @param {function} [action] Returns An HTMLElement to display for action
*/
*/
module
.
exports
=
function
addTooltip
(
tooltipText
,
action
,
opts
)
{
module
.
exports
=
function
addTooltip
(
tooltipText
,
action
,
opts
)
{
action
=
action
||
function
()
{
return
yo
`<div></div>`
}
let
t
=
new
Toaster
()
let
t
=
new
Toaster
()
return
t
.
render
(
tooltipText
,
action
(
t
),
opts
)
return
t
.
render
(
tooltipText
,
action
(
t
),
opts
)
}
}
...
@@ -27,9 +28,16 @@ class Toaster {
...
@@ -27,9 +28,16 @@ class Toaster {
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
shortTooltipText
=
tooltipText
.
length
>
201
?
tooltipText
.
substring
(
0
,
200
)
+
'...'
:
tooltipText
const
shortTooltipText
=
tooltipText
.
length
>
201
?
tooltipText
.
substring
(
0
,
200
)
+
'...'
:
tooltipText
let
button
=
tooltipText
.
length
>
201
?
yo
`
<button class="btn btn-secondary btn-sm" onclick=
${()
=>
{
modal
.
alert
(
tooltipText
)
}}
>
show
full
message
<
/button
>
` : ``
this.tooltip = yo`
this.tooltip = yo`
<
div
class
=
"${css.tooltip} alert alert-info"
onmouseenter
=
$
{()
=>
{
over
()
}}
onmouseleave
=
$
{()
=>
{
out
()
}}
>
<
div
class
=
"${css.tooltip} alert alert-info"
onmouseenter
=
$
{()
=>
{
over
()
}}
onmouseleave
=
$
{()
=>
{
out
()
}}
>
<
span
>
$
{
shortTooltipText
}
<button class="btn btn-secondary btn-sm" onclick=
${()
=>
{
modal
.
alert
(
tooltipText
)
}}
>
show
full
message
<
/button></
span
>
<
span
>
$
{
shortTooltipText
}
${
button
}
</span>
${
action
}
${
action
}
</div>`
</div>`
let
timeOut
=
()
=>
{
let
timeOut
=
()
=>
{
...
...
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