Simplify method resetClientTraffic

This commit is contained in:
Alireza Ahmadi
2023-03-01 13:55:09 +01:00
parent a776bdbb87
commit 40bb9f9864
2 changed files with 4 additions and 4 deletions

View File

@@ -14,7 +14,7 @@
</a-tooltip>
<a-tooltip>
<template slot="title">{{ i18n "pages.inbounds.resetTraffic" }}</template>
<a-icon style="font-size: 24px;" type="retweet" @click="resetClientTraffic(client,record,$event)" v-if="client.email.length > 0"></a-icon>
<a-icon style="font-size: 24px;" type="retweet" @click="resetClientTraffic(client,record)" v-if="client.email.length > 0"></a-icon>
</a-tooltip>
<a-tooltip>
<template slot="title"><span style="color: #FF4D4F"> {{ i18n "delete"}}</span></template>

View File

@@ -458,18 +458,18 @@
return dbInbound.toInbound().settings.trojans
}
},
resetClientTraffic(client,inbound,event) {
resetClientTraffic(client,inbound) {
this.$confirm({
title: '{{ i18n "pages.inbounds.resetTraffic"}}',
content: '{{ i18n "pages.inbounds.resetTrafficContent"}}',
okText: '{{ i18n "reset"}}',
cancelText: '{{ i18n "cancel"}}',
onOk: () => {
this.resetClTraffic(client,inbound,event);
this.resetClTraffic(client,inbound);
},
});
},
async resetClTraffic(client,inbound,event) {
async resetClTraffic(client,inbound) {
const msg = await HttpUtil.post('/xui/inbound/resetClientTraffic/'+ client.email);
if (!msg.success) {
return;