address review comments

pull/5370/head
Joseph Izang 2 years ago
parent e417d6255a
commit bfc4c14795
  1. 28
      libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx
  2. 20
      libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx

@ -275,13 +275,25 @@ export function ContractDropdownUI(props: ContractDropdownProps) {
: null} : null}
</div> </div>
<div className="udapp_subcontainer"> <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' }}> <OverlayTrigger
placement={"right"}
overlay={
<Tooltip
className="text-nowrap"
id="remixUdappContractNamesTooltip"
>
<span>{contractOptions.title}</span>
</Tooltip>
}
>
<select ref={contractsRef} value={currentContract} onChange={handleContractChange} className="udapp_contractNames custom-select" disabled={contractOptions.disabled} style={{ display: loadType === 'abi' && !isContractFile(currentFile) ? 'none' : 'block' }}>
{(contractList[currentFile] || []).map((contract, index) => { {(contractList[currentFile] || []).map((contract, index) => {
return <option key={index} value={contract.alias}> return <option key={index} value={contract.alias}>
{contract.alias} - {contract.file} {contract.alias} - {contract.file}
</option> </option>
})} })}
</select> </select>
</OverlayTrigger>
<span className="py-1" style={{ display: abiLabel.display }}>{abiLabel.content}</span> <span className="py-1" style={{ display: abiLabel.display }}>{abiLabel.content}</span>
</div> </div>
<div> <div>
@ -329,20 +341,28 @@ export function ContractDropdownUI(props: ContractDropdownProps) {
</div> </div>
<div className="udapp_orLabel mt-2" style={{ display: loadType === 'abi' && !isContractFile(currentFile) ? 'none' : 'block' }}>or</div> <div className="udapp_orLabel mt-2" style={{ display: loadType === 'abi' && !isContractFile(currentFile) ? 'none' : 'block' }}>or</div>
<div className="udapp_button udapp_atAddressSect "> <div className="udapp_button udapp_atAddressSect ">
<OverlayTrigger placement={'bottom-end'} overlay={ <OverlayTrigger placement={'top-end'} overlay={
<Tooltip className="text-wrap" id="runAndDeployAddresstooltip"> <Tooltip className="text-wrap" id="runAndDeployAddresstooltip">
<span>{atAddressOptions.title}</span> <span>{atAddressOptions.title}</span>
</Tooltip> </Tooltip>
}> }>
<button className="udapp_atAddress btn btn-sm btn-info" id="runAndDeployAtAdressButton" disabled={atAddressOptions.disabled} onClick={loadFromAddress} data-title={atAddressOptions.title}>At Address</button> <div onClick={loadFromAddress}>
<button className="udapp_atAddress btn btn-sm btn-info" id="runAndDeployAtAdressButton" disabled={atAddressOptions.disabled} style={{ pointerEvents: 'none' }} onClick={loadFromAddress} data-title={atAddressOptions.title}
>At Address</button>
</div>
</OverlayTrigger> </OverlayTrigger>
<OverlayTrigger placement={'top-end'} overlay={
<Tooltip className="text-wrap" id="runAndDeployAddressInputtooltip">
<span>{"address of contract"}</span>
</Tooltip>
}>
<input <input
ref={atAddressValue} ref={atAddressValue}
className="udapp_input udapp_ataddressinput ataddressinput form-control" className="udapp_input udapp_ataddressinput ataddressinput form-control"
placeholder="Load contract from Address" placeholder="Load contract from Address"
title="address of contract"
onChange={atAddressChanged} onChange={atAddressChanged}
/> />
</OverlayTrigger>
</div> </div>
</div> </div>
</div> </div>

@ -347,21 +347,37 @@ export function UniversalDappUI (props: UdappProps) {
<div className="d-flex flex-column align-items-start"> <div className="d-flex flex-column align-items-start">
<label className="">CALLDATA</label> <label className="">CALLDATA</label>
<div className="d-flex justify-content-end w-100 align-items-center"> <div className="d-flex justify-content-end w-100 align-items-center">
<OverlayTrigger
placement="bottom"
overlay={
<Tooltip className="text-nowrap" id="deployAndRunLLTxCalldataInputTooltip">
<span>{"The Calldata to send to fallback function of the contract."}</span>
</Tooltip>
}
>
<input <input
id="deployAndRunLLTxCalldata" id="deployAndRunLLTxCalldata"
onChange={handleCalldataChange} onChange={handleCalldataChange}
className="udapp_calldataInput form-control" className="udapp_calldataInput form-control"
title="The Calldata to send to fallback function of the contract."
/> />
</OverlayTrigger>
<OverlayTrigger
placement="right"
overlay={
<Tooltip className="text-nowrap" id="deployAndRunLLTxCalldataTooltip">
<span>Send data to contract.</span>
</Tooltip>
}
>
<button <button
id="deployAndRunLLTxSendTransaction" id="deployAndRunLLTxSendTransaction"
data-id="pluginManagerSettingsDeployAndRunLLTxSendTransaction" data-id="pluginManagerSettingsDeployAndRunLLTxSendTransaction"
className="btn udapp_instanceButton p-0 w-50 border-warning text-warning" className="btn udapp_instanceButton p-0 w-50 border-warning text-warning"
title="Send data to contract."
onClick={sendData} onClick={sendData}
> >
Transact Transact
</button> </button>
</OverlayTrigger>
</div> </div>
</div> </div>
<div> <div>

Loading…
Cancel
Save