+
@@ -64,8 +72,8 @@ export function RecorderUI(props: RecorderProps) {
-
-
+ { toggleExpander &&
+
-
-
-
+
}>
-
-
-
+
-
+
}
)
}
diff --git a/libs/remix-ui/run-tab/src/lib/run-tab.tsx b/libs/remix-ui/run-tab/src/lib/run-tab.tsx
index f716bbd9a8..9f68cc9944 100644
--- a/libs/remix-ui/run-tab/src/lib/run-tab.tsx
+++ b/libs/remix-ui/run-tab/src/lib/run-tab.tsx
@@ -301,6 +301,7 @@ export function RunTabUI(props: RunTabProps) {
proxy={runTab.proxy}
/>
JSX.Element,
count: number
currentFile: string
+ plugin: RunTab
}
export interface InstanceContainerProps {
diff --git a/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx b/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx
index f4f943dd1c..65d9f6b0db 100644
--- a/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx
+++ b/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx
@@ -190,9 +190,13 @@ export const SolidityUnitTesting = (props: Record) => {
}, []) // eslint-disable-line
const updateDirList = (path: string) => {
- testTabLogic.dirList(path).then((options: string[]) => {
- setPathOptions(options)
- })
+ try {
+ testTabLogic.dirList(path).then((options: string[]) => {
+ setPathOptions(options)
+ })
+ } catch {
+ console.log("No test directory has been found in the workspace.")
+ }
}
const handleTestDirInput = async (e: any) => {
diff --git a/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx b/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx
index 1c7821a461..24c37b400e 100644
--- a/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx
+++ b/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx
@@ -54,7 +54,7 @@ const TerminalWelcomeMessage = ({packageJson, storage}) => {
ethers.js
{' '}
-
+
gpt <your question here> {' '}
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx
index 49ffcf2387..73f11e72fb 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx
@@ -84,49 +84,57 @@ const Icon = ({iconRecord, verticalIconPlugin, contextMenuAction, theme}: IconPr
}
}, [])
+
+ const stylePC = iconRecord.active ? 'flex-start' : 'center'
return (
<>
-
- {
- ;(verticalIconPlugin as any).toggle(name)
- }}
- {...{plugin: name}}
- onContextMenu={(e: any) => {
- e.preventDefault()
- e.stopPropagation()
- handleContextMenu(e)
- }}
- data-id={`verticalIconsKind${name}`}
- id={`verticalIconsKind${name}`}
- ref={iconRef}
+
+ {iconRecord.active &&
}
+
- {
+ ;(verticalIconPlugin as any).toggle(name)
+ }}
+ {...{plugin: name}}
+ onContextMenu={(e: any) => {
+ e.preventDefault()
+ e.stopPropagation()
+ handleContextMenu(e)
+ }}
+ data-id={`verticalIconsKind${name}`}
+ id={`verticalIconsKind${name}`}
+ ref={iconRef}
+ >
+
+
+
+
+ {showContext ? (
+
-
-
-
- {showContext ? (
-
- ) : null}
+ ) : null}
+
>
)
}
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.css b/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.css
index 393ee84773..66287f32fa 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.css
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.css
@@ -3,7 +3,9 @@
width: 42px;
height: 42px;
cursor: pointer;
- }
+ justify-content: space-between;
+ align-self: center;
+}
.remixui_homeIcon:hover {
box-shadow: 0px 0px 14px -7px;
}
@@ -17,8 +19,6 @@
.remixui_icons {
display: flex;
flex-flow: column nowrap;
- justify-content: space-between;
- align-items: center;
}
.remixui_icon:hover {
box-shadow: 0px 0px 14px -7px;
diff --git a/libs/remix-ui/workspace/src/lib/actions/index.ts b/libs/remix-ui/workspace/src/lib/actions/index.ts
index 4ee4af4c0d..a4d25643a9 100644
--- a/libs/remix-ui/workspace/src/lib/actions/index.ts
+++ b/libs/remix-ui/workspace/src/lib/actions/index.ts
@@ -368,8 +368,13 @@ export const emitContextMenuEvent = async (cmd: customAction) => {
}
export const handleClickFile = async (path: string, type: 'file' | 'folder' | 'gist') => {
- await plugin.fileManager.open(path)
- dispatch(focusElement([{ key: path, type }]))
+ if (type === 'file' && path.endsWith('.md')) {
+ // just opening the preview
+ await plugin.call('doc-viewer' as any, 'viewDocs', [path])
+ } else {
+ await plugin.fileManager.open(path)
+ dispatch(focusElement([{ key: path, type }]))
+ }
}
export const handleExpandPath = (paths: string[]) => {
diff --git a/libs/remix-ui/workspace/src/lib/actions/workspace.ts b/libs/remix-ui/workspace/src/lib/actions/workspace.ts
index 0b8122bbf4..c5e124a9e4 100644
--- a/libs/remix-ui/workspace/src/lib/actions/workspace.ts
+++ b/libs/remix-ui/workspace/src/lib/actions/workspace.ts
@@ -1,6 +1,7 @@
import React from 'react'
import { bufferToHex } from '@ethereumjs/util'
import { hash } from '@remix-project/remix-lib'
+import { TEMPLATE_METADATA, TEMPLATE_NAMES } from '../utils/constants'
import axios, { AxiosResponse } from 'axios'
import {
addInputFieldSuccess,
@@ -198,10 +199,13 @@ export const createWorkspace = async (
}
export const createWorkspaceTemplate = async (workspaceName: string, template: WorkspaceTemplate = 'remixDefault') => {
+ const metadata = TEMPLATE_METADATA[template]
if (!workspaceName) throw new Error('workspace name cannot be empty')
if (checkSpecialChars(workspaceName) || checkSlash(workspaceName)) throw new Error('special characters are not allowed')
if ((await workspaceExists(workspaceName)) && template === 'remixDefault') throw new Error('workspace already exists')
- else {
+ else if (metadata) {
+ await plugin.call('dGitProvider', 'clone', {url: metadata.url, branch: metadata.branch}, workspaceName)
+ } else {
const workspaceProvider = plugin.fileProviders.workspace
await workspaceProvider.createWorkspace(workspaceName)
}
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 d46aa060c5..88497ca40f 100644
--- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
+++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
@@ -773,8 +773,15 @@ export function Workspace() {
{intl.formatMessage({id: 'filePanel.rln'})}
+
-