Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-04-20 15:25:51 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-04-20 15:25:51 +0300
commit498074479349aa19151cf70ccb902edf25235fb7 (patch)
tree235733e5d26318a3d3b207f14173a01caa56ff5d /web/html/xui/client_modal.html
parent5ff6f4094eee8f6b67023821a21cef8ce45ca857 (diff)
add reset traffic in edit
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/html/xui/client_modal.html')
-rw-r--r--web/html/xui/client_modal.html18
1 files changed, 18 insertions, 0 deletions
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;
+ },
+ })
+ },
},
});
</script>