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: () => { currentCompiledSourceCode: () => {
if (compiler.lastCompilationResult.source) { if (compiler.lastCompilationResult.source) {
return compiler.lastCompilationResult.source.sources[compiler.lastCompilationResult.source.target] 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 = { var rhpOpts = {
pluginAPI: new PluginAPI(self, compiler), pluginAPI: new PluginAPI(self, compiler),
udapp: udapp, udapp: udapp,
compiler: compiler compiler: compiler,
renderer: renderer
} }
self._components.righthandpanel = new RighthandPanel(rhpAPI, rhpEvents, rhpOpts) self._components.righthandpanel = new RighthandPanel(rhpAPI, rhpEvents, rhpOpts)

@ -115,7 +115,7 @@ function compileTab (appAPI = {}, appEvents = {}, opts = {}) {
var el = yo` var el = yo`
<div class="${css.compileTabView}" id="compileTabView"> <div class="${css.compileTabView}" id="compileTabView">
${compileContainer} ${compileContainer}
${contractNames(appAPI, appEvents)} ${contractNames(appAPI, appEvents, opts)}
${errorContainer} ${errorContainer}
</div> </div>
` `
@ -124,7 +124,7 @@ function compileTab (appAPI = {}, appEvents = {}, opts = {}) {
section CONTRACT DROPDOWN, DETAILS AND PUBLISH section CONTRACT DROPDOWN, DETAILS AND PUBLISH
------------------------------------------------ */ ------------------------------------------------ */
function contractNames (appAPI, appEvents) { function contractNames (appAPI, appEvents, opts) {
var contractsDetails = {} var contractsDetails = {}
appEvents.compiler.register('compilationStarted', () => { appEvents.compiler.register('compilationStarted', () => {
@ -146,18 +146,18 @@ function compileTab (appAPI = {}, appEvents = {}, opts = {}) {
var error = false var error = false
if (data['error']) { if (data['error']) {
error = true 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']) {
if (data['errors'].length) error = true if (data['errors'].length) error = true
data['errors'].forEach(function (err) { 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 (!error) {
if (data.contracts) { if (data.contracts) {
appAPI.visitContracts((contract) => { 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) => { appEvents.staticAnalysis.register('staticAnaysisWarning', (count) => {
if (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', type: 'warning',
click: () => appAPI.switchTab('staticanalysisView') click: () => appAPI.switchTab('staticanalysisView')
}) })

Loading…
Cancel
Save