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
9bf65cac
Unverified
Commit
9bf65cac
authored
Oct 05, 2020
by
yann300
Committed by
GitHub
Oct 05, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #461 from ethereum/deactivatePlugin
Deactivate Plugins From Url Parameters
parents
2d846f60
536816f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
+21
-8
workspace.test.ts
apps/remix-ide-e2e/src/tests/workspace.test.ts
+7
-2
app.js
apps/remix-ide/src/app.js
+10
-2
remixAppManager.js
apps/remix-ide/src/remixAppManager.js
+4
-4
No files found.
apps/remix-ide-e2e/src/tests/workspace.test.ts
View file @
9bf65cac
...
@@ -5,7 +5,7 @@ import sauce from './sauce'
...
@@ -5,7 +5,7 @@ import sauce from './sauce'
module
.
exports
=
{
module
.
exports
=
{
before
:
function
(
browser
:
NightwatchBrowser
,
done
:
VoidFunction
)
{
before
:
function
(
browser
:
NightwatchBrowser
,
done
:
VoidFunction
)
{
init
(
browser
,
done
,
'http://127.0.0.1:8080?
plugins=solidity,udapp&plugincall=fileManager//open//3_Ballot.sol
'
,
false
)
init
(
browser
,
done
,
'http://127.0.0.1:8080?
activate=solidity,udapp&call=fileManager//open//3_Ballot.sol&deactivate=home
'
,
false
)
},
},
'CheckSolidityActivatedAndUDapp'
:
function
(
browser
:
NightwatchBrowser
)
{
'CheckSolidityActivatedAndUDapp'
:
function
(
browser
:
NightwatchBrowser
)
{
...
@@ -20,7 +20,12 @@ module.exports = {
...
@@ -20,7 +20,12 @@ module.exports = {
.
pause
(
5000
)
.
pause
(
5000
)
.
getEditorValue
((
content
)
=>
{
.
getEditorValue
((
content
)
=>
{
browser
.
assert
.
ok
(
content
.
indexOf
(
'contract Ballot {'
)
!=
-
1
,
'content doesn
\'
t include Ballot contract'
)
browser
.
assert
.
ok
(
content
.
indexOf
(
'contract Ballot {'
)
!=
-
1
,
'content doesn
\'
t include Ballot contract'
)
})
})
},
'Home page should be deactivated'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
waitForElementNotPresent
(
'[data-id="landingPageHomeContainer"]'
)
.
end
()
.
end
()
},
},
...
...
apps/remix-ide/src/app.js
View file @
9bf65cac
...
@@ -405,11 +405,19 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -405,11 +405,19 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
// Set workspace after initial activation
// Set workspace after initial activation
if
(
Array
.
isArray
(
workspace
))
{
if
(
Array
.
isArray
(
workspace
))
{
appManager
.
activatePlugin
(
workspace
).
then
(()
=>
{
appManager
.
activatePlugin
(
workspace
).
then
(()
=>
{
try
{
if
(
params
.
deactivate
)
{
appManager
.
deactivatePlugin
(
params
.
deactivate
.
split
(
','
))
}
}
catch
(
e
)
{
console
.
log
(
e
)
}
// If plugins are loaded from the URL params, we focus on the last one.
// 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
(
pluginLoader
.
current
===
'queryParams'
&&
workspace
.
length
>
0
)
menuicons
.
select
(
workspace
[
workspace
.
length
-
1
])
if
(
params
.
plugin
call
)
{
if
(
params
.
call
)
{
const
callDetails
=
params
.
plugin
call
.
split
(
'//'
)
const
callDetails
=
params
.
call
.
split
(
'//'
)
if
(
callDetails
.
length
>
1
)
{
if
(
callDetails
.
length
>
1
)
{
toolTip
(
`initiating
${
callDetails
[
0
]}
...`
)
toolTip
(
`initiating
${
callDetails
[
0
]}
...`
)
// @todo(remove the timeout when activatePlugin is on 0.3.0)
// @todo(remove the timeout when activatePlugin is on 0.3.0)
...
...
apps/remix-ide/src/remixAppManager.js
View file @
9bf65cac
...
@@ -135,13 +135,13 @@ class PluginLoader {
...
@@ -135,13 +135,13 @@ class PluginLoader {
this
.
loaders
[
'queryParams'
]
=
{
this
.
loaders
[
'queryParams'
]
=
{
set
:
()
=>
{},
set
:
()
=>
{},
get
:
()
=>
{
get
:
()
=>
{
const
{
plugins
}
=
queryParams
.
get
()
const
{
activate
}
=
queryParams
.
get
()
if
(
!
plugins
)
return
[]
if
(
!
activate
)
return
[]
return
plugins
.
split
(
','
)
return
activate
.
split
(
','
)
}
}
}
}
this
.
current
=
queryParams
.
get
()[
'
plugins
'
]
?
'queryParams'
:
'localStorage'
this
.
current
=
queryParams
.
get
()[
'
activate
'
]
?
'queryParams'
:
'localStorage'
}
}
set
(
plugin
,
actives
)
{
set
(
plugin
,
actives
)
{
...
...
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