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
99f237db
Commit
99f237db
authored
Mar 29, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove loadCompiler use compiler directly
parent
3f8b8716
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
13 deletions
+8
-13
app.js
src/app.js
+2
-7
settings-tab.js
src/app/tabs/settings-tab.js
+6
-6
No files found.
src/app.js
View file @
99f237db
...
...
@@ -767,17 +767,11 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
compiler
.
setOptimize
(
optimize
)
if
(
runCompilation
)
runCompiler
()
},
loadCompiler
:
(
usingWorker
,
url
)
=>
{
compiler
.
loadVersion
(
usingWorker
,
url
)
},
runCompiler
:
()
=>
{
runCompiler
()
},
logMessage
:
(
msg
)
=>
{
self
.
_components
.
editorpanel
.
log
({
type
:
'log'
,
value
:
msg
})
},
getCompilationResult
:
()
=>
{
return
compiler
.
lastCompilationResult
}
}
var
rhpEvents
=
{
...
...
@@ -789,7 +783,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
}
var
rhpOpts
=
{
pluginAPI
:
new
PluginAPI
(
self
,
compiler
),
udapp
:
udapp
udapp
:
udapp
,
compiler
:
compiler
}
self
.
_components
.
righthandpanel
=
new
RighthandPanel
(
rhpAPI
,
rhpEvents
,
rhpOpts
)
...
...
src/app/tabs/settings-tab.js
View file @
99f237db
...
...
@@ -178,7 +178,7 @@ function SettingsTab (appAPI = {}, appEvents = {}, opts = {}) {
// load the new version upon change
versionSelector
.
addEventListener
(
'change'
,
function
()
{
loadVersion
(
versionSelector
.
value
,
queryParams
,
appAPI
,
el
)
loadVersion
(
versionSelector
.
value
,
queryParams
,
opts
.
compiler
,
el
)
})
var
header
=
new
Option
(
'Select new compiler version'
)
...
...
@@ -195,7 +195,7 @@ function SettingsTab (appAPI = {}, appEvents = {}, opts = {}) {
// loading failed for some reason, fall back to local compiler
versionSelector
.
append
(
new
Option
(
'latest local version'
,
'builtin'
))
loadVersion
(
'builtin'
,
queryParams
,
appAPI
,
el
)
loadVersion
(
'builtin'
,
queryParams
,
opts
.
compiler
,
el
)
return
}
...
...
@@ -217,7 +217,7 @@ function SettingsTab (appAPI = {}, appEvents = {}, opts = {}) {
selectedVersion
=
queryParams
.
get
().
version
}
loadVersion
(
selectedVersion
,
queryParams
,
appAPI
,
el
)
loadVersion
(
selectedVersion
,
queryParams
,
opts
.
compiler
,
el
)
})
return
{
render
()
{
return
el
}
}
...
...
@@ -227,7 +227,7 @@ function setVersionText (text, el) {
el
.
querySelector
(
'#version'
).
innerText
=
text
}
function
loadVersion
(
version
,
queryParams
,
appAPI
,
el
)
{
function
loadVersion
(
version
,
queryParams
,
compiler
,
el
)
{
queryParams
.
update
({
version
:
version
})
var
url
if
(
version
===
'builtin'
)
{
...
...
@@ -253,10 +253,10 @@ function loadVersion (version, queryParams, appAPI, el) {
// Workers cannot load js on "file:"-URLs and we get a
// "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium,
// resort to non-worker version in that case.
appAPI
.
loadCompiler
(
true
,
url
)
compiler
.
loadVersion
(
true
,
url
)
setVersionText
(
'(loading using worker)'
,
el
)
}
else
{
appAPI
.
loadCompiler
(
false
,
url
)
compiler
.
loadVersion
(
false
,
url
)
setVersionText
(
'(loading)'
,
el
)
}
}
...
...
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