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
9d1361ce
Unverified
Commit
9d1361ce
authored
Aug 25, 2021
by
David Disu
Committed by
GitHub
Aug 25, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1510 from ethereum/issue1491
'autoCompile' param of URL and 'Solidity plugin' as default when loading a code sample
parents
4339b4e5
af63ecb2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
11 deletions
+20
-11
url.spec.ts
apps/remix-ide-e2e/src/tests/url.spec.ts
+2
-1
app.js
apps/remix-ide/src/app.js
+8
-2
framingService.js
apps/remix-ide/src/framingService.js
+6
-6
compiler-container.tsx
...remix-ui/solidity-compiler/src/lib/compiler-container.tsx
+4
-2
No files found.
apps/remix-ide-e2e/src/tests/url.spec.ts
View file @
9d1361ce
...
...
@@ -71,13 +71,14 @@ module.exports = {
'Should load using URL compiler params'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
pause
(
5000
)
.
url
(
'http://127.0.0.1:8080/#optimize=true&runs=300&evmVersion=istanbul&version=soljson-v0.7.4+commit.3f05b770.js'
)
.
url
(
'http://127.0.0.1:8080/#optimize=true&runs=300&
autoCompile=true&
evmVersion=istanbul&version=soljson-v0.7.4+commit.3f05b770.js'
)
.
refresh
()
.
pause
(
5000
)
.
clickLaunchIcon
(
'solidity'
)
.
assert
.
containsText
(
'#versionSelector option[data-id="selected"]'
,
'0.7.4+commit.3f05b770'
)
.
assert
.
containsText
(
'#evmVersionSelector option[data-id="selected"]'
,
'istanbul'
)
.
verify
.
elementPresent
(
'#optimize:checked'
)
.
verify
.
elementPresent
(
'#autoCompile:checked'
)
.
verify
.
attributeEquals
(
'#runs'
,
'value'
,
'300'
)
},
...
...
apps/remix-ide/src/app.js
View file @
9d1361ce
...
...
@@ -495,8 +495,13 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
console
.
log
(
e
)
}
// If plugins are loaded from the URL params, we focus on the last one.
if
(
pluginLoader
.
current
===
'queryParams'
&&
workspace
.
length
>
0
)
menuicons
.
select
(
workspace
[
workspace
.
length
-
1
])
if
(
params
.
code
)
{
// if code is given in url we focus on solidity plugin
menuicons
.
select
(
'solidity'
)
}
else
{
// If plugins are loaded from the URL params, we focus on the last one.
if
(
pluginLoader
.
current
===
'queryParams'
&&
workspace
.
length
>
0
)
menuicons
.
select
(
workspace
[
workspace
.
length
-
1
])
}
if
(
params
.
call
)
{
const
callDetails
=
params
.
call
.
split
(
'//'
)
...
...
@@ -516,5 +521,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
const
framingService
=
new
FramingService
(
sidePanel
,
menuicons
,
mainview
,
this
.
_components
.
resizeFeature
)
if
(
params
.
embed
)
framingService
.
embed
()
if
(
params
.
code
)
framingService
.
code
()
framingService
.
start
(
params
)
}
apps/remix-ide/src/framingService.js
View file @
9d1361ce
export
class
FramingService
{
constructor
(
sidePanel
,
verticalIcon
,
mainView
,
resizeFeature
)
{
constructor
(
sidePanel
,
verticalIcon
s
,
mainView
,
resizeFeature
)
{
this
.
sidePanel
=
sidePanel
this
.
verticalIcon
=
verticalIcon
this
.
verticalIcon
s
=
verticalIcons
this
.
mainPanel
=
mainView
.
getAppPanel
()
this
.
mainView
=
mainView
this
.
resizeFeature
=
resizeFeature
...
...
@@ -18,16 +18,16 @@ export class FramingService {
this
.
resizeFeature
.
showPanel
()
})
this
.
verticalIcon
.
select
(
'filePanel'
)
this
.
verticalIcon
s
.
select
(
'filePanel'
)
document
.
addEventListener
(
'keypress'
,
(
e
)
=>
{
if
(
e
.
shiftKey
&&
e
.
ctrlKey
)
{
if
(
e
.
code
===
'KeyF'
)
{
// Ctrl+Shift+F
this
.
verticalIcon
.
select
(
'filePanel'
)
this
.
verticalIcon
s
.
select
(
'filePanel'
)
}
else
if
(
e
.
code
===
'KeyA'
)
{
// Ctrl+Shift+A
this
.
verticalIcon
.
select
(
'pluginManager'
)
this
.
verticalIcon
s
.
select
(
'pluginManager'
)
}
else
if
(
e
.
code
===
'KeyS'
)
{
// Ctrl+Shift+S
this
.
verticalIcon
.
select
(
'settings'
)
this
.
verticalIcon
s
.
select
(
'settings'
)
}
e
.
preventDefault
()
}
...
...
libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
View file @
9d1361ce
...
...
@@ -69,13 +69,14 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
const
optimize
=
params
.
optimize
===
'false'
?
false
:
params
.
optimize
===
'true'
?
true
:
null
const
runs
=
params
.
runs
const
evmVersion
=
params
.
evmVersion
const
autoCompile
=
params
.
autoCompile
===
'false'
?
false
:
params
.
autoCompile
===
'true'
?
true
:
null
return
{
...
prevState
,
hideWarnings
:
api
.
getConfiguration
(
'hideWarnings'
)
||
false
,
autoCompile
:
api
.
getConfiguration
(
'autoCompile'
)
||
false
,
autoCompile
:
typeof
autoCompile
===
'boolean'
?
autoCompile
:
api
.
getConfiguration
(
'autoCompile'
)
||
false
,
includeNightlies
:
api
.
getConfiguration
(
'includeNightlies'
)
||
false
,
optimise
:
(
optimize
!==
null
)
&&
(
optimize
!==
undefined
)
?
optimize
:
api
.
getConfiguration
(
'optimise'
)
||
false
,
optimise
:
typeof
optimize
===
'boolean'
?
optimize
:
api
.
getConfiguration
(
'optimise'
)
||
false
,
runs
:
(
runs
!==
null
)
&&
(
runs
!==
'null'
)
&&
(
runs
!==
undefined
)
&&
(
runs
!==
'undefined'
)
?
runs
:
200
,
evmVersion
:
(
evmVersion
!==
null
)
&&
(
evmVersion
!==
'null'
)
&&
(
evmVersion
!==
undefined
)
&&
(
evmVersion
!==
'undefined'
)
?
evmVersion
:
'default'
}
...
...
@@ -407,6 +408,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
const
checked
=
e
.
target
.
checked
api
.
setConfiguration
(
'autoCompile'
,
checked
)
checked
&&
compile
()
setState
(
prevState
=>
{
return
{
...
prevState
,
autoCompile
:
checked
}
})
...
...
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