diff --git a/src/app/execution/txLogger.js b/src/app/execution/txLogger.js index 401c393caa..54fb4bbf39 100644 --- a/src/app/execution/txLogger.js +++ b/src/app/execution/txLogger.js @@ -161,22 +161,6 @@ class TxLogger { append(el) }, { activate: true }) - this._deps.editorPanel.event.register('terminalFilterChanged', (type, label) => { - if (type === 'deselect') { - if (label === 'only remix transactions') { - this._deps.editorPanel.updateTerminalFilter({ type: 'select', value: 'unknownTransaction' }) - } else if (label === 'all transactions') { - this._deps.editorPanel.updateTerminalFilter({ type: 'deselect', value: 'unknownTransaction' }) - } - } else if (type === 'select') { - if (label === 'only remix transactions') { - this._deps.editorPanel.updateTerminalFilter({ type: 'deselect', value: 'unknownTransaction' }) - } else if (label === 'all transactions') { - this._deps.editorPanel.updateTerminalFilter({ type: 'select', value: 'unknownTransaction' }) - } - } - }) - this._deps.txListener.event.register('newBlock', (block) => { if (!block.transactions || block.transactions && !block.transactions.length) { this.logEmptyBlock({ block: block }) @@ -190,6 +174,9 @@ class TxLogger { this._deps.txListener.event.register('newCall', (tx) => { log(this, tx, null) }) + + this._deps.editorPanel.updateTerminalFilter({ type: 'select', value: 'unknownTransaction' }) + this._deps.editorPanel.updateTerminalFilter({ type: 'select', value: 'knownTransaction' }) } } diff --git a/src/app/panels/editor-panel.js b/src/app/panels/editor-panel.js index 95bd98443d..1e8e70d411 100644 --- a/src/app/panels/editor-panel.js +++ b/src/app/panels/editor-panel.js @@ -114,9 +114,6 @@ class EditorPanel { } }) - self._components.terminal.event.register('filterChanged', (type, value) => { - this.event.trigger('terminalFilterChanged', [type, value]) - }) self._components.terminal.event.register('resize', delta => self._adjustLayout('top', delta)) if (self._deps.txListener) { self._components.terminal.event.register('listenOnNetWork', (listenOnNetWork) => { diff --git a/src/app/panels/terminal.js b/src/app/panels/terminal.js index f9fb886208..4ec6f393ba 100644 --- a/src/app/panels/terminal.js +++ b/src/app/panels/terminal.js @@ -11,7 +11,6 @@ var swarmgw = require('swarmgw')() var CommandInterpreterAPI = require('../../lib/cmdInterpreterAPI') var executionContext = require('../../execution-context') -var Dropdown = require('../ui/dropdown') var AutoCompletePopup = require('../ui/auto-complete-popup') var csjs = require('csjs-inject') @@ -52,27 +51,6 @@ class Terminal extends BaseApi { self._view = { el: null, bar: null, input: null, term: null, journal: null, cli: null } self._components = {} self._components.cmdInterpreter = new CommandInterpreterAPI(this) - self._components.dropdown = new Dropdown({ - options: [ - 'only remix transactions', - 'all transactions', - 'script' - ], - defaults: ['only remix transactions', 'script'], - dependencies: {'all transactions': ['only remix transactions'], 'only remix transactions': ['all transactions']} - }) - self._components.dropdown.event.register('deselect', function (label) { - self.event.trigger('filterChanged', ['deselect', label]) - if (label === 'script') { - self.updateJournal({ type: 'deselect', value: label }) - } - }) - self._components.dropdown.event.register('select', function (label) { - self.event.trigger('filterChanged', ['select', label]) - if (label === 'script') { - self.updateJournal({ type: 'select', value: label }) - } - }) self._components.autoCompletePopup = new AutoCompletePopup(self._opts) self._components.autoCompletePopup.event.register('handleSelect', function (input) { let textList = self._view.input.innerText.split(' ') @@ -145,7 +123,7 @@ class Terminal extends BaseApi { class="btn btn-secondary btn-sm align-items-center ${css.toggleTerminal} fa fa-angle-double-down">` self._view.dragbar = yo`
` - self._view.dropdown = self._components.dropdown.render() + self._view.pendingTxCount = yo`