custon dashboard template [no ci]

This commit is contained in:
naiba
2022-06-03 09:45:11 +08:00
parent eb0501ad97
commit 2ab7a5fdd8
20 changed files with 95 additions and 37 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/service/singleton"
)
type ErrInfo struct {
@@ -18,7 +19,7 @@ type ErrInfo struct {
func ShowErrorPage(c *gin.Context, i ErrInfo, isPage bool) {
if isPage {
c.HTML(i.Code, "dashboard/error", CommonEnvironment(c, gin.H{
c.HTML(i.Code, "dashboard-"+singleton.Conf.Site.DashboardTheme+"/error", CommonEnvironment(c, gin.H{
"Code": i.Code,
"Title": i.Title,
"Msg": i.Msg,