3 options : only remix transactions / all transactions / script

pull/1/head
yann300 7 years ago
parent 980274765f
commit 8eaaf35221
  1. 24
      src/app/panels/terminal.js

@ -136,17 +136,30 @@ class Terminal {
self._components = {} self._components = {}
self._components.dropdown = new Dropdown({ self._components.dropdown = new Dropdown({
options: [ options: [
'knownTransaction', 'only remix transactions',
'unknownTransaction', 'all transactions',
'script' 'script'
], ],
defaults: ['knownTransaction', '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._components.dropdown.event.register('deselect', function (label) {
self.updateJournal({ type: 'deselect', value: label }) if (label === 'only remix transactions') {
self.updateJournal({ type: 'select', value: 'unknownTransaction' })
} else if (label === 'all transactions') {
self.updateJournal({ type: 'deselect', value: 'unknownTransaction' })
} else { // script
self.updateJournal({ type: 'deselect', value: label })
}
}) })
self._components.dropdown.event.register('select', function (label) { self._components.dropdown.event.register('select', function (label) {
self.updateJournal({ type: 'select', value: label }) if (label === 'only remix transactions') {
self.updateJournal({ type: 'deselect', value: 'unknownTransaction' })
} else if (label === 'all transactions') {
self.updateJournal({ type: 'select', value: 'unknownTransaction' })
} else { // script
self.updateJournal({ type: 'select', value: label })
}
}) })
self._commands = {} self._commands = {}
self.commands = {} self.commands = {}
@ -172,6 +185,7 @@ class Terminal {
self._jsSandbox = vm.createContext(self._jsSandboxContext) self._jsSandbox = vm.createContext(self._jsSandboxContext)
if (opts.shell) self._shell = opts.shell if (opts.shell) self._shell = opts.shell
register(self) register(self)
self.updateJournal({ type: 'select', value: 'knownTransaction' })
} }
render () { render () {
var self = this var self = this

Loading…
Cancel
Save