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 <33454419+MHSanaei@users.noreply.github.com>2023-03-27 19:42:45 +0300
committerMHSanaei <33454419+MHSanaei@users.noreply.github.com>2023-03-27 19:42:45 +0300
commit88744d92b3677b33f0b6265bacb7805aeab856e6 (patch)
tree1d587245fba54c7ed87f4b4ea5d678cc378ffb8e
parent7b38d02ff035fc34699740d14807b4d2b8a36d06 (diff)
new feature - reset traffic all inbound
-rw-r--r--web/html/xui/inbounds.html17
-rw-r--r--web/translation/translate.en_US.toml5
-rw-r--r--web/translation/translate.fa_IR.toml5
-rw-r--r--web/translation/translate.zh_Hans.toml5
4 files changed, 32 insertions, 0 deletions
diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html
index 9fd663f7..90250869 100644
--- a/web/html/xui/inbounds.html
+++ b/web/html/xui/inbounds.html
@@ -52,6 +52,7 @@
<div slot="title">
<a-button type="primary" icon="plus" @click="openAddInbound">{{ i18n "pages.inbounds.addInbound" }}</a-button>
<a-button type="primary" icon="export" @click="exportAllLinks">{{ i18n "pages.inbounds.export" }}</a-button>
+ <a-button type="primary" icon="reload" @click="resetAllTraffic">{{ i18n "pages.inbounds.resetAllTraffic" }}</a-button>
</div>
<a-input v-model.lazy="searchKey" placeholder="{{ i18n "search" }}" autofocus style="max-width: 300px"></a-input>
<a-table :columns="columns" :row-key="dbInbound => dbInbound.id"
@@ -501,6 +502,22 @@
},
});
},
+ resetAllTraffic() {
+ this.$confirm({
+ title: '{{ i18n "pages.inbounds.resetAllTrafficTitle"}}',
+ content: '{{ i18n "pages.inbounds.resetAllTrafficContent"}}',
+ okText: '{{ i18n "pages.inbounds.resetAllTrafficOkText"}}',
+ cancelText: '{{ i18n "pages.inbounds.resetAllTrafficCancelText"}}',
+ onOk: async () => {
+ for (const dbInbound of this.dbInbounds) {
+ const inbound = dbInbound.toInbound();
+ dbInbound.up = 0;
+ dbInbound.down = 0;
+ this.updateInbound(inbound, dbInbound);
+ }
+ },
+ });
+ },
delInbound(dbInboundId) {
this.$confirm({
title: '{{ i18n "pages.inbounds.deleteInbound"}}',
diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml
index d8a46d5d..247096f1 100644
--- a/web/translation/translate.en_US.toml
+++ b/web/translation/translate.en_US.toml
@@ -133,6 +133,11 @@
"cloneInbound" = "Create"
"cloneInboundContent" = "All items of this inbound except Port, Listening IP, Clients will be applied to the clone"
"cloneInboundOk" = "Creating a clone from"
+"resetAllTraffic" = "Reset All Inbounds Traffic"
+"resetAllTrafficTitle" = "Reset all inbounds traffic"
+"resetAllTrafficContent" = "Are you sure to reset all inbounds traffic ?"
+"resetAllTrafficOkText" = "Confirm"
+"resetAllTrafficCancelText" = "Cancel"
[pages.client]
"add" = "Add client"
diff --git a/web/translation/translate.fa_IR.toml b/web/translation/translate.fa_IR.toml
index 157d9cf7..c5e3e23f 100644
--- a/web/translation/translate.fa_IR.toml
+++ b/web/translation/translate.fa_IR.toml
@@ -133,6 +133,11 @@
"cloneInbound" = "ایجاد"
"cloneInboundContent" = "همه موارد این ورودی بجز پورت ، ای پی و کلاینت ها روی کلون اعمال خواهند شد"
"cloneInboundOk" = "ساختن یک کلون از"
+"resetAllTraffic" = "ریست ترافیک کل ورودی ها"
+"resetAllTrafficTitle" = "ریست ترافیک کل ورودی ها"
+"resetAllTrafficContent" = "آیا مطمئن هستید که تمام ترافیک ورودی ها را ریست می کنید؟"
+"resetAllTrafficOkText" = "بله"
+"resetAllTrafficCancelText" = "انصراف"
[pages.client]
diff --git a/web/translation/translate.zh_Hans.toml b/web/translation/translate.zh_Hans.toml
index cbffba0f..17b4688b 100644
--- a/web/translation/translate.zh_Hans.toml
+++ b/web/translation/translate.zh_Hans.toml
@@ -133,6 +133,11 @@
"cloneInbound" = "创造"
"cloneInboundContent" = "此入站的所有项目除 Port、Listening IP、Clients 将应用于克隆"
"cloneInboundOk" = "从创建克隆"
+"resetAllTraffic" = "重置所有入站流量"
+"resetAllTrafficTitle" = "重置所有入站流量"
+"resetAllTrafficContent" = "您确定要重置所有入站流量吗?"
+"resetAllTrafficOkText" = "确认"
+"resetAllTrafficCancelText" = "取消"
[pages.client]
"add" = "添加客户端"