|
|
@ -1,12 +1,12 @@ |
|
|
|
var $ = require('jquery') |
|
|
|
const $ = require('jquery') |
|
|
|
var yo = require('yo-yo') |
|
|
|
const yo = require('yo-yo') |
|
|
|
var remixLib = require('remix-lib') |
|
|
|
const remixLib = require('remix-lib') |
|
|
|
var EventManager = remixLib.EventManager |
|
|
|
const EventManager = remixLib.EventManager |
|
|
|
var css = require('../styles/run-tab-styles') |
|
|
|
const css = require('../styles/run-tab-styles') |
|
|
|
var copyToClipboard = require('../../ui/copy-to-clipboard') |
|
|
|
const copyToClipboard = require('../../ui/copy-to-clipboard') |
|
|
|
var modalDialogCustom = require('../../ui/modal-dialog-custom') |
|
|
|
const modalDialogCustom = require('../../ui/modal-dialog-custom') |
|
|
|
var addTooltip = require('../../ui/tooltip') |
|
|
|
const addTooltip = require('../../ui/tooltip') |
|
|
|
var helper = require('../../../lib/helper.js') |
|
|
|
const helper = require('../../../lib/helper.js') |
|
|
|
|
|
|
|
|
|
|
|
class SettingsUI { |
|
|
|
class SettingsUI { |
|
|
|
|
|
|
|
|
|
|
@ -40,7 +40,7 @@ class SettingsUI { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
render () { |
|
|
|
render () { |
|
|
|
this.netUI = yo`<span class=${css.network}></span>` |
|
|
|
this.netUI = yo`<span class="${css.network} badge badge-secondary"></span>` |
|
|
|
|
|
|
|
|
|
|
|
var environmentEl = yo` |
|
|
|
var environmentEl = yo` |
|
|
|
<div class="${css.crow}"> |
|
|
|
<div class="${css.crow}"> |
|
|
@ -48,7 +48,6 @@ class SettingsUI { |
|
|
|
Environment |
|
|
|
Environment |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class=${css.environment}> |
|
|
|
<div class=${css.environment}> |
|
|
|
${this.netUI} |
|
|
|
|
|
|
|
<select id="selectExEnvOptions" onchange=${() => { this.updateNetwork() }} class="form-control ${css.select}"> |
|
|
|
<select id="selectExEnvOptions" onchange=${() => { this.updateNetwork() }} class="form-control ${css.select}"> |
|
|
|
<option id="vm-mode" |
|
|
|
<option id="vm-mode" |
|
|
|
title="Execution environment does not connect to any node, everything is local and in memory only." |
|
|
|
title="Execution environment does not connect to any node, everything is local and in memory only." |
|
|
@ -68,8 +67,16 @@ class SettingsUI { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
` |
|
|
|
` |
|
|
|
|
|
|
|
const networkEl = yo` |
|
|
|
var accountEl = yo` |
|
|
|
<div class="${css.crow}"> |
|
|
|
|
|
|
|
<div class="${css.col1_1}"> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="${css.environment}"> |
|
|
|
|
|
|
|
${this.netUI} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
` |
|
|
|
|
|
|
|
const accountEl = yo` |
|
|
|
<div class="${css.crow}"> |
|
|
|
<div class="${css.crow}"> |
|
|
|
<div class="${css.col1_1}"> |
|
|
|
<div class="${css.col1_1}"> |
|
|
|
Account |
|
|
|
Account |
|
|
@ -83,14 +90,14 @@ class SettingsUI { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
` |
|
|
|
` |
|
|
|
|
|
|
|
|
|
|
|
var gasPriceEl = yo` |
|
|
|
const gasPriceEl = yo` |
|
|
|
<div class="${css.crow}"> |
|
|
|
<div class="${css.crow}"> |
|
|
|
<div class="${css.col1_1}">Gas limit</div> |
|
|
|
<div class="${css.col1_1}">Gas limit</div> |
|
|
|
<input type="number" class="form-control ${css.gasNval} ${css.col2}" id="gasLimit" value="3000000"> |
|
|
|
<input type="number" class="form-control ${css.gasNval} ${css.col2}" id="gasLimit" value="3000000"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
` |
|
|
|
` |
|
|
|
|
|
|
|
|
|
|
|
var valueEl = yo` |
|
|
|
const valueEl = yo` |
|
|
|
<div class="${css.crow}"> |
|
|
|
<div class="${css.crow}"> |
|
|
|
<div class="${css.col1_1}">Value</div> |
|
|
|
<div class="${css.col1_1}">Value</div> |
|
|
|
<div class="${css.gasValueContainer}"> |
|
|
|
<div class="${css.gasValueContainer}"> |
|
|
@ -105,9 +112,10 @@ class SettingsUI { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
` |
|
|
|
` |
|
|
|
|
|
|
|
|
|
|
|
var el = yo` |
|
|
|
const el = yo` |
|
|
|
<div class="${css.settings}"> |
|
|
|
<div class="${css.settings}"> |
|
|
|
${environmentEl} |
|
|
|
${environmentEl} |
|
|
|
|
|
|
|
${networkEl} |
|
|
|
${accountEl} |
|
|
|
${accountEl} |
|
|
|
${gasPriceEl} |
|
|
|
${gasPriceEl} |
|
|
|
${valueEl} |
|
|
|
${valueEl} |
|
|
@ -231,7 +239,7 @@ class SettingsUI { |
|
|
|
this.netUI.innerHTML = 'can\'t detect network ' |
|
|
|
this.netUI.innerHTML = 'can\'t detect network ' |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
this.netUI.innerHTML = `<i class="${css.networkItem} fas fa-plug" aria-hidden="true"></i> ${name} (${id || '-'})` |
|
|
|
this.netUI.innerHTML = `${name} (${id || '-'}) network` |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|