Skip to content

Commit 7caa9c7

Browse files
committed
feat(frontend): expand manual git identity platforms
1 parent 761b374 commit 7caa9c7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

frontend/src/components/console/settings/add-identity.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,22 @@ export default function AddIdentity({
5353
return !forbiddenChars.test(username)
5454
}
5555

56-
// 根据平台类型自动设置 Base URL(Gitee 使用 OAuth 绑定,不在此表单中)
56+
// 根据平台类型自动设置 Base URL,用户仍可按需修改为自建实例地址
5757
useEffect(() => {
5858
if (platform) {
5959
switch (platform) {
60+
case ConstsGitPlatform.GitPlatformGithub:
61+
setBaseUrl("https://github.com")
62+
break
6063
case ConstsGitPlatform.GitPlatformGitLab:
6164
setBaseUrl("https://gitlab.com")
6265
break
6366
case ConstsGitPlatform.GitPlatformGitea:
6467
setBaseUrl("https://gitea.com")
6568
break
69+
case ConstsGitPlatform.GitPlatformGitee:
70+
setBaseUrl("https://gitee.com")
71+
break
6672
default:
6773
setBaseUrl("")
6874
}
@@ -151,12 +157,18 @@ export default function AddIdentity({
151157
<SelectValue placeholder="请选择" />
152158
</SelectTrigger>
153159
<SelectContent>
160+
<SelectItem value={ConstsGitPlatform.GitPlatformGithub}>
161+
<Icon name="GitHub-Uncolor" className="fill-foreground" />GitHub
162+
</SelectItem>
154163
<SelectItem value={ConstsGitPlatform.GitPlatformGitLab}>
155164
<Icon name="GitLab" />GitLab
156165
</SelectItem>
157166
<SelectItem value={ConstsGitPlatform.GitPlatformGitea}>
158167
<Icon name="Gitea" />Gitea
159168
</SelectItem>
169+
<SelectItem value={ConstsGitPlatform.GitPlatformGitee}>
170+
<Icon name="Gitee" />Gitee
171+
</SelectItem>
160172
</SelectContent>
161173
</Select>
162174
</FieldContent>

0 commit comments

Comments
 (0)