Merge pull request #2119 from ethereum/terminalCTC

fixed copyToClipboard for terminal decoded input/output
pull/3094/head
Liana Husikyan 5 years ago committed by GitHub
commit 5941bc242e
  1. 4
      src/app/execution/txLogger.js
  2. 34
      src/app/panels/terminal.js

@ -513,7 +513,7 @@ function createTable (opts) {
<tr class="${css.tr}">
<td class="${css.td}"> decoded input </td>
<td class="${css.td}">${opts['decoded input']}
${copyToClipboard(opts['decoded input'])}
${copyToClipboard(() => opts['decoded input'])}
</td>
</tr>`
table.appendChild(inputDecoded)
@ -524,7 +524,7 @@ function createTable (opts) {
<tr class="${css.tr}">
<td class="${css.td}"> decoded output </td>
<td class="${css.td}" id="decodedoutput" >${opts['decoded output']}
${copyToClipboard(opts['decoded output'])}
${copyToClipboard(() => opts['decoded output'])}
</td>
</tr>`
table.appendChild(outputDecoded)

@ -405,22 +405,24 @@ class Terminal extends BaseApi {
self._cmdIndex = -1
self._cmdTemp = ''
var intro = yo`<div><div> - Welcome to Remix ${packageV.version} - </div><br>
<div>You can use this terminal for: </div>
<ul class=${css2.ul}>
<li>Checking transactions details and start debugging.</li>
<li>Running JavaScript scripts. The following libraries are accessible:
<ul class=${css2.ul}>
<li><a target="_blank" href="https://web3js.readthedocs.io/en/1.0/">web3 version 1.0.0</a></li>
<li><a target="_blank" href="https://docs.ethers.io/ethers.js/html/">ethers.js</a> </li>
<li><a target="_blank" href="https://www.npmjs.com/package/swarmgw">swarmgw</a> </li>
<li>remix (run remix.help() for more info)</li>
</ul>
</li>
<li>Executing common command to interact with the Remix interface (see list of commands above). Note that these commands can also be included and run from a JavaScript script.</li>
<li>Use exports/.register(key, obj)/.remove(key)/.clear() to register and reuse object across script executions.</li>
</ul>
</div>`
var intro = yo`
<div><div> - Welcome to Remix ${packageV.version} - </div><br>
<div>You can use this terminal for: </div>
<ul class=${css2.ul}>
<li>Checking transactions details and start debugging.</li>
<li>Running JavaScript scripts. The following libraries are accessible:
<ul class=${css2.ul}>
<li><a target="_blank" href="https://web3js.readthedocs.io/en/1.0/">web3 version 1.0.0</a></li>
<li><a target="_blank" href="https://docs.ethers.io/ethers.js/html/">ethers.js</a> </li>
<li><a target="_blank" href="https://www.npmjs.com/package/swarmgw">swarmgw</a> </li>
<li>remix (run remix.help() for more info)</li>
</ul>
</li>
<li>Executing common command to interact with the Remix interface (see list of commands above). Note that these commands can also be included and run from a JavaScript script.</li>
<li>Use exports/.register(key, obj)/.remove(key)/.clear() to register and reuse object across script executions.</li>
</ul>
</div>
`
self._shell('remix.help()', self.commands, () => {})
self.commands.html(intro)

Loading…
Cancel
Save