add hamburger menu item

pull/5248/head
Joseph Izang 2 months ago committed by Aniket
parent 2bacabba18
commit 5b83b6f404
  1. 1
      apps/remix-ide/src/app/tabs/locales/en/filePanel.json
  2. 11
      libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx
  3. 10
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -9,6 +9,7 @@
"filePanel.clone": "Clone", "filePanel.clone": "Clone",
"filePanel.download": "Download", "filePanel.download": "Download",
"filePanel.backup": "Backup", "filePanel.backup": "Backup",
"filePanel.localFileSystem": "Connect to Local Filesystem",
"filePanel.restore": "Restore", "filePanel.restore": "Restore",
"filePanel.name": "Name", "filePanel.name": "Name",
"filePanel.save": "Save", "filePanel.save": "Save",

@ -17,6 +17,7 @@ export interface HamburgerMenuProps {
downloadWorkspaces: () => void downloadWorkspaces: () => void
restoreBackup: () => void restoreBackup: () => void
hideIconsMenu: (showMenu: boolean) => void hideIconsMenu: (showMenu: boolean) => void
handleRemixdWorkspace: () => void
showIconsMenu: boolean showIconsMenu: boolean
hideWorkspaceOptions: boolean hideWorkspaceOptions: boolean
hideLocalhostOptions: boolean hideLocalhostOptions: boolean
@ -139,6 +140,16 @@ export function HamburgerMenu(props: HamburgerMenuProps) {
}} }}
platforms={[appPlatformTypes.web]} platforms={[appPlatformTypes.web]}
></HamburgerMenuItem> ></HamburgerMenuItem>
<HamburgerMenuItem
kind="localFileSystem"
fa="far fa-desktop"
hideOption={hideWorkspaceOptions}
actionOnClick={() => {
props.handleRemixdWorkspace()
props.hideIconsMenu(!showIconsMenu)
}}
platforms={[appPlatformTypes.web]}
></HamburgerMenuItem>
</> </>
) )
} }

@ -1044,6 +1044,7 @@ export function Workspace() {
<HamburgerMenu <HamburgerMenu
selectedWorkspace={selectedWorkspace} selectedWorkspace={selectedWorkspace}
createWorkspace={createWorkspace} createWorkspace={createWorkspace}
handleRemixdWorkspace={()=>switchWorkspace(LOCALHOST)}
createBlankWorkspace={createBlankWorkspace} createBlankWorkspace={createBlankWorkspace}
renameCurrentWorkspace={renameCurrentWorkspace} renameCurrentWorkspace={renameCurrentWorkspace}
downloadCurrentWorkspace={downloadCurrentWorkspace} downloadCurrentWorkspace={downloadCurrentWorkspace}
@ -1134,10 +1135,11 @@ export function Workspace() {
{currentWorkspace === LOCALHOST ? ( {currentWorkspace === LOCALHOST ? (
<span>&#10003; Connected to Local Filesystem </span> <span>&#10003; Connected to Local Filesystem </span>
) : ( ) : (
<span className="pl-3"> // <span className="pl-3">
{' '} // {' '}
<FormattedMessage id="filePanel.connectToLocalhost" />{' '} // <FormattedMessage id="filePanel.connectToLocalhost" />{' '}
</span> // </span>
null
)} )}
</Dropdown.Item> </Dropdown.Item>
<ShowNonLocalHostMenuItems /> <ShowNonLocalHostMenuItems />

Loading…
Cancel
Save