diff --git a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json index 9474dfbac2..05fef4beab 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json +++ b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json @@ -66,7 +66,8 @@ "filePanel.workspace.publishToGist": "Publish workspace to GitHub gist", "filePanel.uploadFile": "Upload files", "filePanel.uploadFolder": "Upload folder", - "filePanel.updateGist": "Publish workspace to GitHub gist", + "filePanel.updateGist": "Update Gist", + "filePanel.workspace.updateGist": "Publish Gist update", "filePanel.viewAllBranches": "View all branches", "filePanel.createBranch": "Create branch", "filePanel.switchBranches": "Switch branches", 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 6d8fd1f0c6..8960ad22c6 100644 --- a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx +++ b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx @@ -2,8 +2,10 @@ import { appPlatformTypes } from '@remix-ui/app' import React from 'react' import {Dropdown} from 'react-bootstrap' import {HamburgerMenuItem, HamburgerSubMenuItem} from './workspace-hamburger-item' +import { WorkspaceMetadata } from '../types' export interface HamburgerMenuProps { + selectedWorkspace: WorkspaceMetadata createWorkspace: () => void renameCurrentWorkspace: () => void downloadCurrentWorkspace: () => void @@ -25,7 +27,7 @@ export interface HamburgerMenuProps { } export function HamburgerMenu(props: HamburgerMenuProps) { - const {showIconsMenu, hideWorkspaceOptions, hideLocalhostOptions, hideFileOperations} = props + const {showIconsMenu, hideWorkspaceOptions, hideLocalhostOptions, hideFileOperations, selectedWorkspace} = props return ( <> { diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 25d48e3115..68cd0b7608 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -9,7 +9,7 @@ import './css/remix-ui-workspace.css' import {ROOT_PATH, TEMPLATE_NAMES} from './utils/constants' import {HamburgerMenu} from './components/workspace-hamburger' -import {MenuItems, WorkSpaceState} from './types' +import {MenuItems, WorkSpaceState, WorkspaceMetadata} from './types' import {contextMenuActions} from './utils' import FileExplorerContextMenu from './components/file-explorer-context-menu' import { customAction } from '@remixproject/plugin-api' @@ -27,14 +27,7 @@ export function Workspace() { const LOCALHOST = ' - connect to localhost - ' const NO_WORKSPACE = ' - none - ' const [currentWorkspace, setCurrentWorkspace] = useState(NO_WORKSPACE) - const [selectedWorkspace, setSelectedWorkspace] = useState<{ - name: string - isGitRepo: boolean - hasGitSubmodules?: boolean - branches?: {remote: any; name: string}[] - currentBranch?: string - isGist: string - }>(null) + const [selectedWorkspace, setSelectedWorkspace] = useState(null) const [showDropdown, setShowDropdown] = useState(false) const [showIconsMenu, hideIconsMenu] = useState(false) const [showBranches, setShowBranches] = useState(false) @@ -952,6 +945,7 @@ export function Workspace() { > void createWorkspace: (name: string, workspaceTemplateName: string) => void