Add files via upload

This commit is contained in:
公明
2026-02-08 21:28:20 +08:00
committed by GitHub
parent 06bfed508a
commit 0be6746794
4 changed files with 18 additions and 2 deletions
+5 -1
View File
@@ -746,7 +746,11 @@ func setupRoutes(
// 前端页面
router.GET("/", func(c *gin.Context) {
c.HTML(http.StatusOK, "index.html", nil)
version := app.config.Version
if version == "" {
version = "v1.0.0"
}
c.HTML(http.StatusOK, "index.html", gin.H{"Version": version})
})
}
+1
View File
@@ -13,6 +13,7 @@ import (
)
type Config struct {
Version string `yaml:"version,omitempty" json:"version,omitempty"` // 前端显示的版本号,如 v1.3.3
Server ServerConfig `yaml:"server"`
Log LogConfig `yaml:"log"`
MCP MCPConfig `yaml:"mcp"`
+11
View File
@@ -499,6 +499,17 @@ header {
opacity: 0.85;
}
.version-badge {
display: inline-block;
margin-left: 6px;
font-size: 0.6875rem;
font-weight: 400;
color: var(--text-muted);
letter-spacing: 0.02em;
vertical-align: 0.35em;
user-select: none;
}
.header-right {
display: flex;
align-items: center;
+1 -1
View File
@@ -32,9 +32,9 @@
<div class="logo header-logo-link" onclick="switchPage('dashboard')" role="button" title="返回仪表盘">
<img src="/static/logo.png" alt="CyberStrikeAI Logo" style="width: 32px; height: 32px; margin-right: 8px;">
<h1>CyberStrikeAI</h1>
<span class="version-badge" title="当前版本">{{.Version}}</span>
</div>
<div class="header-right">
<p class="header-subtitle">AI 驱动的自动化安全测试平台</p>
<div class="header-actions">
<button class="openapi-doc-btn" onclick="window.open('/api-docs', '_blank')" title="OpenAPI 文档">
<span>API 文档</span>