💄 Gitee 登录时展示使用 Gitee 登录

This commit is contained in:
naiba
2021-04-23 11:07:18 +08:00
parent b69b069f27
commit c955e21d5b
4 changed files with 13 additions and 5 deletions

View File

@@ -51,7 +51,15 @@ func (gp *guestPage) serve() {
}
func (gp *guestPage) login(c *gin.Context) {
LoginType := "GitHub"
RegistrationLink := "https://github.com/join"
if dao.Conf.Oauth2.Type == model.ConfigTypeGitee {
LoginType = "Gitee"
RegistrationLink = "https://gitee.com/signup"
}
c.HTML(http.StatusOK, "dashboard/login", mygin.CommonEnvironment(c, gin.H{
"Title": "登录",
"Title": "登录",
"LoginType": LoginType,
"RegistrationLink": RegistrationLink,
}))
}