small changes

This commit is contained in:
Alireza Ahmadi
2024-02-22 20:35:19 +01:00
parent 7a38a2474e
commit 09407710a7
3 changed files with 9 additions and 12 deletions

View File

@@ -117,11 +117,7 @@ func (s *SubJsonService) GetJson(subId string, host string) (string, string, err
// Combile outbounds
outbounds = append(outbounds, defaultOutbounds...)
var outboundStrings []json_util.RawMessage
for _, outbound := range outbounds {
outboundStrings = append(outboundStrings, outbound)
}
configJson["outbounds"] = outboundStrings
configJson["outbounds"] = outbounds
finalJson, _ := json.MarshalIndent(configJson, "", " ")
header = fmt.Sprintf("upload=%d; download=%d; total=%d; expire=%d", traffic.Up, traffic.Down, traffic.Total, traffic.ExpiryTime/1000)

View File

@@ -445,7 +445,7 @@
</a-tab-pane>
<a-tab-pane key="tpl-4" tab='{{ i18n "pages.xray.outbound.reverse"}}' style="padding-top: 20px;" force-render="true">
<a-button type="primary" icon="plus" @click="addReverse()" style="margin-bottom: 10px;">{{ i18n "pages.xray.outbound.addReverse" }}</a-button>
<a-table :columns="reverseColumns" bordered
<a-table :columns="reverseColumns" bordered v-if="reverseData.length>0"
:row-key="r => r.key"
:data-source="reverseData"
:scroll="isMobile ? {} : { x: 200 }"

View File

@@ -74,17 +74,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 +94,7 @@
}
},
checkSelector() {
balancerModal.emptySelector = balancerModal.balancer.selector.length == 0;
this.emptySelector = this.balancer.selector.length == 0;
}
};