mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-22 07:18:31 -04:00
User code clean and ui improve
This commit is contained in:
parent
c1eb4d894a
commit
bbdfe25769
19 changed files with 308 additions and 322 deletions
|
@ -93,6 +93,7 @@ var TemplateFuncs template.FuncMap = map[string]interface{}{
|
|||
"DiffLineTypeToStr": DiffLineTypeToStr,
|
||||
"ShortSha": ShortSha,
|
||||
"Oauth2Icon": Oauth2Icon,
|
||||
"Oauth2Name": Oauth2Name,
|
||||
}
|
||||
|
||||
type Actioner interface {
|
||||
|
@ -217,3 +218,19 @@ func Oauth2Icon(t int) string {
|
|||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func Oauth2Name(t int) string {
|
||||
switch t {
|
||||
case 1:
|
||||
return "GitHub"
|
||||
case 2:
|
||||
return "Google"
|
||||
case 3:
|
||||
return "Twitter"
|
||||
case 4:
|
||||
return "Tencent QQ"
|
||||
case 5:
|
||||
return "Weibo"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue