diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx index 2a2817f4c6..ea349ca8cb 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import React, { useEffect, useRef, useContext } from 'react' import { useIntl, FormattedMessage } from 'react-intl' +import { TEMPLATE_NAMES } from '@remix-ui/workspace' import { ThemeContext} from '../themeContext' import Carousel from 'react-multi-carousel' import WorkspaceTemplate from './workspaceTemplate' @@ -59,8 +60,9 @@ function HomeTabGetStarted ({plugin}: HomeTabGetStartedProps) { const createWorkspace = async (templateName) => { await plugin.appManager.activatePlugin('filePanel') const timeStamp = Date.now() - await plugin.call('filePanel', 'createWorkspace', templateName + "_" + timeStamp, templateName) - await plugin.call('filePanel', 'setWorkspace', templateName + "_" + timeStamp) + const templateDisplayName = TEMPLATE_NAMES[templateName] + await plugin.call('filePanel', 'createWorkspace', templateDisplayName + " " + timeStamp, templateName) + await plugin.call('filePanel', 'setWorkspace', templateDisplayName + " " + timeStamp) plugin.verticalIcons.select('filePanel') _paq.push(['trackEvent', 'hometab', 'homeGetStarted', templateName]) } diff --git a/libs/remix-ui/workspace/src/index.ts b/libs/remix-ui/workspace/src/index.ts index c9e5b5355b..57cffde452 100644 --- a/libs/remix-ui/workspace/src/index.ts +++ b/libs/remix-ui/workspace/src/index.ts @@ -1,3 +1,4 @@ export * from './lib/providers/FileSystemProvider' export * from './lib/contexts' +export * from './lib/utils/constants' export { FileType } from './lib/types/index' \ No newline at end of file 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 55e625b4e3..d3e61ea39a 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -5,7 +5,7 @@ import { CustomIconsToggle, CustomMenu, CustomToggle, CustomTooltip } from '@rem import { FileExplorer } from './components/file-explorer' // eslint-disable-line import { FileSystemContext } from './contexts' import './css/remix-ui-workspace.css' -import { ROOT_PATH } from './utils/constants' +import { ROOT_PATH, TEMPLATE_NAMES } from './utils/constants' import { HamburgerMenu } from './components/workspace-hamburger' const _paq = window._paq = window._paq || [] @@ -231,7 +231,7 @@ export function Workspace () { } else displayOzCustomRef.current.style.display = 'none' // @ts-ignore - workspaceCreateInput.current.value = `${workspaceCreateTemplateInput.current.value || 'remixDefault'}_${Date.now()}` + workspaceCreateInput.current.value = `${TEMPLATE_NAMES[workspaceCreateTemplateInput.current.value || 'remixDefault']} ${Date.now()}` } const handleTypingUrl = () => { @@ -303,7 +303,7 @@ export function Workspace () { +