|
|
|
@ -237,19 +237,22 @@ export function ContractDropdownUI (props: ContractDropdownProps) { |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div className="udapp_container" data-id="contractDropdownContainer"> |
|
|
|
|
<div className=''> |
|
|
|
|
<label className="udapp_settingsLabel">Contract</label> |
|
|
|
|
{ Object.keys(props.contracts.contractList).length > 0 && compilationSource !== '' && <label className='ml-1' data-id="udappCompiledBy">Compiled by {compilationSource}</label> } |
|
|
|
|
{ compilationSource !== '' && compilationSource !== 'remix' && <OverlayTrigger placement={'right'} overlay={ |
|
|
|
|
<Tooltip className="text-nowrap" id="info-sync-compiled-contract"> |
|
|
|
|
<div>Click here to import contracts compiled from an external framework.</div> |
|
|
|
|
<div>This action is enabled when Remix is connected to an external framework (hardhat, truffle, foundry) through remixd.</div>
|
|
|
|
|
</Tooltip> |
|
|
|
|
}> |
|
|
|
|
<button className="btn" onClick={_ => props.syncContracts()}> |
|
|
|
|
<i style={{ cursor: 'pointer' }} className="fa fa-refresh" aria-hidden="true"></i> |
|
|
|
|
</button> |
|
|
|
|
</OverlayTrigger> } |
|
|
|
|
<div className='d-flex justify-content-between'> |
|
|
|
|
<div className="d-flex justify-content-between align-items-end"> |
|
|
|
|
<label className="udapp_settingsLabel pr-1">Contract</label> |
|
|
|
|
<div className="d-flex">{ Object.keys(props.contracts.contractList).length > 0 && compilationSource !== '' && <label data-id="udappCompiledBy">(Compiled by {compilationSource.toUpperCase()})</label>}</div> |
|
|
|
|
</div> |
|
|
|
|
<OverlayTrigger placement={'right'} overlay={ |
|
|
|
|
<Tooltip className="text-nowrap" id="info-sync-compiled-contract"> |
|
|
|
|
<div>Click here to import contracts compiled from an external framework.</div> |
|
|
|
|
<div>This action is enabled when Remix is connected to an external framework (hardhat, truffle, foundry) through remixd.</div>
|
|
|
|
|
</Tooltip> |
|
|
|
|
}> |
|
|
|
|
<button className="btn d-flex py-0" onClick={_ => props.syncContracts()}> |
|
|
|
|
<i style={{ cursor: 'pointer' }} className="fa fa-refresh mr-2 mt-2" aria-hidden="true"></i> |
|
|
|
|
<label data-id="" className="mt-2">HardHat</label> |
|
|
|
|
</button> |
|
|
|
|
</OverlayTrigger> |
|
|
|
|
</div> |
|
|
|
|
<div className="udapp_subcontainer"> |
|
|
|
|
<select ref={contractsRef} value={currentContract} onChange={handleContractChange} className="udapp_contractNames custom-select" disabled={contractOptions.disabled} title={contractOptions.title} style={{ display: loadType === 'abi' && !isContractFile(currentFile) ? 'none' : 'block' }}> |
|
|
|
|