mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-04-22 12:35:19 +08:00
阶段性提交
This commit is contained in:
14
internal/web/actions/default/settings/helper.go
Normal file
14
internal/web/actions/default/settings/helper.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package settings
|
||||
|
||||
import "github.com/iwind/TeaGo/actions"
|
||||
|
||||
type Helper struct {
|
||||
}
|
||||
|
||||
func NewHelper() *Helper {
|
||||
return &Helper{}
|
||||
}
|
||||
|
||||
func (this *Helper) BeforeAction(action *actions.ActionObject) {
|
||||
action.Data["teaMenu"] = "settings"
|
||||
}
|
||||
15
internal/web/actions/default/settings/index.go
Normal file
15
internal/web/actions/default/settings/index.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package settings
|
||||
|
||||
import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
|
||||
type IndexAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *IndexAction) Init() {
|
||||
this.Nav("", "", "")
|
||||
}
|
||||
|
||||
func (this *IndexAction) RunGet(params struct{}) {
|
||||
this.Show()
|
||||
}
|
||||
17
internal/web/actions/default/settings/init.go
Normal file
17
internal/web/actions/default/settings/init.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package settings
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
||||
"github.com/iwind/TeaGo"
|
||||
)
|
||||
|
||||
func init() {
|
||||
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
||||
server.
|
||||
Helper(helpers.NewUserMustAuth()).
|
||||
Helper(NewHelper()).
|
||||
Prefix("/settings").
|
||||
Get("", new(IndexAction)).
|
||||
EndAll()
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user