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
672ffd1c
Commit
672ffd1c
authored
May 10, 2019
by
Grandschtroumpf
Committed by
François
May 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change EditorPanel to MainView
parent
28c86aa1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
18 deletions
+17
-18
app.js
src/app.js
+8
-8
txLogger.js
src/app/execution/txLogger.js
+6
-6
main-view.js
src/app/panels/main-view.js
+3
-4
No files found.
src/app.js
View file @
672ffd1c
...
...
@@ -20,7 +20,6 @@ var SharedFolder = require('./app/files/shared-folder')
var
Config
=
require
(
'./config'
)
var
Renderer
=
require
(
'./app/ui/renderer'
)
var
executionContext
=
require
(
'./execution-context'
)
var
EditorPanel
=
require
(
'./app/panels/editor-panel'
)
var
examples
=
require
(
'./app/editor/example-contracts'
)
var
modalDialogCustom
=
require
(
'./app/ui/modal-dialog-custom'
)
var
TxLogger
=
require
(
'./app/execution/txLogger'
)
...
...
@@ -53,6 +52,7 @@ import { EntityStore } from './lib/store'
import
{
RemixAppManager
}
from
'./remixAppManager'
import
{
LandingPage
}
from
'./app/ui/landing-page/landing-page'
import
framingService
from
'./framingService'
import
{
MainView
}
from
'./app/panels/main-view'
import
{
ThemeModule
}
from
'./app/tabs/theme-module'
import
{
NetworkModule
}
from
'./app/tabs/network-module'
...
...
@@ -265,7 +265,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
return
'Are you sure you want to leave?'
}
registry
.
put
({
api
:
msg
=>
self
.
_components
.
editorpanel
.
logHtmlMessage
(
msg
),
name
:
'logCallback'
})
registry
.
put
({
api
:
msg
=>
self
.
_components
.
mainview
.
logHtmlMessage
(
msg
),
name
:
'logCallback'
})
// helper for converting offset to line/column
var
offsetToLineColumnConverter
=
new
OffsetToLineColumnConverter
()
...
...
@@ -318,7 +318,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
txlistener
.
startListening
()
// TODO: There are still a lot of dep between
editorpanel
and filemanager
// TODO: There are still a lot of dep between
mainview
and filemanager
let
appStore
=
new
EntityStore
(
'module'
,
'name'
)
const
appManager
=
new
RemixAppManager
(
appStore
)
...
...
@@ -339,9 +339,9 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
const
themeModule
=
new
ThemeModule
(
registry
)
registry
.
put
({
api
:
themeModule
,
name
:
'themeModule'
})
// -----------------
editor panel
----------------------
self
.
_components
.
editorpanel
=
new
EditorPanel
(
appStore
,
appManager
,
mainPanelComponent
)
registry
.
put
({
api
:
self
.
_components
.
editorpanel
,
name
:
'editorpanel
'
})
// -----------------
main view
----------------------
self
.
_components
.
mainview
=
new
MainView
(
appStore
,
appManager
,
mainPanelComponent
)
registry
.
put
({
api
:
self
.
_components
.
mainview
,
name
:
'mainview
'
})
// ----------------- Renderer -----------------
const
renderer
=
new
Renderer
()
...
...
@@ -375,9 +375,9 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
const
verticalIconsApi
=
new
VerticalIconsApi
(
verticalIconsComponent
)
// eslint-disable-line
registry
.
put
({
api
:
verticalIconsApi
,
name
:
'verticalicon'
})
self
.
_components
.
editorpanel
.
init
()
self
.
_components
.
mainview
.
init
()
self
.
_components
.
fileManager
.
init
()
self
.
_view
.
mainpanel
.
appendChild
(
self
.
_components
.
editorpanel
.
render
())
self
.
_view
.
mainpanel
.
appendChild
(
self
.
_components
.
mainview
.
render
())
self
.
_view
.
iconpanel
.
appendChild
(
verticalIconsComponent
.
render
())
self
.
_view
.
swappanel
.
appendChild
(
swapPanelComponent
.
render
())
...
...
src/app/execution/txLogger.js
View file @
672ffd1c
...
...
@@ -131,13 +131,13 @@ class TxLogger {
this
.
_components
.
registry
=
localRegistry
||
globlalRegistry
// dependencies
this
.
_deps
=
{
editorPanel
:
this
.
_components
.
registry
.
get
(
'editorpanel
'
).
api
,
mainView
:
this
.
_components
.
registry
.
get
(
'mainview
'
).
api
,
txListener
:
this
.
_components
.
registry
.
get
(
'txlistener'
).
api
,
eventsDecoder
:
this
.
_components
.
registry
.
get
(
'eventsdecoder'
).
api
,
compilersArtefacts
:
this
.
_components
.
registry
.
get
(
'compilersartefacts'
).
api
}
this
.
logKnownTX
=
this
.
_deps
.
editorPanel
.
registerCommand
(
'knownTransaction'
,
(
args
,
cmds
,
append
)
=>
{
this
.
logKnownTX
=
this
.
_deps
.
mainView
.
registerCommand
(
'knownTransaction'
,
(
args
,
cmds
,
append
)
=>
{
var
data
=
args
[
0
]
var
el
if
(
data
.
tx
.
isCall
)
{
...
...
@@ -149,14 +149,14 @@ class TxLogger {
append
(
el
)
},
{
activate
:
true
,
filterFn
:
filterTx
})
this
.
logUnknownTX
=
this
.
_deps
.
editorPanel
.
registerCommand
(
'unknownTransaction'
,
(
args
,
cmds
,
append
)
=>
{
this
.
logUnknownTX
=
this
.
_deps
.
mainView
.
registerCommand
(
'unknownTransaction'
,
(
args
,
cmds
,
append
)
=>
{
// triggered for transaction AND call
var
data
=
args
[
0
]
var
el
=
renderUnknownTransaction
(
this
,
data
)
append
(
el
)
},
{
activate
:
false
,
filterFn
:
filterTx
})
this
.
logEmptyBlock
=
this
.
_deps
.
editorPanel
.
registerCommand
(
'emptyBlock'
,
(
args
,
cmds
,
append
)
=>
{
this
.
logEmptyBlock
=
this
.
_deps
.
mainView
.
registerCommand
(
'emptyBlock'
,
(
args
,
cmds
,
append
)
=>
{
var
data
=
args
[
0
]
var
el
=
renderEmptyBlock
(
this
,
data
)
append
(
el
)
...
...
@@ -176,8 +176,8 @@ class TxLogger {
log
(
this
,
tx
,
null
)
})
this
.
_deps
.
editorPanel
.
updateTerminalFilter
({
type
:
'select'
,
value
:
'unknownTransaction'
})
this
.
_deps
.
editorPanel
.
updateTerminalFilter
({
type
:
'select'
,
value
:
'knownTransaction'
})
this
.
_deps
.
mainView
.
updateTerminalFilter
({
type
:
'select'
,
value
:
'unknownTransaction'
})
this
.
_deps
.
mainView
.
updateTerminalFilter
({
type
:
'select'
,
value
:
'knownTransaction'
})
}
}
...
...
src/app/panels/
editor-panel
.js
→
src/app/panels/
main-view
.js
View file @
672ffd1c
...
...
@@ -12,7 +12,7 @@ var ContextView = require('../editor/contextView')
var
csjs
=
require
(
'csjs-inject'
)
var
css
=
csjs
`
.
editorpanel
{
.
mainview
{
display : flex;
flex-direction : column;
height : 100%;
...
...
@@ -27,7 +27,7 @@ var css = csjs`
`
class
EditorPanel
{
export
class
MainView
{
constructor
(
appStore
,
appManager
,
mainPanelComponent
)
{
var
self
=
this
self
.
event
=
new
EventManager
()
...
...
@@ -190,7 +190,7 @@ class EditorPanel {
</div>
`
self
.
_view
.
el
=
yo
`
<div class=
${
css
.
editorpanel
}
>
<div class=
${
css
.
mainview
}
>
${
self
.
_view
.
content
}
</div>
`
...
...
@@ -212,4 +212,3 @@ class EditorPanel {
}
}
module
.
exports
=
EditorPanel
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