feat: 添加 PWA 插件支持,更新环境变量处理,优化可见性选项

This commit is contained in:
xiongxiao
2026-03-18 17:00:49 +08:00
committed by cnb
parent 0b08b82356
commit bc9ce9e5df
6 changed files with 31 additions and 15 deletions

View File

@@ -49,7 +49,7 @@ export function CreateRepoDialog({ open, onOpenChange }: CreateRepoDialogProps)
path: '',
license: '',
description: '',
visibility: 'public'
visibility: 'Public'
})
}
}, [open, reset])
@@ -104,16 +104,16 @@ export function CreateRepoDialog({ open, onOpenChange }: CreateRepoDialogProps)
<Controller
name="visibility"
control={control}
defaultValue="public"
render={({ field }) => (
<Select {...field}>
defaultValue="Public"
render={({ field: { onChange, value } }) => (
<Select onValueChange={onChange} value={value}>
<SelectTrigger id="visibility">
<SelectValue placeholder="选择可见性" />
</SelectTrigger>
<SelectContent>
<SelectItem value="public"> (public)</SelectItem>
<SelectItem value="private"> (private)</SelectItem>
<SelectItem value="protected"> (protected)</SelectItem>
<SelectItem value="Public"> (public)</SelectItem>
<SelectItem value="Private"> (private)</SelectItem>
<SelectItem value="Protected"> (protected)</SelectItem>
</SelectContent>
</Select>
)}