added plugin back and fixed custom provider ui

pull/5784/head
lianahus 7 days ago
parent b05df605f4
commit 6fae244209
  1. 2
      apps/remix-dapp/src/locales/en/udapp.json
  2. 19
      apps/remix-ide/src/app/providers/external-http-provider.tsx
  3. 2
      apps/remix-ide/src/app/tabs/locales/en/udapp.json
  4. 7
      libs/remix-ui/run-tab/src/lib/components/environment.tsx

@ -152,7 +152,7 @@
"udapp.customVmForkProviderText": "Please provide information about the custom fork. If the node URL is not provided, the VM will start with an empty state.", "udapp.customVmForkProviderText": "Please provide information about the custom fork. If the node URL is not provided, the VM will start with an empty state.",
"udapp.nodeUrl": "Node URL", "udapp.nodeUrl": "Node URL",
"udapp.blockNumber": "Block number (or \"latest\")", "udapp.blockNumber": "Block number (or \"latest\")",
"udapp.externalHttpProviderText1": "Note: To use Geth & https://remix.ethereum.org, configure it to allow requests from Remix:(see <a>Geth Docs on rpc server</a>)", "udapp.externalHttpProviderText1": "Note: To use Geth & https://remix.ethereum.org, configure it to allow requests from Remix: (see <a>Geth Docs on rpc server</a>)",
"udapp.externalHttpProviderText2": "To run Remix & a local Geth test node, use this command: (see <a>Geth Docs on Dev mode</a>)", "udapp.externalHttpProviderText2": "To run Remix & a local Geth test node, use this command: (see <a>Geth Docs on Dev mode</a>)",
"udapp.externalHttpProviderText3": "<b>WARNING:</b> It is not safe to use the --http.corsdomain flag with a wildcard: <b>--http.corsdomain *</b>", "udapp.externalHttpProviderText3": "<b>WARNING:</b> It is not safe to use the --http.corsdomain flag with a wildcard: <b>--http.corsdomain *</b>",
"udapp.externalHttpProviderText4": "For more info: <a>Remix Docs on External HTTP Provider</a>", "udapp.externalHttpProviderText4": "For more info: <a>Remix Docs on External HTTP Provider</a>",

@ -21,7 +21,7 @@ export class ExternalHttpProvider extends AbstractProvider {
const thePath = '<path/to/local/folder/for/test/chain>' const thePath = '<path/to/local/folder/for/test/chain>'
return ( return (
<> <>
<div className=""> <div className="pr-1">
<FormattedMessage <FormattedMessage
id="udapp.externalHttpProviderText1" id="udapp.externalHttpProviderText1"
values={{ values={{
@ -32,8 +32,7 @@ export class ExternalHttpProvider extends AbstractProvider {
) )
}} }}
/> />
<div className="border p-1">geth --http --http.corsdomain https://remix.ethereum.org</div> <div className="border p-1 mt-2 mb-3">geth --http --http.corsdomain https://remix.ethereum.org</div>
<br />
<FormattedMessage <FormattedMessage
id="udapp.externalHttpProviderText2" id="udapp.externalHttpProviderText2"
values={{ values={{
@ -44,14 +43,12 @@ export class ExternalHttpProvider extends AbstractProvider {
) )
}} }}
/> />
<div className="border p-1"> <div className="border p-1 mt-2 mb-3">
geth --http --http.corsdomain="{window.origin}" --http.api web3,eth,debug,personal,net --vmdebug --datadir {thePath} --dev console geth --http --http.corsdomain="{window.origin}" --http.api web3,eth,debug,personal,net --vmdebug --datadir {thePath} --dev console
</div> </div>
<br /> <div className='alert-warning p-1 mb-3 px-2'>
<br /> <FormattedMessage id="udapp.externalHttpProviderText3" values={{ b: (chunks) => <b><p className='pt-2'>{chunks}</p></b> }} />
<FormattedMessage id="udapp.externalHttpProviderText3" values={{ b: (chunks) => <b><>{chunks}</></b> }} /> </div>
<br />
<br />
<FormattedMessage <FormattedMessage
id="udapp.externalHttpProviderText4" id="udapp.externalHttpProviderText4"
values={{ values={{
@ -62,9 +59,9 @@ export class ExternalHttpProvider extends AbstractProvider {
) )
}} }}
/> />
<br /> <label className='pt-4 mb-0'>
<br />
External HTTP Provider Endpoint External HTTP Provider Endpoint
</label>
</div> </div>
</> </>
) )

@ -163,7 +163,7 @@
"udapp.customVmForkProviderText": "Please provide information about the custom fork. If the node URL is not provided, the VM will start with an empty state.", "udapp.customVmForkProviderText": "Please provide information about the custom fork. If the node URL is not provided, the VM will start with an empty state.",
"udapp.nodeUrl": "Node URL", "udapp.nodeUrl": "Node URL",
"udapp.blockNumber": "Block number (or \"latest\")", "udapp.blockNumber": "Block number (or \"latest\")",
"udapp.externalHttpProviderText1": "Note: To use Geth & https://remix.ethereum.org, configure it to allow requests from Remix:(see <a>Geth Docs on rpc server</a>)", "udapp.externalHttpProviderText1": "Note: To use Geth & https://remix.ethereum.org, configure it to allow requests from Remix: (see <a>Geth Docs on rpc server</a>)",
"udapp.externalHttpProviderText2": "To run Remix & a local Geth test node, use this command: (see <a>Geth Docs on Dev mode</a>)", "udapp.externalHttpProviderText2": "To run Remix & a local Geth test node, use this command: (see <a>Geth Docs on Dev mode</a>)",
"udapp.externalHttpProviderText3": "<b>WARNING:</b> It is not safe to use the --http.corsdomain flag with a wildcard: <b>--http.corsdomain *</b>", "udapp.externalHttpProviderText3": "<b>WARNING:</b> It is not safe to use the --http.corsdomain flag with a wildcard: <b>--http.corsdomain *</b>",
"udapp.externalHttpProviderText4": "For more info: <a>Remix Docs on External HTTP Provider</a>", "udapp.externalHttpProviderText4": "For more info: <a>Remix Docs on External HTTP Provider</a>",

@ -121,12 +121,17 @@ export function EnvironmentUI(props: EnvironmentProps) {
<div className="udapp_crow"> <div className="udapp_crow">
<label id="selectExEnv" className="udapp_settingsLabel w-100"> <label id="selectExEnv" className="udapp_settingsLabel w-100">
<FormattedMessage id="udapp.environment" /> <FormattedMessage id="udapp.environment" />
<CustomTooltip placement={'auto-end'} tooltipClasses="text-nowrap" tooltipId="info-recorder" tooltipText={<FormattedMessage id="udapp.tooltipText2" />}>
<a href="https://chainlist.org/" target="_blank">
<i className='udapp_infoDeployAction ml-2 fas fa-plug' aria-hidden="true"></i>
</a>
</CustomTooltip>
{ currentProvider && currentProvider.isVM && isSaveEvmStateChecked && <CustomTooltip placement={'auto-end'} tooltipClasses="text-wrap" tooltipId="forkStatetooltip" tooltipText={<FormattedMessage id="udapp.forkStateTitle" />}> { currentProvider && currentProvider.isVM && isSaveEvmStateChecked && <CustomTooltip placement={'auto-end'} tooltipClasses="text-wrap" tooltipId="forkStatetooltip" tooltipText={<FormattedMessage id="udapp.forkStateTitle" />}>
<i className="udapp_infoDeployAction ml-2 fas fa-code-branch" style={{ cursor: 'pointer' }} onClick={forkState} data-id="fork-state-icon"></i> <i className="udapp_infoDeployAction ml-2 fas fa-code-branch" style={{ cursor: 'pointer' }} onClick={forkState} data-id="fork-state-icon"></i>
</CustomTooltip> } </CustomTooltip> }
{ currentProvider && currentProvider.isVM && isSaveEvmStateChecked && <CustomTooltip placement={'auto-end'} tooltipClasses="text-wrap" tooltipId="deleteVMStatetooltip" tooltipText={<FormattedMessage id="udapp.resetVmStateTitle" />}> { currentProvider && currentProvider.isVM && isSaveEvmStateChecked && <CustomTooltip placement={'auto-end'} tooltipClasses="text-wrap" tooltipId="deleteVMStatetooltip" tooltipText={<FormattedMessage id="udapp.resetVmStateTitle" />}>
<span onClick={resetVmState} style={{ cursor: 'pointer', float: 'right', textTransform: 'none' }}> <span onClick={resetVmState} style={{ cursor: 'pointer', float: 'right', textTransform: 'none' }}>
<i className="udapp_infoDeployAction ml-2 fas fa-refresh" data-id="delete-state-icon"></i> <i className="udapp_infoDeployAction ml-2 fas fa-rotate-right" data-id="delete-state-icon"></i>
<span className="ml-1" style = {{ textTransform: 'none', fontSize: '13px' }}>Reset State</span> <span className="ml-1" style = {{ textTransform: 'none', fontSize: '13px' }}>Reset State</span>
</span> </span>
</CustomTooltip> } </CustomTooltip> }

Loading…
Cancel
Save