diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-02-22 22:10:01 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-02-22 22:10:01 +0300 |
| commit | 7ec6989c992d25d4993d78508b87db0582d6aa7a (patch) | |
| tree | 87a348ad59666b0f14711fcb37dabb333a2915fa /web | |
| parent | ee4d7a02a9757b09f92ea4b1c013063dee86312e (diff) | |
[rule] clearable outbound & balancer
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web')
| -rw-r--r-- | web/html/xui/xray_rule_modal.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/web/html/xui/xray_rule_modal.html b/web/html/xui/xray_rule_modal.html index 63b78d69..05eab85c 100644 --- a/web/html/xui/xray_rule_modal.html +++ b/web/html/xui/xray_rule_modal.html @@ -195,7 +195,7 @@ this.isEdit = isEdit; this.inboundTags = app.templateSettings.inbounds.filter((i) => !ObjectUtil.isEmpty(i.tag)).map(obj => obj.tag); this.inboundTags.push(...app.inboundTags); - this.outboundTags = app.templateSettings.outbounds.filter((o) => !ObjectUtil.isEmpty(o.tag)).map(obj => obj.tag); + this.outboundTags = ["", ...app.templateSettings.outbounds.filter((o) => !ObjectUtil.isEmpty(o.tag)).map(obj => obj.tag)]; if(app.templateSettings.reverse){ if(app.templateSettings.reverse.bridges) { this.inboundTags.push(...app.templateSettings.reverse.bridges.map(b => b.tag)); @@ -204,7 +204,7 @@ } if (app.templateSettings.routing && app.templateSettings.routing.balancers) { - this.balancerTags = app.templateSettings.routing.balancers.filter((o) => !ObjectUtil.isEmpty(o.tag)).map(obj => obj.tag) + this.balancerTags = [ "", ...app.templateSettings.routing.balancers.filter((o) => !ObjectUtil.isEmpty(o.tag)).map(obj => obj.tag)]; } }, close() { @@ -230,8 +230,8 @@ rule.inboundTag = value.inboundTag; rule.protocol = value.protocol; rule.attrs = Object.fromEntries(value.attrs); - rule.outboundTag = value.outboundTag; - rule.balancerTag = value.balancerTag; + rule.outboundTag = value.outboundTag == "" ? undefined : value.outboundTag; + rule.balancerTag = value.balancerTag == "" ? undefined : value.balancerTag; for (const [key, value] of Object.entries(rule)) { if ( |
