Commit c3347896 authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #595 from ethereum/fixCompilationSlowWarning

fix compilation slow warning
parents dc537b5c 5de2eff7
......@@ -47,14 +47,17 @@ function SettingsTab (container, appAPI, appEvents, opts) {
if (!container) throw new Error('no container given')
var warnCompilationSlow = yo`<div id="warnCompilationSlow"></div>`
warnCompilationSlow.className = css.compilationWarning
appEvents.compiler.register('compilationDuration', function tabHighlighting (speed) {
var settingsView = document.querySelector('#header #menu .settingsView')
if (speed > 1000) {
warnCompilationSlow.className = css.compilationWarning
warnCompilationSlow.innerHTML = `Last compilation took ${speed}ms. We suggest to turn off autocompilation.`
warnCompilationSlow.style.visibility = 'visible'
settingsView.style.color = '#FF8B8B'
} else {
warnCompilationSlow.innerHTML = ''
warnCompilationSlow.style.visibility = 'hidden'
settingsView.style.color = ''
}
})
......
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