pull/4791/head
filip mertens 6 months ago
parent c1435c41cd
commit 10b2a27ce5
  1. 11
      libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx

@ -8,7 +8,8 @@ import WorkspaceTemplate from './workspaceTemplate'
import 'react-multi-carousel/lib/styles.css' import 'react-multi-carousel/lib/styles.css'
import CustomNavButtons from './customNavButtons' import CustomNavButtons from './customNavButtons'
import { appPlatformTypes, platformContext } from '@remix-ui/app' import { appPlatformTypes, platformContext } from '@remix-ui/app'
import { Plugin } from "@remixproject/engine";
import { CustomRemixApi } from '@remix-api'
declare global { declare global {
interface Window { interface Window {
_paq: any _paq: any
@ -69,9 +70,15 @@ function HomeTabGetStarted({ plugin }: HomeTabGetStartedProps) {
let templateDisplayName = TEMPLATE_NAMES[templateName] let templateDisplayName = TEMPLATE_NAMES[templateName]
const metadata = TEMPLATE_METADATA[templateName] const metadata = TEMPLATE_METADATA[templateName]
if (metadata) { if (metadata) {
if (metadata.type === 'git') { if (metadata.type === 'git') {
await plugin.call('dgitApi', 'clone', { url: metadata.url, branch: metadata.branch }, templateDisplayName) await (plugin as Plugin<any, CustomRemixApi>).call('dgitApi', 'clone',
{
url: metadata.url,
branch: metadata.branch,
workspaceName: templateDisplayName
})
} else if (metadata && metadata.type === 'plugin') { } else if (metadata && metadata.type === 'plugin') {
await plugin.appManager.activatePlugin('filePanel') await plugin.appManager.activatePlugin('filePanel')
templateDisplayName = await plugin.call('filePanel', 'getAvailableWorkspaceName', templateDisplayName) templateDisplayName = await plugin.call('filePanel', 'getAvailableWorkspaceName', templateDisplayName)

Loading…
Cancel
Save