From 5ef8a5a37ec7e6b7df710fa61b0324ab5a6617ab Mon Sep 17 00:00:00 2001 From: MHSanaei <33454419+MHSanaei@users.noreply.github.com> Date: Thu, 23 Mar 2023 23:22:50 +0330 Subject: old design --- web/html/xui/setting.html | 122 ++-------------------------------------------- 1 file changed, 3 insertions(+), 119 deletions(-) (limited to 'web/html/xui/setting.html') diff --git a/web/html/xui/setting.html b/web/html/xui/setting.html index 0c0f9682..cbbdce1f 100644 --- a/web/html/xui/setting.html +++ b/web/html/xui/setting.html @@ -20,7 +20,7 @@ display: block; } - :not(.ant-card-dark)>.ant-tabs-top-bar { + :not(.ant-card-dark)>.ant-tabs-top-bar { background: white; } @@ -40,7 +40,7 @@ - + @@ -56,7 +56,6 @@ ref="selectLang" v-model="lang" @change="setLang(lang)" - :dropdown-class-name="siderDrawer.isDarkTheme ? 'ant-card-dark' : ''" style="width: 100%" > @@ -88,28 +87,13 @@ style="max-width: 300px"> - + {{ i18n "confirm" }} - - - {{ i18n "pages.setting.advancedTemplate"}} - - - - - - - - - - - - {{ i18n "pages.setting.completeTemplate"}} @@ -119,10 +103,6 @@ - - - - @@ -209,102 +189,6 @@ this.saveBtnDisable = this.oldAllSetting.equals(this.allSetting); } }, - computed: { - templateSettings: { - get: function () { return this.allSetting.xrayTemplateConfig ? JSON.parse(this.allSetting.xrayTemplateConfig) : null ; }, - set: function (newValue) { this.allSetting.xrayTemplateConfig = JSON.stringify(newValue, null, 2) }, - }, - inboundSettings: { - get: function () { return this.templateSettings ? JSON.stringify(this.templateSettings.inbounds, null, 2) : null; }, - set: function (newValue) { - newTemplateSettings = this.templateSettings; - newTemplateSettings.inbounds = JSON.parse(newValue) - this.templateSettings = newTemplateSettings - }, - }, - outboundSettings: { - get: function () { return this.templateSettings ? JSON.stringify(this.templateSettings.outbounds, null, 2) : null; }, - set: function (newValue) { - newTemplateSettings = this.templateSettings; - newTemplateSettings.outbounds = JSON.parse(newValue) - this.templateSettings = newTemplateSettings - }, - }, - routingRuleSettings: { - get: function () { return this.templateSettings ? JSON.stringify(this.templateSettings.routing.rules, null, 2) : null; }, - set: function (newValue) { - newTemplateSettings = this.templateSettings; - newTemplateSettings.routing.rules = JSON.parse(newValue) - this.templateSettings = newTemplateSettings - }, - }, - torrentSettings: { - get: function () { - torrentFilter = false - if(this.templateSettings != null){ - this.templateSettings.routing.rules.forEach(routingRule => { - if(routingRule.hasOwnProperty("protocol")){ - if (routingRule.protocol[0] === "bittorrent" && routingRule.outboundTag == "blocked"){ - torrentFilter = true - } - } - }); - } - return torrentFilter - }, - set: function (newValue) { - newTemplateSettings = JSON.parse(this.allSetting.xrayTemplateConfig); - if (newValue){ - newTemplateSettings.routing.rules.push(JSON.parse("{\"outboundTag\": \"blocked\",\"protocol\": [\"bittorrent\"],\"type\": \"field\"}")) - } - else { - newTemplateSettings.routing.rules = []; - this.templateSettings.routing.rules.forEach(routingRule => { - if (routingRule.hasOwnProperty('protocol')){ - if (routingRule.protocol[0] === "bittorrent" && routingRule.outboundTag == "blocked"){ - return; - } - } - newTemplateSettings.routing.rules.push(routingRule); - }); - } - this.templateSettings = newTemplateSettings - }, - }, - privateIpSettings: { - get: function () { - localIpFilter = false - if(this.templateSettings != null){ - this.templateSettings.routing.rules.forEach(routingRule => { - if(routingRule.hasOwnProperty("ip")){ - if (routingRule.ip[0] === "geoip:private" && routingRule.outboundTag == "blocked"){ - localIpFilter = true - } - } - }); - } - return localIpFilter - }, - set: function (newValue) { - newTemplateSettings = JSON.parse(this.allSetting.xrayTemplateConfig); - if (newValue){ - newTemplateSettings.routing.rules.push(JSON.parse("{\"outboundTag\": \"blocked\",\"ip\": [\"geoip:private\"],\"type\": \"field\"}")) - } - else { - newTemplateSettings.routing.rules = []; - this.templateSettings.routing.rules.forEach(routingRule => { - if (routingRule.hasOwnProperty('ip')){ - if (routingRule.ip[0] === "geoip:private" && routingRule.outboundTag == "blocked"){ - return; - } - } - newTemplateSettings.routing.rules.push(routingRule); - }); - } - this.templateSettings = newTemplateSettings - }, - }, - } }); -- cgit v1.2.3