diff --git a/libs/remix-ui/workspace/src/index.ts b/libs/remix-ui/workspace/src/index.ts index b6c5ded2a1..97b8a61e38 100644 --- a/libs/remix-ui/workspace/src/index.ts +++ b/libs/remix-ui/workspace/src/index.ts @@ -1 +1 @@ -export * from './lib/remix-ui-workspace'; +export * from './lib/remix-ui-workspace' 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 d21f42a64a..d97990e788 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -1,6 +1,6 @@ -import React, { useState, useEffect, useRef } from 'react'; +import React, { useState, useEffect, useRef } from 'react' // eslint-disable-line import { FileExplorer } from '@remix-ui/file-explorer' // eslint-disable-line -import './remix-ui-workspace.css'; +import './remix-ui-workspace.css' import { ModalDialog } from '@remix-ui/modal-dialog' // eslint-disable-line /* eslint-disable-next-line */ @@ -79,11 +79,11 @@ export const Workspace = (props: WorkspaceProps) => { }, [props.workspaces]) useEffect(() => { - props.localhost.event.register('connected', (event) => { + props.localhost.event.register('connected', () => { remixdExplorer.show() }) - - props.localhost.event.register('disconnected', (event) => { + + props.localhost.event.register('disconnected', () => { remixdExplorer.hide() }) @@ -193,15 +193,15 @@ export const Workspace = (props: WorkspaceProps) => { props.browser.remove(workspacesPath + '/' + state.currentWorkspace) const name = state.currentWorkspace setWorkspace(NO_WORKSPACE) - props.workspaceDeleted({ name }) + props.workspaceDeleted({ name }) } - /**** ****/ + /** ** ****/ const resetFocus = (reset) => { setState(prevState => { return { ...prevState, reset } }) - } + } const setWorkspace = async (name) => { if (name === LOCALHOST) { @@ -280,77 +280,77 @@ export const Workspace = (props: WorkspaceProps) => { // setWorkspace(value) // } - + return (
- - { (typeof state.modal.message !== 'string') && state.modal.message } - -
resetFocus(true)}> -
-
-
-
+
+
+
+
+ { state.hideRemixdExplorer && state.currentWorkspace && state.currentWorkspace !== NO_WORKSPACE && state.currentWorkspace !== LOCALHOST && { displayInput={state.displayNewFile} externalUploads={state.uploadFileEvent} /> - } -
-
- { !state.hideRemixdExplorer && + } +
+
+ { !state.hideRemixdExplorer && { focusRoot={state.reset} contextMenuItems={props.registeredMenuItems} /> - } -
-
- { false && - } -
+ } +
+
+ { false && + }
- ); -}; + + ) +} -export default Workspace; +export default Workspace diff --git a/package.json b/package.json index 15cf1aa57a..f00126d58d 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "workspace-schematic": "nx workspace-schematic", "dep-graph": "nx dep-graph", "help": "nx help", - "lint:libs": "nx run-many --target=lint --projects=remix-analyzer,remix-astwalker,remix-debug,remix-lib,remix-simulator,remix-solidity,remix-tests,remix-url-resolver,remixd,remix-ui-tree-view,remix-ui-modal-dialog,remix-ui-toaster,remix-ui-file-explorer,remix-ui-debugger-ui", + "lint:libs": "nx run-many --target=lint --projects=remix-analyzer,remix-astwalker,remix-debug,remix-lib,remix-simulator,remix-solidity,remix-tests,remix-url-resolver,remixd,remix-ui-tree-view,remix-ui-modal-dialog,remix-ui-toaster,remix-ui-file-explorer,remix-ui-debugger-ui,remix-ui-workspace", "build:libs": "nx run-many --target=build --parallel=false --with-deps=true --projects=remix-analyzer,remix-astwalker,remix-debug,remix-lib,remix-simulator,remix-solidity,remix-tests,remix-url-resolver,remixd", "test:libs": "nx run-many --target=test --projects=remix-analyzer,remix-astwalker,remix-debug,remix-lib,remix-simulator,remix-solidity,remix-tests,remix-url-resolver,remixd", "publish:libs": "npm run build:libs & lerna publish --skip-git & npm run bumpVersion:libs",