remove compilationMessage

pull/1/head
yann300 7 years ago
parent 99f237dbac
commit 980bab63de
  1. 6
      src/app.js
  2. 12
      src/app/tabs/compile-tab.js

@ -750,9 +750,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
}
})
},
compilationMessage: (message, container, options) => {
renderer.error(message, container, options)
},
currentCompiledSourceCode: () => {
if (compiler.lastCompilationResult.source) {
return compiler.lastCompilationResult.source.sources[compiler.lastCompilationResult.source.target]
@ -784,7 +781,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
var rhpOpts = {
pluginAPI: new PluginAPI(self, compiler),
udapp: udapp,
compiler: compiler
compiler: compiler,
renderer: renderer
}
self._components.righthandpanel = new RighthandPanel(rhpAPI, rhpEvents, rhpOpts)

@ -115,7 +115,7 @@ function compileTab (appAPI = {}, appEvents = {}, opts = {}) {
var el = yo`
<div class="${css.compileTabView}" id="compileTabView">
${compileContainer}
${contractNames(appAPI, appEvents)}
${contractNames(appAPI, appEvents, opts)}
${errorContainer}
</div>
`
@ -124,7 +124,7 @@ function compileTab (appAPI = {}, appEvents = {}, opts = {}) {
section CONTRACT DROPDOWN, DETAILS AND PUBLISH
------------------------------------------------ */
function contractNames (appAPI, appEvents) {
function contractNames (appAPI, appEvents, opts) {
var contractsDetails = {}
appEvents.compiler.register('compilationStarted', () => {
@ -146,18 +146,18 @@ function compileTab (appAPI = {}, appEvents = {}, opts = {}) {
var error = false
if (data['error']) {
error = true
appAPI.compilationMessage(data['error'].formattedMessage, $(errorContainer), {type: data['error'].severity})
opts.renderer.error(data['error'].formattedMessage, $(errorContainer), {type: data['error'].severity})
}
if (data['errors']) {
if (data['errors'].length) error = true
data['errors'].forEach(function (err) {
appAPI.compilationMessage(err.formattedMessage, $(errorContainer), {type: err.severity})
opts.renderer.error(err.formattedMessage, $(errorContainer), {type: err.severity})
})
}
if (!error) {
if (data.contracts) {
appAPI.visitContracts((contract) => {
appAPI.compilationMessage(contract.name, $(errorContainer), {type: 'success'})
opts.renderer.error(contract.name, $(errorContainer), {type: 'success'})
})
}
}
@ -165,7 +165,7 @@ function compileTab (appAPI = {}, appEvents = {}, opts = {}) {
appEvents.staticAnalysis.register('staticAnaysisWarning', (count) => {
if (count) {
appAPI.compilationMessage(`Static Analysis raised ${count} warning(s) that requires your attention.`, $(errorContainer), {
opts.renderer.error(`Static Analysis raised ${count} warning(s) that requires your attention.`, $(errorContainer), {
type: 'warning',
click: () => appAPI.switchTab('staticanalysisView')
})

Loading…
Cancel
Save