初始化项目启动器代码

This commit is contained in:
xintaofei
2026-03-27 13:05:27 +08:00
parent 77204e2295
commit 7c89e150f9
25 changed files with 1434 additions and 15 deletions

View File

@@ -1,10 +1,10 @@
"use client"
import { useState } from "react"
import { FolderOpen, GitBranch } from "lucide-react"
import { FolderOpen, GitBranch, Rocket } from "lucide-react"
import { useTranslations } from "next-intl"
import { toast } from "sonner"
import { openFolderWindow } from "@/lib/api"
import { openFolderWindow, openProjectBootWindow } from "@/lib/api"
import { openFileDialog } from "@/lib/platform"
import { Button } from "@/components/ui/button"
import { CloneDialog } from "./clone-dialog"
@@ -51,6 +51,23 @@ export function FolderActions() {
{t("cloneRepository")}
</Button>
<Button
variant="ghost"
className="justify-start gap-2 h-9"
onClick={async () => {
try {
await openProjectBootWindow()
} catch (err) {
console.error("[FolderActions] failed to open project boot:", err)
toast.error(t("toasts.openProjectBootFailed"))
}
}}
type="button"
>
<Rocket className="h-4 w-4" />
{t("projectBoot")}
</Button>
<CloneDialog open={cloneOpen} onOpenChange={setCloneOpen} />
</div>
)