From 5651a982b29ffdded79580465f1200c9bf0b6be6 Mon Sep 17 00:00:00 2001 From: "yongen.loong" Date: Mon, 9 Sep 2024 20:00:44 +0800 Subject: [PATCH] feat: project selection --- components/github/index.tsx | 9 ++-- components/github/project-selection.tsx | 54 +++++++++++++++++++++++ components/github/repo-url-form.tsx | 14 +++++- components/github/repo-workspace-name.tsx | 6 ++- 4 files changed, 75 insertions(+), 8 deletions(-) create mode 100644 components/github/project-selection.tsx diff --git a/components/github/index.tsx b/components/github/index.tsx index d60d949..94971f8 100644 --- a/components/github/index.tsx +++ b/components/github/index.tsx @@ -2,10 +2,10 @@ import { useState } from "react"; import { RepoUrlForm } from "./repo-url-form"; -import { RepoSelectFiles } from "./repo-select-files"; import { X } from "lucide-react"; import { RepoBranchSelection } from "./repo-branch-selection"; import { RepoWorkspaceName } from "./repo-workspace-name"; +import ProjectSelection from "./project-selection"; export default function GitHub() { const [repo, setRepo] = useState(); @@ -58,10 +58,10 @@ export default function GitHub() { /> )} {branch && selected.length === 0 ? ( - { + onSelect={async (paths) => { setSelected(paths); }} /> @@ -70,7 +70,8 @@ export default function GitHub() { ) : null} {selected.length > 0 && repo && branch ? (
- {selected.length} files or folders selected.{" "} + You have selected {selected.find((i) => i.endsWith(".csproj"))} + .