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
371f35bb
Commit
371f35bb
authored
Mar 02, 2020
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed local plugin registration
parent
5c8a313a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
app.js
src/app.js
+1
-1
local-plugin.js
src/app/components/local-plugin.js
+0
-1
plugin-manager-component.js
src/app/components/plugin-manager-component.js
+4
-4
No files found.
src/app.js
View file @
371f35bb
...
@@ -315,7 +315,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -315,7 +315,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
const
landingPage
=
new
LandingPage
(
appManager
,
menuicons
)
const
landingPage
=
new
LandingPage
(
appManager
,
menuicons
)
const
sidePanel
=
new
SidePanel
(
appManager
,
menuicons
)
const
sidePanel
=
new
SidePanel
(
appManager
,
menuicons
)
const
hiddenPanel
=
new
HiddenPanel
()
const
hiddenPanel
=
new
HiddenPanel
()
const
pluginManagerComponent
=
new
PluginManagerComponent
(
appManager
)
const
pluginManagerComponent
=
new
PluginManagerComponent
(
appManager
,
engine
)
const
filePanel
=
new
FilePanel
(
appManager
)
const
filePanel
=
new
FilePanel
(
appManager
)
let
settings
=
new
SettingsTab
(
let
settings
=
new
SettingsTab
(
registry
.
get
(
'config'
).
api
,
registry
.
get
(
'config'
).
api
,
...
...
src/app/components/local-plugin.js
View file @
371f35bb
...
@@ -9,7 +9,6 @@ const defaultProfile = {
...
@@ -9,7 +9,6 @@ const defaultProfile = {
}
}
module
.
exports
=
class
LocalPlugin
{
module
.
exports
=
class
LocalPlugin
{
/**
/**
* Open a modal to create a local plugin
* Open a modal to create a local plugin
* @param {Profile[]} plugins The list of the plugins in the store
* @param {Profile[]} plugins The list of the plugins in the store
...
...
src/app/components/plugin-manager-component.js
View file @
371f35bb
...
@@ -72,7 +72,7 @@ const profile = {
...
@@ -72,7 +72,7 @@ const profile = {
class
PluginManagerComponent
extends
ViewPlugin
{
class
PluginManagerComponent
extends
ViewPlugin
{
constructor
(
appManager
)
{
constructor
(
appManager
,
engine
)
{
super
(
profile
)
super
(
profile
)
this
.
event
=
new
EventEmitter
()
this
.
event
=
new
EventEmitter
()
this
.
appManager
=
appManager
this
.
appManager
=
appManager
...
@@ -85,6 +85,7 @@ class PluginManagerComponent extends ViewPlugin {
...
@@ -85,6 +85,7 @@ class PluginManagerComponent extends ViewPlugin {
this
.
appManager
.
event
.
on
(
'activate'
,
()
=>
{
this
.
reRender
()
})
this
.
appManager
.
event
.
on
(
'activate'
,
()
=>
{
this
.
reRender
()
})
this
.
appManager
.
event
.
on
(
'deactivate'
,
()
=>
{
this
.
reRender
()
})
this
.
appManager
.
event
.
on
(
'deactivate'
,
()
=>
{
this
.
reRender
()
})
this
.
appManager
.
event
.
on
(
'added'
,
()
=>
{
this
.
reRender
()
})
this
.
appManager
.
event
.
on
(
'added'
,
()
=>
{
this
.
reRender
()
})
this
.
engine
=
engine
}
}
isActive
(
name
)
{
isActive
(
name
)
{
...
@@ -149,10 +150,9 @@ class PluginManagerComponent extends ViewPlugin {
...
@@ -149,10 +150,9 @@ class PluginManagerComponent extends ViewPlugin {
if
(
this
.
appManager
.
getIds
().
includes
(
profile
.
name
))
{
if
(
this
.
appManager
.
getIds
().
includes
(
profile
.
name
))
{
throw
new
Error
(
'This name has already been used'
)
throw
new
Error
(
'This name has already been used'
)
}
}
const
plugin
=
profile
.
type
===
'iframe'
?
new
IframePlugin
(
profile
)
:
new
WebsocketPlugin
(
profile
)
const
plugin
=
profile
.
type
===
'iframe'
?
new
IframePlugin
(
profile
)
:
new
WebsocketPlugin
(
profile
)
this
.
appManager
.
registerOne
(
plugin
)
this
.
engine
.
register
(
plugin
)
this
.
appManager
.
activatePlugin
(
p
rofile
.
name
)
this
.
appManager
.
activatePlugin
(
p
lugin
.
name
)
}
catch
(
err
)
{
}
catch
(
err
)
{
// TODO : Use an alert to handle this error instead of a console.log
// TODO : Use an alert to handle this error instead of a console.log
console
.
log
(
`Cannot create Plugin :
${
err
.
message
}
`
)
console
.
log
(
`Cannot create Plugin :
${
err
.
message
}
`
)
...
...
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