udapp min size fixed

pull/5370/head
lianahus 2 years ago committed by Aniket
parent bcd27c169f
commit e807236b62
  1. 2
      libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx
  2. 2
      libs/remix-ui/app/src/lib/remix-app/remix-app.tsx
  3. 2
      libs/remix-ui/helper/src/lib/components/custom-dropdown.tsx
  4. 1
      libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx
  5. 28
      libs/remix-ui/run-tab/src/lib/components/environment.tsx
  6. 2
      libs/remix-ui/run-tab/src/lib/components/recorderCardUI.tsx

@ -61,7 +61,7 @@ const DragBar = (props: IRemixDragBarUi) => {
function stopDrag(data: any) { function stopDrag(data: any) {
setDragState(false) setDragState(false)
console.log("drag") console.log("drag")
if (data.x < props.minWidth) { if (data.x < props.minWidth + offset) {
setDragBarPosX(offset) setDragBarPosX(offset)
props.setHideStatus(true) props.setHideStatus(true)
} else { } else {

@ -85,7 +85,7 @@ const RemixApp = (props: IRemixAppUi) => {
<div className={`remixIDE ${appReady ? '' : 'd-none'}`} data-id="remixIDE"> <div className={`remixIDE ${appReady ? '' : 'd-none'}`} data-id="remixIDE">
<div id="icon-panel" data-id="remixIdeIconPanel" className="iconpanel bg-light">{props.app.menuicons.render()}</div> <div id="icon-panel" data-id="remixIdeIconPanel" className="iconpanel bg-light">{props.app.menuicons.render()}</div>
<div ref={sidePanelRef} id="side-panel" data-id="remixIdeSidePanel" className={`sidepanel border-right border-left ${hideSidePanel ? 'd-none' : ''}`}>{props.app.sidePanel.render()}</div> <div ref={sidePanelRef} id="side-panel" data-id="remixIdeSidePanel" className={`sidepanel border-right border-left ${hideSidePanel ? 'd-none' : ''}`}>{props.app.sidePanel.render()}</div>
<DragBar resetTrigger={resetTrigger} maximiseTrigger={maximiseTrigger} minWidth={290} refObject={sidePanelRef} hidden={hideSidePanel} setHideStatus={setHideSidePanel}></DragBar> <DragBar resetTrigger={resetTrigger} maximiseTrigger={maximiseTrigger} minWidth={285} refObject={sidePanelRef} hidden={hideSidePanel} setHideStatus={setHideSidePanel}></DragBar>
<div id="main-panel" data-id="remixIdeMainPanel" className='mainpanel'> <div id="main-panel" data-id="remixIdeMainPanel" className='mainpanel'>
<RemixUIMainPanel Context={AppContext}></RemixUIMainPanel> <RemixUIMainPanel Context={AppContext}></RemixUIMainPanel>
</div> </div>

@ -13,7 +13,7 @@ export const CustomToggle = React.forwardRef(({ children, onClick, icon, classNa
className={className.replace('dropdown-toggle', '')} className={className.replace('dropdown-toggle', '')}
> >
<div className="d-flex"> <div className="d-flex">
<div className="mr-auto">{ children }</div> <div className="mr-auto text-nowrap">{ children }</div>
{ icon && <div className="pr-1"><i className={`${icon} pr-1`}></i></div> } { icon && <div className="pr-1"><i className={`${icon} pr-1`}></i></div> }
<div><i className="fad fa-sort-circle"></i></div> <div><i className="fad fa-sort-circle"></i></div>
</div> </div>

@ -75,7 +75,6 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => {
try { try {
const result = await publishToIPFS(contract, api) const result = await publishToIPFS(contract, api)
modal(`Published ${contract.name}'s Metadata and Sources`, publishMessage(result.uploaded)) modal(`Published ${contract.name}'s Metadata and Sources`, publishMessage(result.uploaded))
console.log("ptot")
} catch (err) { } catch (err) {
modal('IPFS Publish Failed', publishMessageFailed(storage, err.message)) modal('IPFS Publish Failed', publishMessageFailed(storage, err.message))
} }

@ -28,18 +28,26 @@ export function EnvironmentUI (props: EnvironmentProps) {
<div className="udapp_crow"> <div className="udapp_crow">
<label id="selectExEnv" className="udapp_settingsLabel"> <label id="selectExEnv" className="udapp_settingsLabel">
<FormattedMessage id='udapp.environment' defaultMessage='Environment' /> <FormattedMessage id='udapp.environment' defaultMessage='Environment' />
<CustomTooltip placement={'right'} tooltipClasses="text-nowrap" tooltipId="info-recorder" <CustomTooltip
tooltipText="Open chainlist and add a new provider for the chain you want to interact to."> placement={'right'}
tooltipClasses="text-nowrap"
tooltipId="info-recorder"
tooltipText="Open chainlist and add a new provider for the chain you want to interact to."
>
<a href='https://chainlist.org/' target='_blank'><i style={{ fontSize: 'medium' }} className={'ml-2 fad fa-plug'} aria-hidden="true"></i></a> <a href='https://chainlist.org/' target='_blank'><i style={{ fontSize: 'medium' }} className={'ml-2 fad fa-plug'} aria-hidden="true"></i></a>
</CustomTooltip> </CustomTooltip>
</label> </label>
<div className="udapp_environment"> <div className="udapp_environment">
<Dropdown id="selectExEnvOptions" data-id="settingsSelectEnvOptions" className='udapp_selectExEnvOptions'> <Dropdown id="selectExEnvOptions" data-id="settingsSelectEnvOptions" className='udapp_selectExEnvOptions'>
<Dropdown.Toggle as={CustomToggle} id="dropdown-custom-components" className="btn btn-light btn-block w-100 d-inline-block border border-dark form-control" icon={null}> <Dropdown.Toggle as={CustomToggle} id="dropdown-custom-components" className="btn btn-light btn-block w-100 d-inline-block border border-dark form-control" icon={null}>
{ isL2(currentProvider) && 'L2 - '} { isL2(currentProvider) && 'L2 - '}
{ currentProvider && currentProvider.content } { currentProvider && currentProvider.content }
{ currentProvider && bridges[currentProvider.value] && <CustomTooltip placement={'right'} tooltipClasses="text-nowrap" tooltipId="info-recorder" tooltipText="Click to open a bridge for converting L1 mainnet ETH to the selected network currency."> { currentProvider && bridges[currentProvider.value] && <CustomTooltip
placement={'right'}
tooltipClasses="text-nowrap"
tooltipId="info-recorder"
tooltipText="Click to open a bridge for converting L1 mainnet ETH to the selected network currency."
>
<i style={{ fontSize: 'medium' }} className={'ml-2 fal fa-plug'} aria-hidden="true" onClick={() => { window.open(bridges[currentProvider.value], '_blank') }}></i> <i style={{ fontSize: 'medium' }} className={'ml-2 fal fa-plug'} aria-hidden="true" onClick={() => { window.open(bridges[currentProvider.value], '_blank') }}></i>
</CustomTooltip>} </CustomTooltip>}
</Dropdown.Toggle> </Dropdown.Toggle>
@ -53,14 +61,20 @@ export function EnvironmentUI (props: EnvironmentProps) {
}} }}
data-id={`dropdown-item-${value}`} data-id={`dropdown-item-${value}`}
> >
<span className="pl-3">{ isL2({ value }) && 'L2 - ' }{ content }</span> <span className="">{ isL2({ value }) && 'L2 - ' }{ content }</span>
</Dropdown.Item> </Dropdown.Item>
)) ))
} }
</Dropdown.Menu> </Dropdown.Menu>
</Dropdown> </Dropdown>
<CustomTooltip placement={'bottom-start'} tooltipClasses="text-wrap" tooltipId="runAndDeployAddresstooltip" <CustomTooltip
tooltipText={<FormattedMessage id='udapp.environmentDocs' defaultMessage='Click for docs about Environment' />}> placement={'bottom-start'}
tooltipClasses="text-wrap"
tooltipId="runAndDeployAddresstooltip"
tooltipText={<FormattedMessage
id='udapp.environmentDocs'
defaultMessage='Click for docs about Environment' />}
>
<a href="https://remix-ide.readthedocs.io/en/latest/run.html#environment" target="_blank" rel="noreferrer"><i className="udapp_infoDeployAction ml-2 fas fa-info"></i></a> <a href="https://remix-ide.readthedocs.io/en/latest/run.html#environment" target="_blank" rel="noreferrer"><i className="udapp_infoDeployAction ml-2 fas fa-info"></i></a>
</CustomTooltip> </CustomTooltip>
</div> </div>

@ -28,7 +28,7 @@ export function RecorderUI (props: RecorderProps) {
return ( return (
<div className="udapp_cardContainer list-group-item border border-bottom"> <div className="udapp_cardContainer list-group-item border-top border-bottom">
<div className="udapp_recorderSection d-flex justify-content-between" onClick={toggleClass}> <div className="udapp_recorderSection d-flex justify-content-between" onClick={toggleClass}>
<div className="d-flex justify-content-center align-items-center"> <div className="d-flex justify-content-center align-items-center">
<label className="mt-1 udapp_recorderSectionLabel"> <label className="mt-1 udapp_recorderSectionLabel">

Loading…
Cancel
Save