Skip to content

Commit

Permalink
add hamburger menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
joeizang authored and Aniket-Engg committed Oct 7, 2024
1 parent 1a1bb60 commit daf40e1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
1 change: 1 addition & 0 deletions apps/remix-ide/src/app/tabs/locales/en/filePanel.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"filePanel.clone": "Clone",
"filePanel.download": "Download",
"filePanel.backup": "Backup",
"filePanel.localFileSystem": "Connect to Local Filesystem",
"filePanel.restore": "Restore",
"filePanel.name": "Name",
"filePanel.save": "Save",
Expand Down
11 changes: 11 additions & 0 deletions libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface HamburgerMenuProps {
downloadWorkspaces: () => void
restoreBackup: () => void
hideIconsMenu: (showMenu: boolean) => void
handleRemixdWorkspace: () => void
showIconsMenu: boolean
hideWorkspaceOptions: boolean
hideLocalhostOptions: boolean
Expand Down Expand Up @@ -139,6 +140,16 @@ export function HamburgerMenu(props: HamburgerMenuProps) {
}}
platforms={[appPlatformTypes.web]}
></HamburgerMenuItem>
<HamburgerMenuItem
kind="localFileSystem"
fa="far fa-desktop"
hideOption={hideWorkspaceOptions}
actionOnClick={() => {
props.handleRemixdWorkspace()
props.hideIconsMenu(!showIconsMenu)
}}
platforms={[appPlatformTypes.web]}
></HamburgerMenuItem>
</>
)
}
Expand Down
10 changes: 6 additions & 4 deletions libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,7 @@ export function Workspace() {
<HamburgerMenu
selectedWorkspace={selectedWorkspace}
createWorkspace={createWorkspace}
handleRemixdWorkspace={()=>switchWorkspace(LOCALHOST)}
createBlankWorkspace={createBlankWorkspace}
renameCurrentWorkspace={renameCurrentWorkspace}
downloadCurrentWorkspace={downloadCurrentWorkspace}
Expand Down Expand Up @@ -1134,10 +1135,11 @@ export function Workspace() {
{currentWorkspace === LOCALHOST ? (
<span>&#10003; Connected to Local Filesystem </span>
) : (
<span className="pl-3">
{' '}
<FormattedMessage id="filePanel.connectToLocalhost" />{' '}
</span>
// <span className="pl-3">
// {' '}
// <FormattedMessage id="filePanel.connectToLocalhost" />{' '}
// </span>
null
)}
</Dropdown.Item>
<ShowNonLocalHostMenuItems />
Expand Down

0 comments on commit daf40e1

Please sign in to comment.