|
|
@ -103,13 +103,6 @@ class App { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// ----------------- editor ----------------------------
|
|
|
|
|
|
|
|
self._components.editor = new Editor({}) // @TODO: put into editorpanel
|
|
|
|
|
|
|
|
// ----------------- editor panel ----------------------
|
|
|
|
|
|
|
|
self._components.editorpanel = new EditorPanel({ |
|
|
|
|
|
|
|
api: { editor: self._components.editor, config: self._api.config } |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
self._components.editorpanel.event.register('resize', direction => self._adjustLayout(direction)) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
_adjustLayout (direction, delta) { |
|
|
|
_adjustLayout (direction, delta) { |
|
|
|
var self = this |
|
|
|
var self = this |
|
|
@ -147,7 +140,7 @@ class App { |
|
|
|
` |
|
|
|
` |
|
|
|
self._view.centerpanel = yo` |
|
|
|
self._view.centerpanel = yo` |
|
|
|
<div id="editor-container" class=${css.centerpanel}> |
|
|
|
<div id="editor-container" class=${css.centerpanel}> |
|
|
|
${self._components.editorpanel.render()} |
|
|
|
${''} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
` |
|
|
|
` |
|
|
|
self._view.rightpanel = yo` |
|
|
|
self._view.rightpanel = yo` |
|
|
@ -173,6 +166,26 @@ module.exports = App |
|
|
|
|
|
|
|
|
|
|
|
function run () { |
|
|
|
function run () { |
|
|
|
var self = this |
|
|
|
var self = this |
|
|
|
|
|
|
|
// ------------------------------------------------------------
|
|
|
|
|
|
|
|
var executionContext = new ExecutionContext() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ----------------- editor ----------------------------
|
|
|
|
|
|
|
|
this._components.editor = new Editor({}) // @TODO: put into editorpanel
|
|
|
|
|
|
|
|
// ----------------- editor panel ----------------------
|
|
|
|
|
|
|
|
this._components.editorpanel = new EditorPanel({ |
|
|
|
|
|
|
|
api: { |
|
|
|
|
|
|
|
editor: self._components.editor, |
|
|
|
|
|
|
|
config: self._api.config, |
|
|
|
|
|
|
|
web3: () => { |
|
|
|
|
|
|
|
return executionContext.web3() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
context: () => { |
|
|
|
|
|
|
|
return executionContext.getProvider() |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this._components.editorpanel.event.register('resize', direction => self._adjustLayout(direction)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this._view.centerpanel.appendChild(this._components.editorpanel.render()) |
|
|
|
|
|
|
|
|
|
|
|
var queryParams = new QueryParams() |
|
|
|
var queryParams = new QueryParams() |
|
|
|
var gistHandler = new GistHandler() |
|
|
|
var gistHandler = new GistHandler() |
|
|
@ -501,9 +514,6 @@ function run () { |
|
|
|
} |
|
|
|
} |
|
|
|
var renderer = new Renderer(rendererAPI) |
|
|
|
var renderer = new Renderer(rendererAPI) |
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------
|
|
|
|
|
|
|
|
var executionContext = new ExecutionContext() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ----------------- UniversalDApp -----------------
|
|
|
|
// ----------------- UniversalDApp -----------------
|
|
|
|
var transactionContextAPI = { |
|
|
|
var transactionContextAPI = { |
|
|
|
getAddress: (cb) => { |
|
|
|
getAddress: (cb) => { |
|
|
|