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
b6b6fbc4
Commit
b6b6fbc4
authored
Feb 12, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use store
parent
e4cae647
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
19 deletions
+30
-19
config.yml
.circleci/config.yml
+2
-2
app.js
src/app.js
+4
-4
swap-panel-component.js
src/app/components/swap-panel-component.js
+9
-1
vertical-icons-component.js
src/app/components/vertical-icons-component.js
+13
-1
remixAppManager.js
src/remixAppManager.js
+0
-9
init.js
test-browser/helpers/init.js
+2
-2
No files found.
.circleci/config.yml
View file @
b6b6fbc4
...
...
@@ -26,10 +26,10 @@ jobs:
-
checkout
-
restore_cache
:
keys
:
-
dep-bundle-2
7
-{{ checksum "package.json" }}
-
dep-bundle-2
8
-{{ checksum "package.json" }}
-
run
:
npm install
-
save_cache
:
key
:
dep-bundle-2
7
-{{ checksum "package.json" }}
key
:
dep-bundle-2
8
-{{ checksum "package.json" }}
paths
:
-
~/repo/node_modules
-
run
:
npm run lint && npm run test && npm run make-mock-compiler && npm run build
...
...
src/app.js
View file @
b6b6fbc4
...
...
@@ -411,15 +411,15 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
// TODOs those are instanciated before hand. should be instanciated on demand
let
appStore
=
new
EntityStore
(
'module'
,
{
actives
:
[],
ids
:
[],
entities
:
{}
})
const
pluginManagerComponent
=
new
PluginManagerComponent
()
const
swapPanelComponent
=
new
SwapPanelComponent
()
const
mainPanelComponent
=
new
SwapPanelComponent
()
const
verticalIconsComponent
=
new
VerticalIconsComponent
()
const
swapPanelComponent
=
new
SwapPanelComponent
(
appStore
)
const
mainPanelComponent
=
new
SwapPanelComponent
(
appStore
)
const
verticalIconsComponent
=
new
VerticalIconsComponent
(
appStore
)
const
swapPanelApi
=
new
SwapPanelApi
(
swapPanelComponent
,
verticalIconsComponent
)
// eslint-disable-line
const
mainPanelApi
=
new
SwapPanelApi
(
mainPanelComponent
,
verticalIconsComponent
)
// eslint-disable-line
const
verticalIconsApi
=
new
VerticalIconsApi
(
verticalIconsComponent
)
// eslint-disable-line
let
appStore
=
new
EntityStore
(
'module'
,
{
actives
:
[],
ids
:
[],
entities
:
{}
})
const
appManager
=
new
RemixAppManager
(
appStore
,
swapPanelApi
,
mainPanelApi
,
verticalIconsApi
)
registry
.
put
({
api
:
appManager
.
proxy
(),
name
:
'pluginmanager'
})
...
...
src/app/components/swap-panel-component.js
View file @
b6b6fbc4
...
...
@@ -6,11 +6,19 @@ var csjs = require('csjs-inject')
// const styles = styleguide.chooser()
class
SwapPanelComponent
{
constructor
()
{
constructor
(
appStore
)
{
this
.
store
=
appStore
// list of contents
this
.
contents
=
{}
// name of the current displayed content
this
.
currentNode
this
.
store
.
event
.
on
(
'activate'
,
(
name
)
=>
{
})
this
.
store
.
event
.
on
(
'deactivate'
,
(
name
)
=>
{
if
(
this
.
contents
[
name
])
this
.
remove
(
name
)
})
this
.
store
.
event
.
on
(
'add'
,
(
name
)
=>
{
})
this
.
store
.
event
.
on
(
'remove'
,
(
name
)
=>
{
})
}
showContent
(
moduleName
)
{
...
...
src/app/components/vertical-icons-component.js
View file @
b6b6fbc4
...
...
@@ -10,9 +10,21 @@ const EventEmmitter = require('events')
// Component
class
VerticalIconComponent
{
constructor
()
{
constructor
(
appStore
)
{
this
.
store
=
appStore
this
.
event
=
new
EventEmmitter
()
this
.
icons
=
{}
this
.
store
.
event
.
on
(
'activate'
,
(
name
)
=>
{
let
item
=
this
.
store
.
get
(
name
)
if
(
item
&&
item
.
profile
.
icon
&&
name
!==
'code editor'
)
this
.
addIcon
(
item
.
profile
)
})
this
.
store
.
event
.
on
(
'deactivate'
,
(
name
)
=>
{
let
item
=
this
.
store
.
get
(
name
)
if
(
item
&&
this
.
icons
[
name
])
this
.
removeIcon
(
item
.
profile
)
})
this
.
store
.
event
.
on
(
'add'
,
(
name
)
=>
{
})
this
.
store
.
event
.
on
(
'remove'
,
(
name
)
=>
{
})
}
addIcon
(
mod
)
{
...
...
src/remixAppManager.js
View file @
b6b6fbc4
...
...
@@ -61,10 +61,6 @@ export class RemixAppManager extends AppManagerApi {
domEl
.
style
.
width
=
'100%'
domEl
.
style
.
border
=
'0'
panel
.
add
(
profile
,
domEl
)
// TODO perhaps should not be here
if
(
profile
.
name
!==
'code editor'
)
{
this
.
verticalIconsApi
.
addIcon
(
profile
)
}
return
}
this
.
hiddenNodes
[
profile
.
name
]
=
domEl
...
...
@@ -72,11 +68,6 @@ export class RemixAppManager extends AppManagerApi {
}
removeComponent
(
profile
)
{
if
(
profile
.
icon
)
{
this
.
swapPanelApi
.
remove
(
profile
)
this
.
verticalIconsApi
.
removeIcon
(
profile
)
return
}
let
hiddenNode
=
this
.
hiddenNodes
[
profile
.
name
]
if
(
hiddenNode
)
document
.
body
.
removeChild
(
hiddenNode
)
}
...
...
test-browser/helpers/init.js
View file @
b6b6fbc4
...
...
@@ -17,9 +17,9 @@ module.exports = function (browser, callback) {
}
function
initModules
(
browser
,
callback
)
{
browser
.
click
(
'#icon-panel div[title="plugin
m
anager"]'
)
browser
.
click
(
'#icon-panel div[title="plugin
M
anager"]'
)
.
execute
(
function
()
{
document
.
querySelector
(
'div[title="plugin
manager"]'
).
scrollTop
=
document
.
querySelector
(
'div[title="plugin m
anager"]'
).
scrollHeight
document
.
querySelector
(
'div[title="plugin
Manager"]'
).
scrollTop
=
document
.
querySelector
(
'div[title="pluginM
anager"]'
).
scrollHeight
},
[],
function
()
{
browser
.
click
(
'#pluginManager div[title="solidity"] button'
)
.
click
(
'#pluginManager div[title="run transactions"] button'
)
...
...
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