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
749438cb
Commit
749438cb
authored
May 09, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
display current file name for compilation result
parent
29c76ef5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
compile-tab.js
src/app/tabs/compile-tab.js
+10
-8
No files found.
src/app/tabs/compile-tab.js
View file @
749438cb
...
@@ -131,7 +131,7 @@ class CompileTab extends CompilerApi {
...
@@ -131,7 +131,7 @@ class CompileTab extends CompilerApi {
// Update contract Selection
// Update contract Selection
let
contractMap
=
{}
let
contractMap
=
{}
if
(
success
)
this
.
compiler
.
visitContracts
((
contract
)
=>
{
contractMap
[
contract
.
name
]
=
contract
})
if
(
success
)
this
.
compiler
.
visitContracts
((
contract
)
=>
{
contractMap
[
contract
.
name
]
=
contract
})
let
contractSelection
=
this
.
contractSelection
(
Object
.
keys
(
contractMap
)
||
[])
let
contractSelection
=
this
.
contractSelection
(
Object
.
keys
(
contractMap
)
||
[]
,
source
.
target
)
yo
.
update
(
this
.
_view
.
contractSelection
,
contractSelection
)
yo
.
update
(
this
.
_view
.
contractSelection
,
contractSelection
)
if
(
data
[
'error'
])
{
if
(
data
[
'error'
])
{
...
@@ -180,18 +180,20 @@ class CompileTab extends CompilerApi {
...
@@ -180,18 +180,20 @@ class CompileTab extends CompilerApi {
* Section to select the compiled contract
* Section to select the compiled contract
* @param {string[]} contractList Names of the compiled contracts
* @param {string[]} contractList Names of the compiled contracts
*/
*/
contractSelection
(
contractList
=
[])
{
contractSelection
(
contractList
=
[]
,
sourceFile
)
{
return
contractList
.
length
!==
0
return
contractList
.
length
!==
0
?
yo
`<section class="
${
css
.
container
}
clearfix">
?
yo
`<section class="
${
css
.
container
}
clearfix">
<!-- Select Compiler Version -->
<!-- Select Compiler Version -->
<header class="navbar navbar-light bg-light input-group mb-3
${
css
.
compilerArticle
}
">
<h6 class="bg-light input-group mt-3 mb-1
${
css
.
compilerArticle
}
">
<div class="input-group-prepend">
Compilation result for <label class="border-0 px-1 text-dark">
${
sourceFile
}
</label>
</h6>
<div class="input-group-prepend">
<label class="border-0 input-group-text" for="compiledContracts">Contract</label>
<label class="border-0 input-group-text" for="compiledContracts">Contract</label>
</div>
<select onchange="
${
e
=>
this
.
selectContract
(
e
.
target
.
value
)}
" onload="
${
e
=>
{
this
.
selectedContract
=
e
.
value
}}
" id="
compiledContracts
" class="
custom
-
select
">
<select onchange="
${
e
=>
this
.
selectContract
(
e
.
target
.
value
)}
" onload="
${
e
=>
{
this
.
selectedContract
=
e
.
value
}}
" id="
compiledContracts
" class="
custom
-
select
">
${contractList.map((name) => yo`<option value="
$
{
name
}
">
${
name
}
</option>`
)}
${contractList.map((name) => yo`<option value="
$
{
name
}
">
${
name
}
</option>`
)}
<
/select
>
<
/select>
<
/header
>
<
/div
>
<
article
class
=
"${css.compilerArticle}"
>
<
article
class
=
"${css.compilerArticle}"
>
<
button
class
=
"btn btn-primary btn-block"
title
=
"Publish on Swarm"
onclick
=
"${() => { this.publish() }}"
>
<
button
class
=
"btn btn-primary btn-block"
title
=
"Publish on Swarm"
onclick
=
"${() => { this.publish() }}"
>
<
i
class
=
"${css.copyIcon} fas fa-upload"
aria
-
hidden
=
"true"
><
/i
>
<
i
class
=
"${css.copyIcon} fas fa-upload"
aria
-
hidden
=
"true"
><
/i
>
...
...
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