From 4a5b5d03464fd8a99407519bbfc5e5fbce9be79b Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 4 May 2022 20:31:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E8=A7=84=E5=88=99=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E5=8D=95=E7=8B=AC=E8=AE=BE=E7=BD=AEUAM=EF=BC=88?= =?UTF-8?q?=E4=BB=85=E4=BC=81=E4=B8=9A=E7=89=88=E5=8F=AF=E7=94=A8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../locationutils/location_helper.go | 5 ++++- .../settings/locations/locationutils/menu.go | 6 +++++- web/public/js/components/server/server-uam.js | 20 +++++++++++-------- .../server/settings/locations/@left_menu.html | 4 ++-- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/internal/web/actions/default/servers/server/settings/locations/locationutils/location_helper.go b/internal/web/actions/default/servers/server/settings/locations/locationutils/location_helper.go index 2f612c70..5978fa52 100644 --- a/internal/web/actions/default/servers/server/settings/locations/locationutils/location_helper.go +++ b/internal/web/actions/default/servers/server/settings/locations/locationutils/location_helper.go @@ -71,6 +71,9 @@ func (this *LocationHelper) createMenus(serverIdString string, locationIdString "isActive": secondMenuItem == "reverseProxy", "isOn": locationConfig != nil && locationConfig.ReverseProxyRef != nil && locationConfig.ReverseProxyRef.IsPrior, }) + + menuItems = filterMenuItems1(locationConfig, menuItems, serverIdString, locationIdString, secondMenuItem) + menuItems = append(menuItems, maps.Map{ "name": "-", "url": "", @@ -161,7 +164,7 @@ func (this *LocationHelper) createMenus(serverIdString string, locationIdString "isOn": locationConfig != nil && locationConfig.Web != nil && locationConfig.Web.FastcgiRef != nil && locationConfig.Web.FastcgiRef.IsPrior, }) - menuItems = filterMenuItems(locationConfig, menuItems, serverIdString, locationIdString, secondMenuItem) + menuItems = filterMenuItems2(locationConfig, menuItems, serverIdString, locationIdString, secondMenuItem) menuItems = append(menuItems, maps.Map{ "name": "-", diff --git a/internal/web/actions/default/servers/server/settings/locations/locationutils/menu.go b/internal/web/actions/default/servers/server/settings/locations/locationutils/menu.go index 7a7cfda4..e9b55c52 100644 --- a/internal/web/actions/default/servers/server/settings/locations/locationutils/menu.go +++ b/internal/web/actions/default/servers/server/settings/locations/locationutils/menu.go @@ -9,6 +9,10 @@ import ( "github.com/iwind/TeaGo/maps" ) -func filterMenuItems(locationConfig *serverconfigs.HTTPLocationConfig, menuItems []maps.Map, serverIdString string, locationIdString string, secondMenuItem string) []maps.Map { +func filterMenuItems1(locationConfig *serverconfigs.HTTPLocationConfig, menuItems []maps.Map, serverIdString string, locationIdString string, secondMenuItem string) []maps.Map { + return menuItems +} + +func filterMenuItems2(locationConfig *serverconfigs.HTTPLocationConfig, menuItems []maps.Map, serverIdString string, locationIdString string, secondMenuItem string) []maps.Map { return menuItems } diff --git a/web/public/js/components/server/server-uam.js b/web/public/js/components/server/server-uam.js index 19035f91..3ecb1ea0 100644 --- a/web/public/js/components/server/server-uam.js +++ b/web/public/js/components/server/server-uam.js @@ -1,10 +1,11 @@ // UAM模式配置 Vue.component("uam-config-box", { - props: ["v-uam-config"], + props: ["v-uam-config", "v-is-location", "v-is-group"], data: function () { let config = this.vUamConfig if (config == null) { config = { + isPrior: false, isOn: false } } @@ -15,13 +16,16 @@ Vue.component("uam-config-box", { template: `
- - - - + + + + + + +
启用5秒盾 - -

启用后,访问网站时,自动检查浏览器环境,阻止非正常访问。

-
启用5秒盾 + +

启用后,访问网站时,自动检查浏览器环境,阻止非正常访问。

+
` diff --git a/web/views/@default/servers/server/settings/locations/@left_menu.html b/web/views/@default/servers/server/settings/locations/@left_menu.html index 2d23628e..a92048fd 100644 --- a/web/views/@default/servers/server/settings/locations/@left_menu.html +++ b/web/views/@default/servers/server/settings/locations/@left_menu.html @@ -2,8 +2,8 @@
\ No newline at end of file