diff --git a/web/html/xui/client_modal.html b/web/html/xui/client_modal.html index 37b1919b..510c8f10 100644 --- a/web/html/xui/client_modal.html +++ b/web/html/xui/client_modal.html @@ -122,6 +122,24 @@ } client.email = string; }, + 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; + }, + }) + }, }, }); diff --git a/web/html/xui/form/client.html b/web/html/xui/form/client.html index add46a3e..dd0c9cd0 100644 --- a/web/html/xui/form/client.html +++ b/web/html/xui/form/client.html @@ -103,6 +103,10 @@ [[ sizeFormat(clientStats.down) ]] ([[ sizeFormat(clientStats.up + clientStats.down) ]]) + + + +