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
0a48f30b
Commit
0a48f30b
authored
Apr 17, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bouncing / spinning
parent
fef44f7d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
9 deletions
+23
-9
compile-tab.js
src/app/tabs/compile-tab.js
+9
-1
compileTab.js
src/app/tabs/compileTab/compileTab.js
+7
-1
compilerContainer.js
src/app/tabs/compileTab/compilerContainer.js
+7
-7
No files found.
src/app/tabs/compile-tab.js
View file @
0a48f30b
...
...
@@ -76,6 +76,12 @@ class CompileTab extends CompilerApi {
*/
listenToEvents
()
{
let
onContentChanged
=
()
=>
{
this
.
events
.
emit
(
'statusChanged'
,
{
key
:
'code'
,
title
:
'content changed, needs recompilation'
,
type
:
'info'
})
}
this
.
editor
.
event
.
register
(
'contentChanged'
,
onContentChanged
)
this
.
editor
.
event
.
register
(
'sessionSwitched'
,
onContentChanged
)
this
.
compiler
.
event
.
register
(
'loadingCompiler'
,
()
=>
{
this
.
events
.
emit
(
'statusChanged'
,
{
key
:
'spinner'
,
title
:
'loading compiler...'
,
type
:
'info'
})
})
...
...
@@ -84,7 +90,7 @@ class CompileTab extends CompilerApi {
this
.
events
.
emit
(
'statusChanged'
,
{
key
:
''
,
title
:
''
,
type
:
''
})
})
this
.
compile
r
.
event
.
register
(
'compilationStarted
'
,
()
=>
{
this
.
compile
TabLogic
.
event
.
on
(
'startingCompilation
'
,
()
=>
{
if
(
this
.
_view
.
errorContainer
)
{
this
.
_view
.
errorContainer
.
innerHTML
=
''
}
...
...
@@ -93,10 +99,12 @@ class CompileTab extends CompilerApi {
this
.
fileManager
.
events
.
on
(
'currentFileChanged'
,
(
name
)
=>
{
this
.
compilerContainer
.
currentFile
=
name
onContentChanged
()
})
this
.
fileManager
.
events
.
on
(
'noFileSelected'
,
()
=>
{
this
.
compilerContainer
.
currentFile
=
''
onContentChanged
()
})
this
.
compiler
.
event
.
register
(
'compilationFinished'
,
(
success
,
data
,
source
)
=>
{
...
...
src/app/tabs/compileTab/compileTab.js
View file @
0a48f30b
const
async
=
require
(
'async'
)
const
EventEmitter
=
require
(
'events'
)
var
remixTests
=
require
(
'remix-tests'
)
var
Compiler
=
require
(
'remix-solidity'
).
Compiler
var
CompilerImport
=
require
(
'../../compiler/compiler-imports'
)
...
...
@@ -9,6 +10,7 @@ const addTooltip = require('../../ui/tooltip')
class
CompileTab
{
constructor
(
queryParams
,
fileManager
,
editor
,
config
,
fileProviders
)
{
this
.
event
=
new
EventEmitter
()
this
.
queryParams
=
queryParams
this
.
compilerImport
=
new
CompilerImport
()
this
.
compiler
=
new
Compiler
((
url
,
cb
)
=>
this
.
importFileCb
(
url
,
cb
))
...
...
@@ -45,7 +47,11 @@ class CompileTab {
provider
.
get
(
target
,
(
error
,
content
)
=>
{
if
(
error
)
return
console
.
log
(
error
)
sources
[
target
]
=
{
content
}
this
.
compiler
.
compile
(
sources
,
target
)
this
.
event
.
emit
(
'startingCompilation'
)
setTimeout
(()
=>
{
// setTimeout fix the animation on chrome... (animation triggered by 'staringCompilation')
this
.
compiler
.
compile
(
sources
,
target
)
},
100
)
})
}
...
...
src/app/tabs/compileTab/compilerContainer.js
View file @
0a48f30b
...
...
@@ -47,6 +47,13 @@ class CompilerContainer {
this
.
editor
.
event
.
register
(
'contentChanged'
,
this
.
scheduleCompilation
.
bind
(
this
))
this
.
editor
.
event
.
register
(
'sessionSwitched'
,
this
.
scheduleCompilation
.
bind
(
this
))
this
.
compileTabLogic
.
event
.
on
(
'startingCompilation'
,
()
=>
{
if
(
!
this
.
_view
.
compileIcon
)
return
this
.
_view
.
compileIcon
.
setAttribute
(
'title'
,
'compiling...'
)
this
.
_view
.
compileIcon
.
classList
.
remove
(
`
${
css
.
bouncingIcon
}
`
)
this
.
_view
.
compileIcon
.
classList
.
add
(
`
${
css
.
spinningIcon
}
`
)
})
this
.
compileTabLogic
.
compiler
.
event
.
register
(
'compilationDuration'
,
(
speed
)
=>
{
if
(
!
this
.
_view
.
warnCompilationSlow
)
return
if
(
speed
>
1000
)
{
...
...
@@ -70,13 +77,6 @@ class CompilerContainer {
this
.
_view
.
warnCompilationSlow
.
style
.
visibility
=
'hidden'
})
this
.
compileTabLogic
.
compiler
.
event
.
register
(
'compilationStarted'
,
()
=>
{
if
(
!
this
.
_view
.
compileIcon
)
return
this
.
_view
.
compileIcon
.
setAttribute
(
'title'
,
'compiling...'
)
this
.
_view
.
compileIcon
.
classList
.
remove
(
`
${
css
.
bouncingIcon
}
`
)
this
.
_view
.
compileIcon
.
classList
.
add
(
`
${
css
.
spinningIcon
}
`
)
})
this
.
compileTabLogic
.
compiler
.
event
.
register
(
'compilerLoaded'
,
()
=>
{
if
(
!
this
.
_view
.
compileIcon
)
return
this
.
_view
.
compileIcon
.
setAttribute
(
'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