diff --git a/src/app/panels/styles/terminal-styles.js b/src/app/panels/styles/terminal-styles.js index 61776b74e0..968411bcd6 100644 --- a/src/app/panels/styles/terminal-styles.js +++ b/src/app/panels/styles/terminal-styles.js @@ -93,6 +93,8 @@ var css = csjs` width : 330px; padding-left : 20px; height : 100%; + padding-top : 1px; + padding-bottom : 1px; } .filter { padding-right : 0px; diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index 3677852430..19203ec97b 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -80,7 +80,6 @@ class CompileTab extends CompilerApi { this.events.emit('statusChanged', {key: 'edited', title: 'the content has changed, needs recompilation', type: 'info'}) } this.editor.event.register('contentChanged', onContentChanged) - this.editor.event.register('sessionSwitched', onContentChanged) this.compiler.event.register('loadingCompiler', () => { this.events.emit('statusChanged', {key: 'loading', title: 'loading compiler...', type: 'info'}) @@ -99,20 +98,12 @@ class CompileTab extends CompilerApi { this.fileManager.events.on('currentFileChanged', (name) => { this.compilerContainer.currentFile = name - cleanupErrors() - onContentChanged() }) this.fileManager.events.on('noFileSelected', () => { this.compilerContainer.currentFile = '' - cleanupErrors() }) - const cleanupErrors = () => { - this._view.errorContainer.innerHTML = '' - this.events.emit('statusChanged', {key: 'none'}) - } - this.compiler.event.register('compilationFinished', (success, data, source) => { if (success) { // forwarding the event to the appManager infra @@ -140,7 +131,7 @@ class CompileTab extends CompilerApi { // Update contract Selection let contractMap = {} if (success) this.compiler.visitContracts((contract) => { contractMap[contract.name] = contract }) - let contractSelection = this.contractSelection(Object.keys(contractMap) || []) + let contractSelection = this.contractSelection(Object.keys(contractMap) || [], source.target) yo.update(this._view.contractSelection, contractSelection) if (data['error']) { @@ -189,20 +180,22 @@ class CompileTab extends CompilerApi { * Section to select the compiled contract * @param {string[]} contractList Names of the compiled contracts */ - contractSelection (contractList = []) { + contractSelection (contractList = [], sourceFile) { return contractList.length !== 0 ? yo`
- + + +
- diff --git a/src/app/tabs/runTab/contractDropdown.js b/src/app/tabs/runTab/contractDropdown.js index 58e708e963..f32a7bad35 100644 --- a/src/app/tabs/runTab/contractDropdown.js +++ b/src/app/tabs/runTab/contractDropdown.js @@ -76,7 +76,6 @@ class ContractDropdownUI { if (!document.querySelector(`.${css.contractNames}`)) return document.querySelector(`.${css.contractNames}`).classList.remove(css.contractNamesError) var contractNames = document.querySelector(`.${css.contractNames.classNames[0]}`) - contractNames.innerHTML = '' if (/.(.abi)$/.exec(currentFile)) { this.createPanel.style.display = 'none' this.orLabel.style.display = 'none' diff --git a/src/app/tabs/test-tab.js b/src/app/tabs/test-tab.js index 2b3bf72dad..7ef80ea626 100644 --- a/src/app/tabs/test-tab.js +++ b/src/app/tabs/test-tab.js @@ -56,11 +56,6 @@ module.exports = class TestTab extends BaseApi { yo.update(this.testList, yo`
${testsMessage}
`) if (!this.testsOutput || !this.testsSummary) return - - this.testsOutput.hidden = true - this.testsSummary.hidden = true - this.testsOutput.innerHTML = '' - this.testsSummary.innerHTML = '' }) }) }