diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-03-13 01:01:37 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-03-13 01:01:37 +0300 |
| commit | c74efa1d432146a0a9630f71320fe446c7b191eb (patch) | |
| tree | d4f17a5f85b030683865e5122db88b18317f1243 /web/html | |
| parent | 18af7047f8d37e31c6f04362019e1a45c1f4b41d (diff) | |
fix bug - deleteBalancer
Diffstat (limited to 'web/html')
| -rw-r--r-- | web/html/xui/form/client.html | 2 | ||||
| -rw-r--r-- | web/html/xui/inbound_client_table.html | 2 | ||||
| -rw-r--r-- | web/html/xui/xray.html | 11 |
3 files changed, 9 insertions, 6 deletions
diff --git a/web/html/xui/form/client.html b/web/html/xui/form/client.html index d147fbf7..b170338c 100644 --- a/web/html/xui/form/client.html +++ b/web/html/xui/form/client.html @@ -81,7 +81,7 @@ <template slot="title"> <span>{{ i18n "pages.inbounds.IPLimitlogDesc" }}</span> </template> - <span>{{ i18n "pages.inbounds.IPLimitlog" }}</span> + <span>{{ i18n "pages.inbounds.IPLimitlog" }} </span> <a-icon type="question-circle"></a-icon> </a-tooltip> </template> diff --git a/web/html/xui/inbound_client_table.html b/web/html/xui/inbound_client_table.html index 9dc48679..3cc115ee 100644 --- a/web/html/xui/inbound_client_table.html +++ b/web/html/xui/inbound_client_table.html @@ -19,7 +19,7 @@ :overlay-class-name="themeSwitcher.currentTheme" ok-text='{{ i18n "reset"}}' cancel-text='{{ i18n "cancel"}}'> - <a-icon slot="icon" type="question-circle-o" :style="themeSwitcher.isDarkTheme ? 'color: #3c89e8' : 'color: blue'"></a-icon> + <a-icon slot="icon" type="question-circle-o" :style="themeSwitcher.isDarkTheme ? 'color: var(--color-primary-100)' : 'color: var(--color-primary-100)'"></a-icon> <a-icon style="font-size: 24px; cursor: pointer;" class="normal-icon" type="retweet" v-if="client.email.length > 0"></a-icon> </a-popconfirm> </a-tooltip> diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html index 7a54584c..83553656 100644 --- a/web/html/xui/xray.html +++ b/web/html/xui/xray.html @@ -1182,7 +1182,7 @@ }); }, deleteBalancer(index) { - newTemplateSettings = this.templateSettings; + let newTemplateSettings = { ...this.templateSettings }; // Remove from balancers const removedBalancer = this.balancersData.splice(index, 1)[0]; @@ -1192,9 +1192,12 @@ newTemplateSettings.routing.balancers.splice(realIndex, 1); // Remove related routing rules - let rules = newTemplateSettings.routing.rules.filter((r) => !r.balancerTag || r.balancerTag !== removedBalancer.tag); - newTemplateSettings.routing.rules = rules; - + newTemplateSettings.routing.rules.forEach((rule) => { + if (rule.balancerTag === removedBalancer.tag) { + delete rule.balancerTag; + } + }); + // Update balancers property to an empty array if there are no more balancers if (newTemplateSettings.routing.balancers.length === 0) { delete newTemplateSettings.routing.balancers; |
