Commit 8eaaf352 authored by yann300's avatar yann300

3 options : only remix transactions / all transactions / script

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