minor changes

Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Co-Authored-By: Tara Rostami <132676256+TaraRostami@users.noreply.github.com>
This commit is contained in:
MHSanaei 2024-02-22 23:12:26 +03:30
parent fc3ea2dd4b
commit 9a10a3ec48
3 changed files with 15 additions and 7 deletions

View file

@ -1171,3 +1171,7 @@ b, strong {
background-color: var(--dark-color-btn-danger-hover);
border-color: var(--dark-color-btn-danger-hover);
}
.dark .ant-alert-close-icon .anticon-close:hover {
color: rgb(255 255 255);
}

View file

@ -23,7 +23,8 @@
<a-select-option value="roundRobin">Round Robin</a-select-option>
</a-select>
</a-form-item>
<a-form-item label='{{ i18n "pages.xray.balancer.balancerSelectors" }}' has-feedback :validate-status="balancerModal.emptySelector? 'warning' : 'success'">
<a-form-item label='{{ i18n "pages.xray.balancer.balancerSelectors" }}' has-feedback
:validate-status="balancerModal.emptySelector? 'warning' : 'success'">
<a-select v-model="balancerModal.balancer.selector" mode="tags" @change="balancerModal.checkSelector()"
:dropdown-class-name="themeSwitcher.currentTheme">
<a-select-option v-for="tag in balancerModal.outboundTags" :value="tag">[[ tag ]]</a-select-option>
@ -74,17 +75,18 @@
this.balancerTags = balancerTags.filter((tag) => tag != balancer.tag);
this.outboundTags = app.templateSettings.outbounds.filter((o) => !ObjectUtil.isEmpty(o.tag)).map(obj => obj.tag);
this.isEdit = isEdit;
this.check()
this.check();
this.checkSelector();
},
close() {
balancerModal.visible = false;
balancerModal.loading(false);
this.visible = false;
this.loading(false);
},
loading(loading=true) {
balancerModal.confirmLoading = loading;
this.confirmLoading = loading;
},
check() {
if (balancerModal.balancer.tag == '' || balancerModal.balancerTags.includes(balancerModal.balancer.tag)) {
if (this.balancer.tag == '' || this.balancerTags.includes(this.balancer.tag)) {
this.duplicateTag = true;
this.isValid = false;
} else {
@ -93,7 +95,7 @@
}
},
checkSelector() {
balancerModal.emptySelector = balancerModal.balancer.selector.length == 0;
this.emptySelector = this.balancer.selector.length == 0;
}
};

View file

@ -1803,6 +1803,8 @@ func (s *InboundService) MigrationRequirements() {
}
}()
db.Migrator().DropIndex(&model.Inbound{}, "port")
// Fix inbounds based problems
var inbounds []*model.Inbound
err = tx.Model(model.Inbound{}).Where("protocol IN (?)", []string{"vmess", "vless", "trojan"}).Find(&inbounds).Error