mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-17 22:39:46 +00:00
Simplify method resetClientTraffic
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user