mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-25 11:36:34 +08:00
自建DNS增加全局配置
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package settingutils
|
||||
|
||||
import (
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
)
|
||||
|
||||
type Helper struct {
|
||||
}
|
||||
|
||||
func (this *Helper) BeforeAction(actionPtr actions.ActionWrapper) (goNext bool) {
|
||||
var action = actionPtr.Object()
|
||||
secondMenuItem := action.Data.GetString("secondMenuItem")
|
||||
action.Data["leftMenuItems"] = this.createSettingMenu(secondMenuItem)
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *Helper) createSettingMenu(selectedItem string) (items []maps.Map) {
|
||||
return []maps.Map{
|
||||
{
|
||||
"name": "访问日志",
|
||||
"url": "/ns/settings/accesslogs",
|
||||
"isActive": selectedItem == "accessLog",
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user