Commit e5f04a7b authored by lianahus's avatar lianahus Committed by Liana Husikyan

message for users of < 0.4.12 version``

parent a4cf6d0e
import toaster from '../../ui/tooltip'
import { canUseWorker, baseURLBin, baseURLWasm, urlFromVersion, pathToURL, promisedMiniXhr } from '../../compiler/compiler-utils' import { canUseWorker, baseURLBin, baseURLWasm, urlFromVersion, pathToURL, promisedMiniXhr } from '../../compiler/compiler-utils'
const yo = require('yo-yo') const yo = require('yo-yo')
const helper = require('../../../lib/helper') const helper = require('../../../lib/helper')
...@@ -210,19 +211,19 @@ class CompilerContainer { ...@@ -210,19 +211,19 @@ class CompilerContainer {
} }
this._view.versionSelector = yo` this._view.versionSelector = yo`
<select onchange="${this.onchangeLoadVersion.bind(this)}" class="custom-select" id="versionSelector" disabled> <select onchange="${() => this.onchangeLoadVersion()}" class="custom-select" id="versionSelector" disabled>
<option disabled selected>${this.data.defaultVersion}</option> <option disabled selected>${this.data.defaultVersion}</option>
<option disabled>builtin</option> <option disabled>builtin</option>
</select>` </select>`
this._view.languageSelector = yo` this._view.languageSelector = yo`
<select onchange="${this.onchangeLanguage.bind(this)}" class="custom-select" id="compilierLanguageSelector" title="Available since v0.5.7"> <select onchange="${() => this.onchangeLanguage()}" class="custom-select" id="compilierLanguageSelector" title="Available since v0.5.7">
<option>Solidity</option> <option>Solidity</option>
<option>Yul</option> <option>Yul</option>
</select>` </select>`
this._view.version = yo`<span id="version"></span>` this._view.version = yo`<span id="version"></span>`
this._view.evmVersionSelector = yo` this._view.evmVersionSelector = yo`
<select onchange="${this.onchangeEvmVersion.bind(this)}" class="custom-select" id="evmVersionSelector"> <select onchange="${() => this.onchangeEvmVersion()}" class="custom-select" id="evmVersionSelector">
<option value="default" selected="selected">compiler default</option> <option value="default" selected="selected">compiler default</option>
<option>muirGlacier</option> <option>muirGlacier</option>
<option>istanbul</option> <option>istanbul</option>
...@@ -397,7 +398,6 @@ class CompilerContainer { ...@@ -397,7 +398,6 @@ class CompilerContainer {
The following functions map with the above event handlers. The following functions map with the above event handlers.
They are an external API for modifying the compiler configuration. They are an external API for modifying the compiler configuration.
*/ */
setConfiguration (settings) { setConfiguration (settings) {
this.setLanguage(settings.language) this.setLanguage(settings.language)
this.setEvmVersion(settings.evmVersion) this.setEvmVersion(settings.evmVersion)
...@@ -476,6 +476,15 @@ class CompilerContainer { ...@@ -476,6 +476,15 @@ class CompilerContainer {
this._view.versionSelector.appendChild(option) this._view.versionSelector.appendChild(option)
} }
}) })
if (semver.lt(this._retrieveVersion(), 'v0.4.12+commit.194ff033.js')) {
toaster(yo`
<div>
<b>Old compiler usage detected.</b>
<p>You are using a compiler older than v0.4.12.</p>
<p>Some Functionallity may not work.</p>
</div>`
)
}
// Workers cannot load js on "file:"-URLs and we get a // Workers cannot load js on "file:"-URLs and we get a
// "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium, // "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium,
......
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