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
465bd76f
Commit
465bd76f
authored
May 12, 2021
by
aniket-engg
Committed by
Aniket
May 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable checkbox UI
parent
29b4eb7e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
compile-tab.js
apps/remix-ide/src/app/tabs/compile-tab.js
+6
-0
compileTab.js
apps/remix-ide/src/app/tabs/compileTab/compileTab.js
+6
-1
compilerContainer.js
apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js
+5
-0
No files found.
apps/remix-ide/src/app/tabs/compile-tab.js
View file @
465bd76f
...
...
@@ -90,6 +90,12 @@ class CompileTab extends ViewPlugin {
*/
listenToEvents
()
{
this
.
on
(
'filePanel'
,
'setWorkspace'
,
(
workspace
)
=>
{
this
.
compileTabLogic
.
isHardhatProject
().
then
((
result
)
=>
{
if
(
result
)
this
.
compilerContainer
.
hardhatCompilation
.
style
.
display
=
'flex'
})
})
this
.
data
.
eventHandlers
.
onContentChanged
=
()
=>
{
this
.
emit
(
'statusChanged'
,
{
key
:
'edited'
,
title
:
'the content has changed, needs recompilation'
,
type
:
'info'
})
}
...
...
apps/remix-ide/src/app/tabs/compileTab/compileTab.js
View file @
465bd76f
...
...
@@ -78,11 +78,16 @@ class CompileTab {
})
}
async
isHardhatProject
()
{
if
(
this
.
fileManager
.
mode
===
'localhost'
)
{
return
await
this
.
fileManager
.
exists
(
'hardhat.config.js'
)
}
else
return
false
}
runCompiler
()
{
try
{
console
.
log
(
'mode is - '
,
this
.
fileManager
.
mode
)
if
(
this
.
fileManager
.
mode
===
'localhost'
)
{
console
.
log
(
'calling compilehardhat'
)
const
{
currentVersion
,
optimize
,
runs
}
=
this
.
compiler
.
state
const
fileContent
=
`module.exports = {
solidity: '
${
currentVersion
.
substring
(
0
,
currentVersion
.
indexOf
(
'+commit'
))}
',
...
...
apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js
View file @
465bd76f
...
...
@@ -183,6 +183,10 @@ class CompilerContainer {
}
})
this
.
hardhatCompilation
=
yo
`<div class="mt-2
${
css
.
compilerConfig
}
custom-control custom-checkbox" style="display:none">
<input class="
${
css
.
autocompile
}
custom-control-input" id="enableHardhat" type="checkbox" title="Enable Hardhat Compilation">
<label class="form-check-label custom-control-label" for="enableHardhat">Enable Hardhat Compilation</label>
</div>`
this
.
_view
.
warnCompilationSlow
=
yo
`<i title="Compilation Slow" style="visibility:hidden" class="
${
css
.
warnCompilationSlow
}
fas fa-exclamation-triangle" aria-hidden="true"></i>`
this
.
_view
.
compileIcon
=
yo
`<i class="fas fa-sync
${
css
.
icon
}
" aria-hidden="true"></i>`
this
.
_view
.
autoCompile
=
yo
`<input class="
${
css
.
autocompile
}
custom-control-input" onchange=
${()
=>
this
.
updateAutoCompile
()}
data-id="compilerContainerAutoCompile" id="autoCompile" type="checkbox" title="Auto compile">`
...
...
@@ -299,6 +303,7 @@ class CompilerContainer {
<label class="form-check-label custom-control-label" for="hideWarningsBox">Hide warnings</label>
</div>
</div>
${
this
.
hardhatCompilation
}
${
this
.
_view
.
compilationButton
}
</header>
</article>
...
...
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