基本功能已初步完善
This commit is contained in:
@@ -7,7 +7,9 @@ import (
|
||||
"net"
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
"xboard-go/internal/service"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -27,6 +29,7 @@ type userThemeViewData struct {
|
||||
type adminAppViewData struct {
|
||||
Title string
|
||||
SettingsJS template.JS
|
||||
AssetNonce string
|
||||
}
|
||||
|
||||
func UserThemePage(c *gin.Context) {
|
||||
@@ -42,6 +45,7 @@ func UserThemePage(c *gin.Context) {
|
||||
"registerTitle": service.MustGetString("nebula_register_title", "Create your access."),
|
||||
"icpNo": service.MustGetString("icp_no", ""),
|
||||
"psbNo": service.MustGetString("psb_no", ""),
|
||||
"staticCdnUrl": service.MustGetString("nebula_static_cdn_url", ""),
|
||||
"isRegisterEnabled": !service.MustGetBool("stop_register", false),
|
||||
}
|
||||
|
||||
@@ -80,6 +84,7 @@ func AdminAppPage(c *gin.Context) {
|
||||
payload := adminAppViewData{
|
||||
Title: title,
|
||||
SettingsJS: template.JS(settingsJSON),
|
||||
AssetNonce: strconv.FormatInt(time.Now().UnixNano(), 10),
|
||||
}
|
||||
|
||||
renderPageTemplate(c, filepath.Join("frontend", "templates", "admin_app.html"), payload)
|
||||
|
||||
Reference in New Issue
Block a user