dd a tittle to terminal toggle

pull/5370/head
lianahus 2 years ago committed by Aniket
parent 68600d2a17
commit 02cc51673c
  1. 10
      apps/remix-ide-e2e/src/tests/recorder.test.ts
  2. 128
      libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx
  3. 11
      libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx

@ -95,12 +95,10 @@ module.exports = {
.clickInstance(1) .clickInstance(1)
.pause(1000) .pause(1000)
.clickFunction('set2 - transact (not payable)', { types: 'uint256 _po', values: '10' }) .clickFunction('set2 - transact (not payable)', { types: 'uint256 _po', values: '10' })
.testFunction('last', .testFunction('last', {
{ status: 'true Transaction mined and execution succeed',
status: 'true Transaction mined and execution succeed', 'decoded input': { 'uint256 _po': '10' }
'decoded input': { 'uint256 _po': '10' } })
})
}, },
'Run with live "mode" #group2': function (browser: NightwatchBrowser) { 'Run with live "mode" #group2': function (browser: NightwatchBrowser) {

@ -275,6 +275,12 @@ export function ContractGUI (props: ContractGUIProps) {
className="udapp_contractActionsContainerSingle pt-2" className="udapp_contractActionsContainerSingle pt-2"
style={{ display: toggleContainer ? "none" : "flex" }} style={{ display: toggleContainer ? "none" : "flex" }}
> >
<CustomTooltip
placement={"right"}
tooltipClasses="text-wrap"
tooltipId="remixUdappInstanceButtonTooltip"
tooltipText={toggleUpgradeImp && !proxyAddress ? 'Proxy address cannot be empty' : buttonOptions.title}
>
<button <button
onClick={handleActionClick} onClick={handleActionClick}
className={`udapp_instanceButton ${props.widthClass} btn btn-sm ${buttonOptions.classList}`} className={`udapp_instanceButton ${props.widthClass} btn btn-sm ${buttonOptions.classList}`}
@ -282,47 +288,41 @@ export function ContractGUI (props: ContractGUIProps) {
data-title={buttonOptions.title} data-title={buttonOptions.title}
disabled={(toggleUpgradeImp && !proxyAddress) || props.disabled} disabled={(toggleUpgradeImp && !proxyAddress) || props.disabled}
> >
<CustomTooltip <div>{title}</div>
placement={"right"}
tooltipClasses="text-wrap"
tooltipId="remixUdappInstanceButtonTooltip"
tooltipText={toggleUpgradeImp && !proxyAddress ? 'Proxy address cannot be empty' : buttonOptions.title}
>
<div>{title}</div>
</CustomTooltip>
</button> </button>
<input </CustomTooltip>
className="form-control" <input
data-id={ className="form-control"
data-id={
props.funcABI.type === "fallback" ||
props.funcABI.type === "receive"
? `'(${props.funcABI.type}')`
: "multiParamManagerBasicInputField"
}
placeholder={props.inputs}
onChange={handleBasicInput}
ref={basicInputRef}
style={{
visibility: !(
(props.funcABI.inputs && props.funcABI.inputs.length > 0) ||
props.funcABI.type === "fallback" || props.funcABI.type === "fallback" ||
props.funcABI.type === "receive" props.funcABI.type === "receive"
? `'(${props.funcABI.type}')` )
: "multiParamManagerBasicInputField" ? "hidden"
} : "visible",
placeholder={props.inputs} }}
onChange={handleBasicInput} />
ref={basicInputRef} <i
style={{ className="fas fa-angle-down udapp_methCaret"
visibility: !( onClick={switchMethodViewOn}
(props.funcABI.inputs && props.funcABI.inputs.length > 0) || style={{
props.funcABI.type === "fallback" || visibility: !(
props.funcABI.type === "receive" props.funcABI.inputs && props.funcABI.inputs.length > 0
) )
? "hidden" ? "hidden"
: "visible", : "visible",
}} }}
/> ></i>
<i
className="fas fa-angle-down udapp_methCaret"
onClick={switchMethodViewOn}
style={{
visibility: !(
props.funcABI.inputs && props.funcABI.inputs.length > 0
)
? "hidden"
: "visible",
}}
></i>
</div> </div>
<div <div
className="udapp_contractActionsContainerMulti" className="udapp_contractActionsContainerMulti"
@ -463,14 +463,14 @@ export function ContractGUI (props: ContractGUIProps) {
{" "} {" "}
{inp.name}:{" "} {inp.name}:{" "}
</label> </label>
<input <input
ref={(el) => { ref={(el) => {
initializeFields.current[index] = el; initializeFields.current[index] = el;
}} }}
style={{ height: 32 }} style={{ height: 32 }}
className="form-control udapp_input" className="form-control udapp_input"
placeholder={inp.type} placeholder={inp.type}
/> />
</div> </div>
); );
})} })}
@ -526,26 +526,26 @@ export function ContractGUI (props: ContractGUIProps) {
tooltipText={'Deployed ' + shortenDate(deployment.date)} tooltipText={'Deployed ' + shortenDate(deployment.date)}
key={index} key={index}
> >
<Dropdown.Item <Dropdown.Item
key={index} key={index}
onClick={() => { onClick={() => {
switchProxyAddress(deployment.address) switchProxyAddress(deployment.address)
}} }}
data-id={`proxyAddress${index}`} data-id={`proxyAddress${index}`}
> >
<span>{ proxyAddress === deployment.address ? <span>&#10003; { deployment.contractName + ' ' + shortenProxyAddress(deployment.address) } </span> : <span className="pl-3">{ deployment.contractName + ' ' + shortenProxyAddress(deployment.address) }</span> }</span> <span>{ proxyAddress === deployment.address ? <span>&#10003; { deployment.contractName + ' ' + shortenProxyAddress(deployment.address) } </span> : <span className="pl-3">{ deployment.contractName + ' ' + shortenProxyAddress(deployment.address) }</span> }</span>
</Dropdown.Item> </Dropdown.Item>
</CustomTooltip> </CustomTooltip>
)) ))
} }
</Dropdown.Menu> </Dropdown.Menu>
} }
</Dropdown> </Dropdown>
</div> </div>
<div className='d-flex'> <div className='d-flex'>
<div className="mb-2"> <div className="mb-2">
{ proxyAddressError && <span className='text-lowercase text-danger' data-id="errorMsgProxyAddress" style={{ fontSize: '.8em' }}>{ proxyAddressError }</span> } { proxyAddressError && <span className='text-lowercase text-danger' data-id="errorMsgProxyAddress" style={{ fontSize: '.8em' }}>{ proxyAddressError }</span> }
</div> </div>
</div> </div>
</div> </div>
</> </>

@ -440,8 +440,6 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
setIsOpen(!panels.terminal.minimized) setIsOpen(!panels.terminal.minimized)
}) })
return () => { return () => {
props.plugin.off('layout', 'change') props.plugin.off('layout', 'change')
} }
@ -453,7 +451,14 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
<div style={{ flexGrow: 1 }} className='remix_ui_terminal_panel' ref={panelRef}> <div style={{ flexGrow: 1 }} className='remix_ui_terminal_panel' ref={panelRef}>
<div className="remix_ui_terminal_bar d-flex"> <div className="remix_ui_terminal_bar d-flex">
<div className="remix_ui_terminal_menu d-flex w-100 align-items-center position-relative border-top border-dark bg-light" ref={terminalMenu} data-id="terminalToggleMenu"> <div className="remix_ui_terminal_menu d-flex w-100 align-items-center position-relative border-top border-dark bg-light" ref={terminalMenu} data-id="terminalToggleMenu">
<i className={`mx-2 remix_ui_terminal_toggleTerminal fas ${isOpen ? 'fa-angle-double-down' : 'fa-angle-double-up'}`} data-id="terminalToggleIcon" onClick={handleToggleTerminal}></i> <CustomTooltip
placement="top"
tooltipId="terminalToggle"
tooltipClasses="text-nowrap"
tooltipText={isOpen ? "Hide Terminal" : "Show Terminal"}
>
<i className={`mx-2 remix_ui_terminal_toggleTerminal fas ${isOpen ? 'fa-angle-double-down' : 'fa-angle-double-up'}`} data-id="terminalToggleIcon" onClick={handleToggleTerminal}></i>
</CustomTooltip>
<div className="mx-2 remix_ui_terminal_console" id="clearConsole" data-id="terminalClearConsole" onClick={handleClearConsole} > <div className="mx-2 remix_ui_terminal_console" id="clearConsole" data-id="terminalClearConsole" onClick={handleClearConsole} >
<CustomTooltip <CustomTooltip
placement="top" placement="top"

Loading…
Cancel
Save