From 3a821b14863e350b3ab808aae4d1dfca5e03e80f Mon Sep 17 00:00:00 2001 From: xiongxiao Date: Mon, 16 Mar 2026 01:22:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B0=86=E4=BB=93=E5=BA=93=E5=8F=AF?= =?UTF-8?q?=E8=A7=81=E6=80=A7=E6=94=B9=E4=B8=BA=E9=80=89=E6=8B=A9=E5=99=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=EF=BC=8C=E6=94=AF=E6=8C=81=20public/private/?= =?UTF-8?q?protected?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/repos/modules/CreateRepoDialog.tsx | 31 ++++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/src/pages/repos/modules/CreateRepoDialog.tsx b/src/pages/repos/modules/CreateRepoDialog.tsx index ea62f87..ecc830a 100644 --- a/src/pages/repos/modules/CreateRepoDialog.tsx +++ b/src/pages/repos/modules/CreateRepoDialog.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react' -import { useForm } from 'react-hook-form' +import { useForm, Controller } from 'react-hook-form' import { Dialog, DialogContent, @@ -12,6 +12,13 @@ import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' import { Textarea } from '@/components/ui/textarea' +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from '@/components/ui/select' import { useRepoStore } from '../store' import { useShallow } from 'zustand/shallow' @@ -32,7 +39,7 @@ export function CreateRepoDialog({ open, onOpenChange }: CreateRepoDialogProps) createRepo: state.createRepo, refresh: state.refresh, }))) - const { register, handleSubmit, reset } = useForm() + const { register, handleSubmit, reset, control } = useForm() const [isSubmitting, setIsSubmitting] = useState(false) useEffect(() => { @@ -94,10 +101,22 @@ export function CreateRepoDialog({ open, onOpenChange }: CreateRepoDialogProps)
- ( + + )} />