From fde6f4c2ef3aa76dffef1b00d00c1d06eb134fc0 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Fri, 30 Sep 2022 18:41:03 +0100 Subject: [PATCH] change location of dropdown menu --- .../workspace/src/lib/remix-ui-workspace.tsx | 144 ++++++++++-------- 1 file changed, 79 insertions(+), 65 deletions(-) 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 2f9d6589ab..e1695de7a2 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -174,7 +174,7 @@ export function Workspace () { // @ts-ignore uupsRadioRef.current.checked = false } else displayOzCustomRef.current.style.display = 'none' - + // @ts-ignore workspaceCreateInput.current.value = `${workspaceCreateTemplateInput.current.value || 'remixDefault'}_${Date.now()}` } @@ -292,12 +292,75 @@ export function Workspace () { ) } + const workspaceMenuIcons = [ + , + , + , + , + + ] + return (
-
+
@@ -314,67 +377,9 @@ export function Workspace () { className='far fa-plus-square remixui_menuicon' title='Create'> - - - - - + + { selectedWorkspace ? selectedWorkspace.name : currentWorkspace === LOCALHOST ? 'localhost' : NO_WORKSPACE } @@ -386,12 +391,12 @@ export function Workspace () { createWorkspace() }} > - { + { - create a new workspace - } { switchWorkspace(LOCALHOST) }}>{currentWorkspace === LOCALHOST ? ✓ localhost : { LOCALHOST } } - { + { global.fs.browser.workspaces.map(({ name, isGitRepo }, index) => (
+ + { + workspaceMenuIcons.map(m => ( + + {m} + + )) + } +
{ toggleDropdown(false) }}>
{ (global.fs.browser.isRequestingWorkspace || global.fs.browser.isRequestingCloning) &&
} { !(global.fs.browser.isRequestingWorkspace || global.fs.browser.isRequestingCloning) && - (global.fs.mode === 'browser') && (currentWorkspace !== NO_WORKSPACE) && + (global.fs.mode === 'browser') && (currentWorkspace !== NO_WORKSPACE) &&