reordered hamburger

pull/5260/head
lianahus 1 month ago committed by Aniket
parent a6b7b6b557
commit ad9779e262
  1. 2
      apps/remix-dapp/src/components/SettingsUI/account.tsx
  2. 14
      libs/remix-ui/workspace/src/lib/components/file-explorer-menu.tsx
  3. 1
      libs/remix-ui/workspace/src/lib/components/file-explorer.tsx
  4. 22
      libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx
  5. 3
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
  6. 1
      libs/remix-ui/workspace/src/lib/types/index.ts

@ -33,7 +33,7 @@ export function AccountUI() {
id="txorigin"
data-id="runTabSelectAccount"
name="txorigin"
className="form-control overflow-hidden w-100 font-weight-normal custom-select pr-4"
className="form-control overflow-hidden w-100 font-weight-normals custom-select pr-4"
value={selectedAccount || ''}
onChange={(e) => {
setAccount(e.target.value);

@ -54,13 +54,6 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => {
placement: 'top',
platforms: [appPlatformTypes.web, appPlatformTypes.desktop]
},
{
action: 'connectToLocalFileSystem',
title: 'Connect to local filesystem using remixd',
icon: 'fa-solid fa-desktop',
placement: 'top',
platforms: [appPlatformTypes.web]
},
{
action: 'initializeWorkspaceAsGitRepo',
title: 'Initialize workspace as a git repository',
@ -154,7 +147,7 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => {
return (
<CustomTooltip
placement={placement as Placement}
tooltipId="uploadFolderTooltip"
tooltipId="initializeWorkspaceAsGitRepoTooltip"
tooltipClasses="text-nowrap"
tooltipText={<FormattedMessage id={`filePanel.${action}`} defaultMessage={title} />}
key={`index-${action}-${placement}-${icon}`}
@ -162,7 +155,7 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => {
<label
id={action}
style={{ fontSize: '1.1rem', cursor: 'pointer' }}
data-id={'fileExplorerUploadFolder' + action}
data-id={'fileExplorerInitializeWorkspaceAsGitRepo' + action}
className={icon + ' mx-1 remixui_menuItem'}
key={`index-${action}-${placement}-${icon}`}
onClick={() => {
@ -195,9 +188,6 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => {
props.createNewFolder()
} else if (action === 'publishToGist' || action == 'updateGist') {
props.publishToGist()
} else if (action === 'connectToLocalFileSystem') {
_paq.push(['trackEvent', 'fileExplorer', 'fileAction', action])
props.connectToLocalFileSystem()
} else if (action === 'importFromIpfs') {
_paq.push(['trackEvent', 'fileExplorer', 'fileAction', action])
props.importFromIpfs('Ipfs', 'ipfs hash', ['ipfs://QmQQfBMkpDgmxKzYaoAtqfaybzfgGm9b2LWYyT56Chv6xH'], 'ipfs://')

@ -615,7 +615,6 @@ export const FileExplorer = (props: FileExplorerProps) => {
uploadFolder={uploadFolder}
importFromIpfs={props.importFromIpfs}
importFromHttps={props.importFromHttps}
connectToLocalFileSystem={() => props.connectToLocalFileSystem()}
handleGitInit={handleGitInit}
/>
</div>

@ -99,6 +99,17 @@ export function HamburgerMenu(props: HamburgerMenuProps) {
platforms={[appPlatformTypes.web]}
></HamburgerMenuItem>
<Dropdown.Divider className="border mb-0 mt-0 remixui_menuhr" style={{ pointerEvents: 'none' }} />
<HamburgerMenuItem
kind="localFileSystem"
fa="far fa-desktop"
hideOption={hideWorkspaceOptions}
actionOnClick={() => {
props.handleRemixdWorkspace()
props.hideIconsMenu(!showIconsMenu)
}}
platforms={[appPlatformTypes.web]}
></HamburgerMenuItem>
<Dropdown.Divider className="border mb-0 mt-0 remixui_menuhr" style={{ pointerEvents: 'none' }} />
<HamburgerMenuItem
kind={selectedWorkspace.isGist ? "updateGist" : "publishToGist"}
fa="fab fa-github"
@ -140,17 +151,6 @@ export function HamburgerMenu(props: HamburgerMenuProps) {
}}
platforms={[appPlatformTypes.web]}
></HamburgerMenuItem>
<Dropdown.Divider className="border mb-0 mt-0 remixui_menuhr" style={{ pointerEvents: 'none' }} />
<HamburgerMenuItem
kind="localFileSystem"
fa="far fa-desktop"
hideOption={hideWorkspaceOptions}
actionOnClick={() => {
props.handleRemixdWorkspace()
props.hideIconsMenu(!showIconsMenu)
}}
platforms={[appPlatformTypes.web]}
></HamburgerMenuItem>
</>
)
}

@ -1157,7 +1157,7 @@ export function Workspace() {
<FileExplorer
fileState={global.fs.browser.fileState}
name={currentWorkspace}
menuItems={['createNewFile', 'createNewFolder', selectedWorkspace && selectedWorkspace.isGist ? 'updateGist' : 'publishToGist', canUpload ? 'uploadFile' : '', canUpload ? 'uploadFolder' : '', 'importFromIpfs','importFromHttps', 'connectToLocalFileSystem', 'initializeWorkspaceAsGitRepo']}
menuItems={['createNewFile', 'createNewFolder', selectedWorkspace && selectedWorkspace.isGist ? 'updateGist' : 'publishToGist', canUpload ? 'uploadFile' : '', canUpload ? 'uploadFolder' : '', 'importFromIpfs','importFromHttps', 'initializeWorkspaceAsGitRepo']}
contextMenuItems={global.fs.browser.contextMenu.registeredMenuItems}
removedContextMenuItems={global.fs.browser.contextMenu.removedMenuItems}
files={global.fs.browser.files}
@ -1217,7 +1217,6 @@ export function Workspace() {
renamePath={editModeOn}
importFromIpfs={importFromUrl}
importFromHttps={importFromUrl}
connectToLocalFileSystem={()=>switchWorkspace(LOCALHOST)}
canPaste={canPaste}
hasCopied={hasCopied}
setHasCopied={setHasCopied}

@ -159,7 +159,6 @@ export interface FileExplorerProps {
dragStatus: (status: boolean) => void
importFromIpfs: any
importFromHttps: any
connectToLocalFileSystem?: any
handleGitInit?: () => Promise<void>
handleMultiCopies: any
feTarget: { key: string, type: 'file' | 'folder' }[]

Loading…
Cancel
Save