feat: opaque session、安装/发帖 SSR 与最小 Admin 后台
浏览器登录改为 DB sessions(可吊销);敏感词与 OIDC PEM 入 settings; 落地安装向导、注册发帖与 /admin 仪表盘/板块/审核/设置。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
35
routers/web/pending.go
Normal file
35
routers/web/pending.go
Normal file
@@ -0,0 +1,35 @@
|
||||
package web
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"git.iioio.com/freefire/jiang13-forum/modules/webctx"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type pendingData struct {
|
||||
PageChrome
|
||||
Heading string
|
||||
Message string
|
||||
}
|
||||
|
||||
// PendingPage 未迁移页
|
||||
func (d Deps) PendingPage(c *gin.Context) {
|
||||
ctx := d.ctx(c)
|
||||
chrome := d.chrome(ctx, "页面准备中 · "+d.Settings.SiteBranding().Name, "", "")
|
||||
ctx.HTML(http.StatusOK, "status/pending", pendingData{
|
||||
PageChrome: chrome,
|
||||
Heading: "页面准备中",
|
||||
Message: "该功能尚未用模板实现,请稍后再来。",
|
||||
})
|
||||
}
|
||||
|
||||
func (d Deps) render404(ctx *webctx.Context) {
|
||||
chrome := d.chrome(ctx, "页面不存在 · "+d.Settings.SiteBranding().Name, "", "")
|
||||
ctx.HTML(http.StatusNotFound, "status/404", chrome)
|
||||
}
|
||||
|
||||
// NotFound NoRoute
|
||||
func (d Deps) NotFound(c *gin.Context) {
|
||||
d.render404(d.ctx(c))
|
||||
}
|
||||
Reference in New Issue
Block a user