mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-04-23 21:35:20 +08:00
自定义页面增加是否“启用系统自定义页面”选项
This commit is contained in:
@@ -47,6 +47,7 @@ func (this *IndexAction) RunGet(params struct {
|
||||
}
|
||||
|
||||
this.Data["webId"] = webConfig.Id
|
||||
this.Data["enableGlobalPages"] = webConfig.EnableGlobalPages
|
||||
this.Data["pages"] = webConfig.Pages
|
||||
this.Data["shutdownConfig"] = webConfig.Shutdown
|
||||
|
||||
@@ -54,10 +55,11 @@ func (this *IndexAction) RunGet(params struct {
|
||||
}
|
||||
|
||||
func (this *IndexAction) RunPost(params struct {
|
||||
WebId int64
|
||||
PagesJSON []byte
|
||||
ShutdownJSON []byte
|
||||
Must *actions.Must
|
||||
WebId int64
|
||||
PagesJSON []byte
|
||||
ShutdownJSON []byte
|
||||
EnableGlobalPages bool
|
||||
Must *actions.Must
|
||||
}) {
|
||||
// 日志
|
||||
defer this.CreateLogInfo(codes.ServerPage_LogUpdatePages, params.WebId)
|
||||
@@ -135,7 +137,16 @@ func (this *IndexAction) RunPost(params struct {
|
||||
}
|
||||
}
|
||||
|
||||
_, err := this.RPC().HTTPWebRPC().UpdateHTTPWebPages(this.AdminContext(), &pb.UpdateHTTPWebPagesRequest{
|
||||
_, err := this.RPC().HTTPWebRPC().UpdateHTTPWebGlobalPagesEnabled(this.AdminContext(), &pb.UpdateHTTPWebGlobalPagesEnabledRequest{
|
||||
HttpWebId: params.WebId,
|
||||
IsEnabled: params.EnableGlobalPages,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
|
||||
_, err = this.RPC().HTTPWebRPC().UpdateHTTPWebPages(this.AdminContext(), &pb.UpdateHTTPWebPagesRequest{
|
||||
HttpWebId: params.WebId,
|
||||
PagesJSON: params.PagesJSON,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user