adding copy to clipboard without much instructions

pull/1/head
Rob Stupay 7 years ago
parent 620a0fa127
commit 103f144559
  1. 8
      src/multiParamManager.js
  2. 5
      src/universal-dapp-styles.js

@ -2,6 +2,9 @@
var yo = require('yo-yo')
var css = require('./universal-dapp-styles')
var copyToClipboard = require('./app/ui/copy-to-clipboard')
var remixLib = require('remix-lib')
var txFormat = remixLib.execution.txFormat
class MultiParamManager {
@ -147,6 +150,11 @@ class MultiParamManager {
${this.multiFields}
<div class="${css.group} ${css.multiArg}" >
${button}
${copyToClipboard(() => {
var multiString = this.getMultiValsString()
var multiJSON = JSON.parse('[' + multiString + ']')
return txFormat.encodeData(this.funABI, multiJSON)
})}
</div>
</div>
</div>`

@ -237,6 +237,11 @@ var css = csjs`
border-bottom-right-radius: 0;
border-right: 0;
}
.contractActionsContainerMultiInner .multiArg i {
padding-right: 26px;
padding-top: 5px;
float: right;
}
`
module.exports = css

Loading…
Cancel
Save