mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 12:20:28 +08:00
优化网站设置和路由设置中的左侧菜单
This commit is contained in:
@@ -130,8 +130,6 @@ func (this *LocationHelper) createMenus(serverIdString string, locationIdString
|
|||||||
"isOn": locationConfig != nil && locationConfig.Web != nil && locationConfig.Web.Compression != nil && locationConfig.Web.Compression.IsPrior,
|
"isOn": locationConfig != nil && locationConfig.Web != nil && locationConfig.Web.Compression != nil && locationConfig.Web.Compression.IsPrior,
|
||||||
})
|
})
|
||||||
|
|
||||||
menuItems = this.filterMenuItems3(locationConfig, menuItems, serverIdString, locationIdString, secondMenuItem, actionPtr)
|
|
||||||
|
|
||||||
menuItems = append(menuItems, maps.Map{
|
menuItems = append(menuItems, maps.Map{
|
||||||
"name": this.Lang(actionPtr, codes.Server_MenuSettingPages),
|
"name": this.Lang(actionPtr, codes.Server_MenuSettingPages),
|
||||||
"url": "/servers/server/settings/locations/pages?serverId=" + serverIdString + "&locationId=" + locationIdString,
|
"url": "/servers/server/settings/locations/pages?serverId=" + serverIdString + "&locationId=" + locationIdString,
|
||||||
@@ -156,6 +154,9 @@ func (this *LocationHelper) createMenus(serverIdString string, locationIdString
|
|||||||
"isActive": secondMenuItem == "webp",
|
"isActive": secondMenuItem == "webp",
|
||||||
"isOn": locationConfig != nil && locationConfig.Web != nil && locationConfig.Web.WebP != nil && locationConfig.Web.WebP.IsPrior,
|
"isOn": locationConfig != nil && locationConfig.Web != nil && locationConfig.Web.WebP != nil && locationConfig.Web.WebP.IsPrior,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
menuItems = this.filterMenuItems3(locationConfig, menuItems, serverIdString, locationIdString, secondMenuItem, actionPtr)
|
||||||
|
|
||||||
menuItems = append(menuItems, maps.Map{
|
menuItems = append(menuItems, maps.Map{
|
||||||
"name": this.Lang(actionPtr, codes.Server_MenuSettingStat),
|
"name": this.Lang(actionPtr, codes.Server_MenuSettingStat),
|
||||||
"url": "/servers/server/settings/locations/stat?serverId=" + serverIdString + "&locationId=" + locationIdString,
|
"url": "/servers/server/settings/locations/stat?serverId=" + serverIdString + "&locationId=" + locationIdString,
|
||||||
|
|||||||
@@ -344,8 +344,6 @@ func (this *ServerHelper) createSettingsMenu(secondMenuItem string, serverIdStri
|
|||||||
"configCode": serverconfigs.ConfigCodeCompression,
|
"configCode": serverconfigs.ConfigCodeCompression,
|
||||||
})
|
})
|
||||||
|
|
||||||
menuItems = this.filterMenuItems3(serverConfig, menuItems, serverIdString, secondMenuItem, actionPtr)
|
|
||||||
|
|
||||||
menuItems = append(menuItems, maps.Map{
|
menuItems = append(menuItems, maps.Map{
|
||||||
"name": this.Lang(actionPtr, codes.Server_MenuSettingPages),
|
"name": this.Lang(actionPtr, codes.Server_MenuSettingPages),
|
||||||
"url": "/servers/server/settings/pages?serverId=" + serverIdString,
|
"url": "/servers/server/settings/pages?serverId=" + serverIdString,
|
||||||
@@ -374,6 +372,8 @@ func (this *ServerHelper) createSettingsMenu(secondMenuItem string, serverIdStri
|
|||||||
"configCode": serverconfigs.ConfigCodeWebp,
|
"configCode": serverconfigs.ConfigCodeWebp,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
menuItems = this.filterMenuItems3(serverConfig, menuItems, serverIdString, secondMenuItem, actionPtr)
|
||||||
|
|
||||||
menuItems = append(menuItems, maps.Map{
|
menuItems = append(menuItems, maps.Map{
|
||||||
"name": this.Lang(actionPtr, codes.Server_MenuSettingStat),
|
"name": this.Lang(actionPtr, codes.Server_MenuSettingStat),
|
||||||
"url": "/servers/server/settings/stat?serverId=" + serverIdString,
|
"url": "/servers/server/settings/stat?serverId=" + serverIdString,
|
||||||
|
|||||||
Reference in New Issue
Block a user