unsave icon

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

@ -72,6 +72,8 @@
"udapp.savedContracts": "Saved Contracts",
"udapp.NoSavedInstanceText": "Currently you have no saved contracts to interact with.",
"udapp.tooltipTextUnsave": "Delete from saved list",
"udapp._comment_recorderCardUI.tsx": "libs/remix-ui/run-tab/src/lib/components/recorderCardUI.tsx",

@ -115,6 +115,10 @@ export function UniversalDappUI(props: UdappProps) {
props.removeInstance(props.index)
}
const unsave = () => {
console.log('unsave is clicked')
}
const saveContract = async() => {
// const address = ethJSUtil.toChecksumAddress(props.instance.address)
const env = await props.plugin.call('blockchain', 'getProvider')
@ -262,9 +266,13 @@ export function UniversalDappUI(props: UdappProps) {
</div> ) : null }
</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>
{ !props.isSavedContract ?
( <CustomTooltip placement="top" 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> ) :
( <CustomTooltip placement="top" tooltipClasses="text-nowrap" tooltipId="udapp_udappDeleteTooltip" tooltipText={<FormattedMessage id="udapp.tooltipTextUnsave" />}>
<i className="udapp_closeIcon m-1 far fa-trash-alt align-self-center" aria-hidden="true" data-id="universalDappUiUdappClose" onClick={unsave}></i>
</CustomTooltip> )}
</div>
<div className="udapp_cActionsWrapper" data-id="universalDappUiContractActionWrapper">
<div className="udapp_contractActionsContainer">

Loading…
Cancel
Save