mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-09-04 17:06:48 +02:00
Add files via upload
This commit is contained in:
+5
-1
@@ -746,7 +746,11 @@ func setupRoutes(
|
|||||||
|
|
||||||
// 前端页面
|
// 前端页面
|
||||||
router.GET("/", func(c *gin.Context) {
|
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})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
Version string `yaml:"version,omitempty" json:"version,omitempty"` // 前端显示的版本号,如 v1.3.3
|
||||||
Server ServerConfig `yaml:"server"`
|
Server ServerConfig `yaml:"server"`
|
||||||
Log LogConfig `yaml:"log"`
|
Log LogConfig `yaml:"log"`
|
||||||
MCP MCPConfig `yaml:"mcp"`
|
MCP MCPConfig `yaml:"mcp"`
|
||||||
|
|||||||
@@ -499,6 +499,17 @@ header {
|
|||||||
opacity: 0.85;
|
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 {
|
.header-right {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -32,9 +32,9 @@
|
|||||||
<div class="logo header-logo-link" onclick="switchPage('dashboard')" role="button" title="返回仪表盘">
|
<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;">
|
<img src="/static/logo.png" alt="CyberStrikeAI Logo" style="width: 32px; height: 32px; margin-right: 8px;">
|
||||||
<h1>CyberStrikeAI</h1>
|
<h1>CyberStrikeAI</h1>
|
||||||
|
<span class="version-badge" title="当前版本">{{.Version}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
<p class="header-subtitle">AI 驱动的自动化安全测试平台</p>
|
|
||||||
<div class="header-actions">
|
<div class="header-actions">
|
||||||
<button class="openapi-doc-btn" onclick="window.open('/api-docs', '_blank')" title="OpenAPI 文档">
|
<button class="openapi-doc-btn" onclick="window.open('/api-docs', '_blank')" title="OpenAPI 文档">
|
||||||
<span>API 文档</span>
|
<span>API 文档</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user