💄 Gitee 登录时展示使用 Gitee 登录
This commit is contained in:
parent
b69b069f27
commit
c955e21d5b
@ -1,7 +1,7 @@
|
|||||||
<div align="center" style="background-color: white">
|
<div align="center" style="background-color: white">
|
||||||
<img width="500" style="max-width:100%" src="https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.png" title="哪吒监控">
|
<img width="500" style="max-width:100%" src="https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.png" title="哪吒监控">
|
||||||
<br><br>
|
<br><br>
|
||||||
<img src="https://img.shields.io/github/workflow/status/naiba/nezha/Dashboard%20image?label=Dash%20v0.6.4&logo=github&style=for-the-badge"> <img src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github"> <img src="https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge"> <img src="https://img.shields.io/badge/Installer-v0.4.10-brightgreen?style=for-the-badge&logo=linux">
|
<img src="https://img.shields.io/github/workflow/status/naiba/nezha/Dashboard%20image?label=Dash%20v0.6.5&logo=github&style=for-the-badge"> <img src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github"> <img src="https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge"> <img src="https://img.shields.io/badge/Installer-v0.4.10-brightgreen?style=for-the-badge&logo=linux">
|
||||||
<br>
|
<br>
|
||||||
<p>:trollface: 哪吒监控 一站式轻监控轻运维系统。支持系统状态、HTTP(SSL 证书变更、即将到期、到期)、TCP、Ping 监控报警,命令批量执行和计划任务。</p>
|
<p>:trollface: 哪吒监控 一站式轻监控轻运维系统。支持系统状态、HTTP(SSL 证书变更、即将到期、到期)、TCP、Ping 监控报警,命令批量执行和计划任务。</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -51,7 +51,15 @@ func (gp *guestPage) serve() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (gp *guestPage) login(c *gin.Context) {
|
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{
|
c.HTML(http.StatusOK, "dashboard/login", mygin.CommonEnvironment(c, gin.H{
|
||||||
"Title": "登录",
|
"Title": "登录",
|
||||||
|
"LoginType": LoginType,
|
||||||
|
"RegistrationLink": RegistrationLink,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
<h2 class="ui teal image header">
|
<h2 class="ui teal image header">
|
||||||
<img src="static/logo.png?v20210320" class="image">
|
<img src="static/logo.png?v20210320" class="image">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
使用 GitHub 账号登录
|
使用 {{.LoginType}} 账号登录
|
||||||
</div>
|
</div>
|
||||||
</h2>
|
</h2>
|
||||||
<a href="/oauth2/login" class="ui fluid large teal submit button">登录</a>
|
<a href="/oauth2/login" class="ui fluid large teal submit button">登录</a>
|
||||||
<div class="ui message">
|
<div class="ui message">
|
||||||
没有账号? <a href="https://github.com/join" target="_blank">注册</a>
|
没有账号? <a href="{{.RegistrationLink}}" target="_blank">注册</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,7 +13,7 @@ import (
|
|||||||
pb "github.com/naiba/nezha/proto"
|
pb "github.com/naiba/nezha/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
var Version = "v0.6.4" // !!记得修改 README 中的 badge 版本!!
|
var Version = "v0.6.5" // !!记得修改 README 中的 badge 版本!!
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SnapshotDelay = 3
|
SnapshotDelay = 3
|
||||||
|
Loading…
Reference in New Issue
Block a user