diff --git a/internal/web/actions/default/settings/settingutils/helper.go b/internal/web/actions/default/settings/settingutils/helper.go index 016595d4..812f7852 100644 --- a/internal/web/actions/default/settings/settingutils/helper.go +++ b/internal/web/actions/default/settings/settingutils/helper.go @@ -2,6 +2,7 @@ package settingutils import ( "github.com/TeaOSLab/EdgeAdmin/internal/configloaders" + teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const" "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" "github.com/iwind/TeaGo/actions" ) @@ -31,7 +32,9 @@ func (this *Helper) BeforeAction(actionPtr actions.ActionWrapper) (goNext bool) if configloaders.AllowModule(adminId, configloaders.AdminModuleCodeSetting) { tabbar.Add("Web服务", "", "/settings/server", "", this.tab == "server") tabbar.Add("管理界面设置", "", "/settings/ui", "", this.tab == "ui") - tabbar.Add("用户界面设置", "", "/settings/user-ui", "", this.tab == "userUI") + if teaconst.IsPlus { + tabbar.Add("用户界面设置", "", "/settings/user-ui", "", this.tab == "userUI") + } tabbar.Add("安全设置", "", "/settings/security", "", this.tab == "security") tabbar.Add("IP库", "", "/settings/ip-library", "", this.tab == "ipLibrary") } diff --git a/web/public/js/components/server/http-firewall-actions-box.js b/web/public/js/components/server/http-firewall-actions-box.js index b0d8c731..8026f1a1 100644 --- a/web/public/js/components/server/http-firewall-actions-box.js +++ b/web/public/js/components/server/http-firewall-actions-box.js @@ -63,6 +63,8 @@ Vue.component("http-firewall-actions-box", { // 动作参数 blockTimeout: "", + blockScope: "global", + captchaLife: "", get302Life: "", post307Life: "", @@ -97,6 +99,9 @@ Vue.component("http-firewall-actions-box", { this.actionOptions["timeout"] = v } }, + blockScope: function (v) { + this.actionOptions["scope"] = v + }, captchaLife: function (v) { v = parseInt(v) if (isNaN(v)) { @@ -169,6 +174,7 @@ Vue.component("http-firewall-actions-box", { // 动作参数 this.blockTimeout = "" + this.blockScope = "global" this.captchaLife = "" this.get302Life = "" this.post307Life = "" @@ -220,6 +226,11 @@ Vue.component("http-firewall-actions-box", { if (config.options.timeout != null || config.options.timeout > 0) { this.blockTimeout = config.options.timeout.toString() } + if (config.options.scope != null && config.options.scope.length > 0) { + this.blockScope = config.options.scope + } else { + this.blockScope = "service" // 兼容先前版本遗留的默认值 + } break case "allow": break @@ -450,7 +461,7 @@ Vue.component("http-firewall-actions-box", {