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:
-rw-r--r--web/assets/js/util/utils.js3
-rw-r--r--web/html/xui/client_modal.html9
-rw-r--r--web/html/xui/form/client.html2
-rw-r--r--web/html/xui/form/protocol/shadowsocks.html2
-rw-r--r--web/html/xui/form/protocol/trojan.html2
-rw-r--r--web/html/xui/form/protocol/vless.html2
-rw-r--r--web/html/xui/form/protocol/vmess.html2
-rw-r--r--web/html/xui/inbound_modal.html9
8 files changed, 6 insertions, 25 deletions
diff --git a/web/assets/js/util/utils.js b/web/assets/js/util/utils.js
index 28891cd4..b4009eaf 100644
--- a/web/assets/js/util/utils.js
+++ b/web/assets/js/util/utils.js
@@ -150,8 +150,7 @@ class RandomUtil {
static randomText() {
var chars = 'abcdefghijklmnopqrstuvwxyz1234567890';
var string = '';
- var len = 6 + Math.floor(Math.random() * 5);
- for (var ii = 0; ii < len; ii++) {
+ for (var ii = 0; ii < 8; ii++) {
string += chars[Math.floor(Math.random() * chars.length)];
}
return string;
diff --git a/web/html/xui/client_modal.html b/web/html/xui/client_modal.html
index f7faf888..25974325 100644
--- a/web/html/xui/client_modal.html
+++ b/web/html/xui/client_modal.html
@@ -125,15 +125,6 @@
},
},
methods: {
- getNewEmail(client) {
- var chars = 'abcdefghijklmnopqrstuvwxyz1234567890';
- var string = '';
- var len = 6 + Math.floor(Math.random() * 5);
- for (var ii = 0; ii < len; ii++) {
- string += chars[Math.floor(Math.random() * chars.length)];
- }
- client.email = string;
- },
async getDBClientIps(email, event) {
const msg = await HttpUtil.post('/panel/inbound/clientIps/' + email);
if (!msg.success) {
diff --git a/web/html/xui/form/client.html b/web/html/xui/form/client.html
index 7bebddcb..9dfde046 100644
--- a/web/html/xui/form/client.html
+++ b/web/html/xui/form/client.html
@@ -16,7 +16,7 @@
<template slot="title">
<span>{{ i18n "pages.inbounds.emailDesc" }}</span>
</template>
- <a-icon type="sync" @click="getNewEmail(client)"></a-icon>
+ <a-icon @click="client.email = RandomUtil.randomText()" type="sync"> </a-icon>
</a-tooltip>
</span>
<a-input v-model.trim="client.email" style="width: 200px;"></a-input>
diff --git a/web/html/xui/form/protocol/shadowsocks.html b/web/html/xui/form/protocol/shadowsocks.html
index 47198671..cac2229f 100644
--- a/web/html/xui/form/protocol/shadowsocks.html
+++ b/web/html/xui/form/protocol/shadowsocks.html
@@ -9,7 +9,7 @@
<template slot="title">
<span>{{ i18n "pages.inbounds.emailDesc" }}</span>
</template>
- <a-icon @click="getNewEmail(client)" type="sync"></a-icon>
+ <a-icon @click="client.email = RandomUtil.randomText()" type="sync"> </a-icon>
</a-tooltip>
</span>
<a-input v-model.trim="client.email" style="width: 150px;"></a-input>
diff --git a/web/html/xui/form/protocol/trojan.html b/web/html/xui/form/protocol/trojan.html
index 2b6a2a3b..5594f47e 100644
--- a/web/html/xui/form/protocol/trojan.html
+++ b/web/html/xui/form/protocol/trojan.html
@@ -9,7 +9,7 @@
<template slot="title">
<span>{{ i18n "pages.inbounds.emailDesc" }}</span>
</template>
- <a-icon type="sync" @click="getNewEmail(client)"></a-icon>
+ <a-icon @click="client.email = RandomUtil.randomText()" type="sync"> </a-icon>
</a-tooltip>
</span>
<a-input v-model.trim="client.email" style="width: 150px;"></a-input>
diff --git a/web/html/xui/form/protocol/vless.html b/web/html/xui/form/protocol/vless.html
index 16722490..1c2ebccf 100644
--- a/web/html/xui/form/protocol/vless.html
+++ b/web/html/xui/form/protocol/vless.html
@@ -9,7 +9,7 @@
<template slot="title">
<span>{{ i18n "pages.inbounds.emailDesc" }}</span>
</template>
- <a-icon type="sync" @click="getNewEmail(client)"></a-icon>
+ <a-icon @click="client.email = RandomUtil.randomText()" type="sync"> </a-icon>
</a-tooltip>
</span>
<a-input v-model.trim="client.email" style="width: 150px;"></a-input>
diff --git a/web/html/xui/form/protocol/vmess.html b/web/html/xui/form/protocol/vmess.html
index b54039af..6ebdacb1 100644
--- a/web/html/xui/form/protocol/vmess.html
+++ b/web/html/xui/form/protocol/vmess.html
@@ -9,7 +9,7 @@
<template slot="title">
<span>{{ i18n "pages.inbounds.emailDesc" }}</span>
</template>
- <a-icon type="sync" @click="getNewEmail(client)"></a-icon>
+ <a-icon @click="client.email = RandomUtil.randomText()" type="sync"> </a-icon>
</a-tooltip>
</span>
<a-input v-model.trim="client.email" style="width: 150px;"></a-input>
diff --git a/web/html/xui/inbound_modal.html b/web/html/xui/inbound_modal.html
index 8d7adb52..cb98f6a8 100644
--- a/web/html/xui/inbound_modal.html
+++ b/web/html/xui/inbound_modal.html
@@ -117,15 +117,6 @@
}
inModal.inbound.stream.reality.privateKey = msg.obj.privateKey;
inModal.inbound.stream.reality.settings.publicKey = msg.obj.publicKey;
- },
- getNewEmail(client) {
- var chars = 'abcdefghijklmnopqrstuvwxyz1234567890';
- var string = '';
- var len = 6 + Math.floor(Math.random() * 5);
- for (var ii = 0; ii < len; ii++) {
- string += chars[Math.floor(Math.random() * chars.length)];
- }
- client.email = string;
}
},
});