From 498074479349aa19151cf70ccb902edf25235fb7 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Thu, 20 Apr 2023 15:55:51 +0330 Subject: add reset traffic in edit Co-Authored-By: Alireza Ahmadi --- web/html/xui/client_modal.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'web/html/xui/client_modal.html') diff --git a/web/html/xui/client_modal.html b/web/html/xui/client_modal.html index d90e6156..c01bd10c 100644 --- a/web/html/xui/client_modal.html +++ b/web/html/xui/client_modal.html @@ -144,6 +144,24 @@ } document.getElementById("clientIPs").value = "" }, + resetClientTraffic(email,dbInboundId,iconElement) { + this.$confirm({ + title: '{{ i18n "pages.inbounds.resetTraffic"}}', + content: '{{ i18n "pages.inbounds.resetTrafficContent"}}', + class: siderDrawer.isDarkTheme ? darkClass : '', + okText: '{{ i18n "reset"}}', + cancelText: '{{ i18n "cancel"}}', + onOk: async () => { + iconElement.disabled = true; + const msg = await HttpUtil.postWithModal('/xui/inbound/' + dbInboundId + '/resetClientTraffic/'+ email); + if (msg.success) { + this.clientModal.clientStats.up = 0; + this.clientModal.clientStats.down = 0; + } + iconElement.disabled = false; + }, + }) + }, }, }); -- cgit v1.2.3