优化网站设置和路由设置中的左侧菜单

This commit is contained in:
刘祥超
2024-01-14 20:33:07 +08:00
parent ca227a846a
commit 195a9dc771
2 changed files with 5 additions and 4 deletions

View File

@@ -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,

View File

@@ -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,