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
c7358b4b
Commit
c7358b4b
authored
Jan 03, 2019
by
Rob Stupay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update for testing
parent
be3ea207
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
22 deletions
+15
-22
app.js
src/app.js
+0
-0
plugin-manager-api.js
src/app/components/plugin-manager-api.js
+7
-11
plugin-manager-component.js
src/app/components/plugin-manager-component.js
+6
-10
vertical-icons-api.js
src/app/components/vertical-icons-api.js
+2
-1
No files found.
src/app.js
View file @
c7358b4b
This diff is collapsed.
Click to expand it.
src/app/components/plugin-manager-api.js
View file @
c7358b4b
...
@@ -8,19 +8,15 @@ const styles = styleguide.chooser()
...
@@ -8,19 +8,15 @@ const styles = styleguide.chooser()
const
EventManager
=
remixLib
.
EventManager
const
EventManager
=
remixLib
.
EventManager
class
PluginManagerApi
{
class
PluginManagerApi
{
constructor
(
swapPanelComponent
)
{
constructor
(
swapPanelComponent
,
pluginManagerComponent
,
appManager
)
{
this
.
component
=
swapPanelComponent
this
.
component
=
swapPanelComponent
}
this
.
appManager
=
appManager
appManager
.
event
.
register
(
'pluginLoaded'
,
(
item
)
=>
{
/*
pluginManagerComponent
.
addItem
(
item
)
viewTitle: string
})
content: DOM element
pluginManagerComponent
.
event
.
on
(
'activation'
,
(
item
)
=>
this
.
event
.
emit
(
'activation'
,
item
))
*/
pluginManagerComponent
.
event
.
on
(
'deactivation'
,
(
item
)
=>
this
.
event
.
emit
(
'deactivation'
,
item
))
addView
(
viewTitle
,
content
)
{
// add the DOM to the swappanel
this
.
component
.
addView
(
viewTitle
,
contents
)
}
}
}
}
module
.
exports
=
SwapPanelApi
module
.
exports
=
SwapPanelApi
src/app/components/plugin-manager-component.js
View file @
c7358b4b
...
@@ -8,11 +8,7 @@ const styles = styleguide.chooser()
...
@@ -8,11 +8,7 @@ const styles = styleguide.chooser()
const
EventManager
=
remixLib
.
EventManager
const
EventManager
=
remixLib
.
EventManager
class
PluginManagerComponent
{
class
PluginManagerComponent
{
constructor
(
appManager
)
{
constructor
()
{
this
.
appManager
=
appManager
appManager
.
event
.
register
(
'pluginLoaded'
,
()
=>
{
// call this.renderItem
})
}
}
render
()
{
render
()
{
...
@@ -24,6 +20,11 @@ class PluginManagerComponent {
...
@@ -24,6 +20,11 @@ class PluginManagerComponent {
`
`
}
}
addItem
(
item
)
{
// add to appManager and then render
renderItem
(
item
)
}
_activate
(
item
)
{
_activate
(
item
)
{
this
.
event
.
emit
(
'activation'
,
item
)
this
.
event
.
emit
(
'activation'
,
item
)
}
}
...
@@ -32,10 +33,6 @@ class PluginManagerComponent {
...
@@ -32,10 +33,6 @@ class PluginManagerComponent {
this
.
event
.
emit
(
'deactivation'
,
item
)
this
.
event
.
emit
(
'deactivation'
,
item
)
}
}
_addPlugin
(
url
){
this
.
event
.
emit
(
'plugin loading'
,
url
)
}
renderItem
(
item
)
{
renderItem
(
item
)
{
var
self
=
this
var
self
=
this
...
@@ -46,7 +43,6 @@ class PluginManagerComponent {
...
@@ -46,7 +43,6 @@ class PluginManagerComponent {
<button onclick=
${()
=>
{
self
.
_activate
(
item
)
}}
><
button
>
<button onclick=
${()
=>
{
self
.
_activate
(
item
)
}}
><
button
>
<
button
onclick
=
$
{()
=>
{
self
.
_deactivate
(
item
)
}}
><
button
>
<
button
onclick
=
$
{()
=>
{
self
.
_deactivate
(
item
)
}}
><
button
>
<
/div
>
<
/div
>
<
button
onclick
=
$
{}
><
button
>
`
`
}
}
}
}
...
...
src/app/components/vertical-icons-api.js
View file @
c7358b4b
...
@@ -8,7 +8,8 @@ const styles = styleguide.chooser()
...
@@ -8,7 +8,8 @@ const styles = styleguide.chooser()
// API
// API
class
VerticalIconsApi
{
class
VerticalIconsApi
{
constructor
(
verticalIconsComponent
)
{
constructor
(
verticalIconsComponent
,
pluginManagerApi
)
{
pluginManagerApi
.
event
.
on
(
'activate'
,
(
module
)
=>
verticalIconsComponent
.
addIcon
(
module
)
)
this
.
component
=
verticalIconsComponent
this
.
component
=
verticalIconsComponent
}
}
...
...
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