Unverified Commit 5f087838 authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #1396 from ethereum/refactor8

Clean app.js (8)
parents 2d24d2c9 36ed68fa
This diff is collapsed.
...@@ -120,7 +120,6 @@ var css = csjs` ...@@ -120,7 +120,6 @@ var css = csjs`
}` }`
/** /**
* This just export a function that register to `newTransaction` and forward them to the logger. * This just export a function that register to `newTransaction` and forward them to the logger.
* Emit debugRequested
* *
*/ */
class TxLogger { class TxLogger {
...@@ -141,7 +140,8 @@ class TxLogger { ...@@ -141,7 +140,8 @@ class TxLogger {
editorPanel: this._components.registry.get('editorpanel').api, editorPanel: this._components.registry.get('editorpanel').api,
txListener: this._components.registry.get('txlistener').api, txListener: this._components.registry.get('txlistener').api,
eventsDecoder: this._components.registry.get('eventsdecoder').api, eventsDecoder: this._components.registry.get('eventsdecoder').api,
compiler: this._components.registry.get('compiler').api compiler: this._components.registry.get('compiler').api,
app: this._components.registry.get('app').api
} }
this.logKnownTX = this._deps.editorPanel.registerCommand('knownTransaction', (args, cmds, append) => { this.logKnownTX = this._deps.editorPanel.registerCommand('knownTransaction', (args, cmds, append) => {
...@@ -205,7 +205,7 @@ function debug (e, data, self) { ...@@ -205,7 +205,7 @@ function debug (e, data, self) {
if (data.tx.isCall && data.tx.envMode !== 'vm') { if (data.tx.isCall && data.tx.envMode !== 'vm') {
modalDialog.alert('Cannot debug this call. Debugging calls is only possible in JavaScript VM mode.') modalDialog.alert('Cannot debug this call. Debugging calls is only possible in JavaScript VM mode.')
} else { } else {
self.event.trigger('debugRequested', [data.tx.hash]) self._deps.app.startdebugging(data.tx.hash)
} }
} }
......
...@@ -85,6 +85,7 @@ class FileManager { ...@@ -85,6 +85,7 @@ class FileManager {
self._deps.editor.discardCurrentSession() self._deps.editor.discardCurrentSession()
delete this.tabbedFiles[path] delete this.tabbedFiles[path]
this.refreshTabs() this.refreshTabs()
this.switchFile()
} }
// Display files that have already been selected // Display files that have already been selected
......
...@@ -127,7 +127,7 @@ module.exports = class CompileTab { ...@@ -127,7 +127,7 @@ module.exports = class CompileTab {
var error = false var error = false
if (data['error']) { if (data['error']) {
error = true error = true
self._deps.renderer.error(data['error'].formattedMessage, self._view.errorContainer, {type: data['error'].severity}) self._deps.renderer.error(data['error'].formattedMessage, self._view.errorContainer, {type: data['error'].severity || 'error'})
} }
if (data.errors && data.errors.length) { if (data.errors && data.errors.length) {
error = true error = true
......
...@@ -111,7 +111,7 @@ module.exports = class SettingsTab { ...@@ -111,7 +111,7 @@ module.exports = class SettingsTab {
<span class="${css.checkboxText}">Always use Ethereum VM at Load</span> <span class="${css.checkboxText}">Always use Ethereum VM at Load</span>
</div> </div>
<div class="${css.crow}"> <div class="${css.crow}">
<div><input id="editorWrap" type="checkbox"></div> <div><input id="editorWrap" type="checkbox" onchange=${function () { self._deps.editor.resize(this.checked) }}></div>
<span class="${css.checkboxText}">Text Wrap</span> <span class="${css.checkboxText}">Text Wrap</span>
</div> </div>
<div class="${css.crow}"> <div class="${css.crow}">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment