add save icon

pull/4538/head
aniket-engg 9 months ago committed by Aniket
parent 0a1b112c89
commit d6e8046339
  1. 1
      apps/remix-ide/src/app/tabs/locales/en/udapp.json
  2. 12
      libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx

@ -99,6 +99,7 @@
"udapp._comment_universalDappUI.tsx": "libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx",
"udapp.tooltipText7": "Remove from the list",
"udapp.tooltipText14": "Save contract",
"udapp.tooltipText8": "Click for docs about using 'receive'/'fallback'",
"udapp.tooltipText9": "The Calldata to send to fallback function of the contract.",
"udapp.tooltipText10": "Send data to contract.",

@ -115,6 +115,10 @@ export function UniversalDappUI(props: UdappProps) {
props.removeInstance(props.index)
}
const saveContract = () => {
console.log('save is clicked')
}
const runTransaction = (lookupOnly, funcABI: FuncABI, valArr, inputsValues, funcIndex?: number) => {
const functionName = funcABI.type === 'function' ? funcABI.name : `(${funcABI.type})`
const logMsg = `${lookupOnly ? 'call' : 'transact'} to ${props.instance.name}.${functionName}`
@ -227,10 +231,16 @@ export function UniversalDappUI(props: UdappProps) {
{props.instance.name} at {shortenAddress(address)} ({props.context})
</span>
</div>
<div className="btn">
<div className="btn" style={{padding: '0.15rem'}}>
<CopyToClipboard tip={intl.formatMessage({id: 'udapp.copy'})} content={address} direction={'top'} />
</div>
<div className="btn" style={{padding: '0.15rem', marginLeft: '-0.5rem'}}>
<CustomTooltip placement="top" tooltipClasses="text-nowrap" tooltipId="udapp_udappSaveTooltip" tooltipText={<FormattedMessage id="udapp.tooltipText14" />}>
<i className="far fa-save p-2" aria-hidden="true" data-id="universalDappUiUdappSave" onClick={saveContract}></i>
</CustomTooltip>
</div>
</div>
<CustomTooltip placement="right" tooltipClasses="text-nowrap" tooltipId="udapp_udappCloseTooltip" tooltipText={<FormattedMessage id="udapp.tooltipText7" />}>
<i className="udapp_closeIcon m-1 fas fa-times align-self-center" aria-hidden="true" data-id="universalDappUiUdappClose" onClick={remove}></i>
</CustomTooltip>

Loading…
Cancel
Save