diff --git a/libs/remix-ui/workspace/src/lib/actions/workspace.ts b/libs/remix-ui/workspace/src/lib/actions/workspace.ts index f25827373c..a37759044e 100644 --- a/libs/remix-ui/workspace/src/lib/actions/workspace.ts +++ b/libs/remix-ui/workspace/src/lib/actions/workspace.ts @@ -488,7 +488,6 @@ export const cloneRepository = async (url: string) => { } } - export const checkGit = async () => { const isGitRepo = await plugin.fileManager.isGitRepo() dispatch(setCurrentWorkspaceIsGitRepo(isGitRepo)) diff --git a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx index b0976a49f2..0dc1e37fc6 100644 --- a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx +++ b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx @@ -1,9 +1,6 @@ import React from 'react' -import { CustomTooltip } from '@remix-ui/helper' import { Dropdown } from 'react-bootstrap' -import { FormattedMessage } from 'react-intl' - -const _paq = window._paq = window._paq || [] +import { HamburgerMenuItem } from './workspace-hamburger-item' export interface HamburgerMenuProps { createWorkspace: () => void, @@ -24,326 +21,51 @@ export interface HamburgerMenuProps { export function HamburgerMenu (props: HamburgerMenuProps) { const { showIconsMenu, hideWorkspaceOptions, hideLocalhostOptions } = props - return ( - <> - - } - > -
{ - props.createWorkspace() - _paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'workspaceCreate']) - props.hideIconsMenu(!showIconsMenu) - }} - key={`workspacesCreate-fe-ws`} - > - - -
-
-
- - } - > -
{ - props.deleteCurrentWorkspace() - _paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'workspaceDelete']) - props.hideIconsMenu(!showIconsMenu) - }} - key={`workspacesDelete-fe-ws`} - > - - -
-
-
- - } - > -
{ - props.deleteAllWorkspaces() - _paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'workspaceDeleteAll']) - props.hideIconsMenu(!showIconsMenu) - }} - key={`workspacesDeleteAll-fe-ws`} - > - - -
-
-
- - } - > -
{ - props.renameCurrentWorkspace() - _paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'workspaceRename']) - props.hideIconsMenu(!showIconsMenu) - }} - data-id='workspaceRename' - key={`workspacesRename-fe-ws`} - > - - -
-
-
- - - } - > -
{ - props.cloneGitRepository() - _paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'cloneGitRepository']) - props.hideIconsMenu(!showIconsMenu) - }} - key={`cloneGitRepository-fe-ws`} - > - - -
-
-
- - - } - > -
{ - props.downloadWorkspaces() - _paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'workspacesDownload']) - props.hideIconsMenu(!showIconsMenu) - }} - key={`workspacesDownload-fe-ws`} - > - - -
-
-
- - } - > -
{ - props.restoreBackup() - _paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'workspacesRestore']) - props.hideIconsMenu(!showIconsMenu) - }} - key={`workspacesRestore-fe-ws`} - > - - -
-
-
- - - } - > -
{ - props.addGithubAction() - _paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'addSolidityTesting']) - props.hideIconsMenu(!showIconsMenu) - }} - > - - {} -
-
-
- - } - > -
{ - props.addTsSolTestGithubAction() - _paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'addTsSolTestingAction']) - props.hideIconsMenu(!showIconsMenu) - }} - > - - {} -
-
-
- - } - > -
{ - props.addSlitherGithubAction() - _paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'addSlitherAction']) - props.hideIconsMenu(!showIconsMenu) - }} - > - - {} -
-
-
- - ) - } + return ( + <> + { + props.createWorkspace() + props.hideIconsMenu(!showIconsMenu) + }}> + { + props.deleteCurrentWorkspace() + props.hideIconsMenu(!showIconsMenu) + }}> + { + props.deleteAllWorkspaces() + props.hideIconsMenu(!showIconsMenu) + }}> + { + props.renameCurrentWorkspace() + props.hideIconsMenu(!showIconsMenu) + }}> + + { + props.cloneGitRepository() + props.hideIconsMenu(!showIconsMenu) + }}> + + { + props.downloadWorkspaces() + props.hideIconsMenu(!showIconsMenu) + }}> + { + props.restoreBackup() + props.hideIconsMenu(!showIconsMenu) + }}> + + { + props.addGithubAction() + props.hideIconsMenu(!showIconsMenu) + }}> + { + props.addTsSolTestGithubAction() + props.hideIconsMenu(!showIconsMenu) + }}> + { + props.addSlitherGithubAction() + props.hideIconsMenu(!showIconsMenu) + }}> + + ) + } \ No newline at end of file