|
|
|
@ -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 |
|
|
|
|