diff --git a/internal/common/helper.go b/internal/common/helper.go index 04ce89c..8f51f24 100644 --- a/internal/common/helper.go +++ b/internal/common/helper.go @@ -22,6 +22,10 @@ func BuildPageData(c *gin.Context, extra gin.H) gin.H { } // 注入站点信息(由 InjectSiteInfo 中间件设置) injectSiteInfo(c, data) + // 注入管理入口权限(moderator 及以上可看到页脚管理面板链接) + if role, exists := c.Get("role"); exists { + data["CanAccessAdmin"] = model.HasMinRole(role.(string), model.RoleModerator) + } return data } diff --git a/templates/MetaLab-2026/html/layout/footer.html b/templates/MetaLab-2026/html/layout/footer.html index 38ae339..3f7c705 100644 --- a/templates/MetaLab-2026/html/layout/footer.html +++ b/templates/MetaLab-2026/html/layout/footer.html @@ -1,5 +1,5 @@ diff --git a/templates/MetaLab-2026/html/layout/header.html b/templates/MetaLab-2026/html/layout/header.html index 5be7973..81fc2d7 100644 --- a/templates/MetaLab-2026/html/layout/header.html +++ b/templates/MetaLab-2026/html/layout/header.html @@ -4,7 +4,7 @@ {{if .CSRFToken}}{{end}} -{{.Title}} - {{.Brand}} +{{.Title}} - MetaLab {{if .ExtraCSS}} diff --git a/templates/admin/html/layout/base.html b/templates/admin/html/layout/base.html index a6d64de..538b24c 100644 --- a/templates/admin/html/layout/base.html +++ b/templates/admin/html/layout/base.html @@ -4,7 +4,7 @@ {{if .CSRFToken}}{{end}} -{{.Title}} - {{.Brand}} 管理面板 +{{.Title}} - MetaLab 管理面板 {{if .ExtraCSS}} @@ -13,7 +13,7 @@
- +
{{.Username}} 返回前台 diff --git a/templates/admin/html/site-settings/index.html b/templates/admin/html/site-settings/index.html index c73065e..9f84a62 100644 --- a/templates/admin/html/site-settings/index.html +++ b/templates/admin/html/site-settings/index.html @@ -8,16 +8,6 @@
基本设置
-
-
- 品牌名称 - 显示在页面标题、页脚、管理面板中 -
-
- - -
-
版权信息