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
path: root/web/html
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-06-03 18:29:32 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-06-03 18:29:32 +0300
commitfdc1124ea495aafbb5096b0333e8ceff6aaa53f8 (patch)
tree990344071070d6d8b57d9989e862f84cbbc25d94 /web/html
parent33a598366be966ded4e0b41bbe19fd566552eec3 (diff)
some changes
ip limit method back to v1.6.0 method remove event on getDBClientIps better show ip on log (",\n")
Diffstat (limited to 'web/html')
-rw-r--r--web/html/xui/client_bulk_modal.html1
-rw-r--r--web/html/xui/client_modal.html29
-rw-r--r--web/html/xui/form/client.html51
-rw-r--r--web/html/xui/form/inbound.html7
4 files changed, 46 insertions, 42 deletions
diff --git a/web/html/xui/client_bulk_modal.html b/web/html/xui/client_bulk_modal.html
index e4c46cc0..d2d3b0d4 100644
--- a/web/html/xui/client_bulk_modal.html
+++ b/web/html/xui/client_bulk_modal.html
@@ -57,6 +57,7 @@
</span>
<a-input v-model.trim="clientsBulkModal.tgId"></a-input>
</a-form-item>
+ <br>
<a-form-item>
<span slot="label">
<span>{{ i18n "pages.inbounds.IPLimit" }}</span>
diff --git a/web/html/xui/client_modal.html b/web/html/xui/client_modal.html
index ba9fce31..e8236778 100644
--- a/web/html/xui/client_modal.html
+++ b/web/html/xui/client_modal.html
@@ -120,26 +120,27 @@
},
},
methods: {
- async getDBClientIps(email, event) {
- const msg = await HttpUtil.post('/panel/inbound/clientIps/' + email);
- if (!msg.success) {
- return;
- }
+ async getDBClientIps(email) {
try {
- ips = JSON.parse(msg.obj)
- ips = ips.join(",")
- event.target.value = ips
+ const msg = await HttpUtil.post(`/panel/inbound/clientIps/${email}`);
+ if (!msg.success) {
+ return;
+ }
+ const ips = JSON.parse(msg.obj).join(",\n");
+ document.getElementById("clientIPs").value = ips;
} catch (error) {
- // text
- event.target.value = msg.obj
+ document.getElementById("clientIPs").value = msg.obj;
}
},
async clearDBClientIps(email) {
- const msg = await HttpUtil.post('/panel/inbound/clearClientIps/' + email);
- if (!msg.success) {
- return;
+ try {
+ const msg = await HttpUtil.post(`/panel/inbound/clearClientIps/${email}`);
+ if (!msg.success) {
+ return;
+ }
+ document.getElementById("clientIPs").value = "";
+ } catch (error) {
}
- document.getElementById("clientIPs").value = ""
},
resetClientTraffic(email, dbInboundId, iconElement) {
this.$confirm({
diff --git a/web/html/xui/form/client.html b/web/html/xui/form/client.html
index 9494f0ac..45068f91 100644
--- a/web/html/xui/form/client.html
+++ b/web/html/xui/form/client.html
@@ -72,31 +72,32 @@
<a-input-number v-model="client.limitIp" min="0"></a-input-number>
</a-form-item>
<a-form-item v-if="client.email && client.limitIp > 0 && isEdit">
- <span slot="label">
- <span>{{ i18n "pages.inbounds.IPLimitlog" }}</span>
- <a-tooltip>
- <template slot="title">
- <span>{{ i18n "pages.inbounds.IPLimitlogDesc" }}</span>
- </template>
- <a-icon type="question-circle" theme="filled"></a-icon>
- </a-tooltip>
- <a-tooltip>
- <template slot="title">
- <span>{{ i18n "pages.inbounds.IPLimitlogclear" }}</span>
- </template>
- <span style="color: #FF4D4F">
- <a-icon type="delete" @click="clearDBClientIps(client.email)"></a-icon>
- </span>
- </a-tooltip>
- </span>
- <a-form layout="block">
- <a-textarea id="clientIPs" readonly
- @click="getDBClientIps(client.email,$event)"
- placeholder="Click To Get IPs"
- :auto-size="{ minRows: 2, maxRows: 10 }">
- </a-textarea>
- </a-form>
- </a-form-item>
+ <span slot="label">
+ <span>{{ i18n "pages.inbounds.IPLimitlog" }}</span>
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "pages.inbounds.IPLimitlogDesc" }}</span>
+ </template>
+ <a-icon type="question-circle" theme="filled"></a-icon>
+ </a-tooltip>
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "pages.inbounds.IPLimitlogclear" }}</span>
+ </template>
+ <span style="color: #FF4D4F">
+ <a-icon type="delete" @click="clearDBClientIps(client.email)"></a-icon>
+ </span>
+ </a-tooltip>
+ </span>
+ <a-form layout="block">
+ <a-textarea id="clientIPs" readonly
+ @click="getDBClientIps(client.email)"
+ placeholder="Click To Get IPs"
+ :auto-size="{ minRows: 5, maxRows: 10 }"
+ >
+ </a-textarea>
+ </a-form>
+ </a-form-item>
<br>
<a-form-item v-if="inbound.xtls" label="Flow">
<a-select v-model="client.flow" style="width: 200px" :dropdown-class-name="themeSwitcher.darkCardClass">
diff --git a/web/html/xui/form/inbound.html b/web/html/xui/form/inbound.html
index 383105ac..e5b3bfc3 100644
--- a/web/html/xui/form/inbound.html
+++ b/web/html/xui/form/inbound.html
@@ -1,12 +1,13 @@
{{define "form/inbound"}}
<!-- base -->
<a-form layout="inline">
- <a-form-item label='{{ i18n "remark" }}'>
- <a-input v-model.trim="dbInbound.remark"></a-input>
- </a-form-item>
<a-form-item label='{{ i18n "enable" }}'>
<a-switch v-model="dbInbound.enable"></a-switch>
</a-form-item>
+ <br>
+ <a-form-item label='{{ i18n "remark" }}'>
+ <a-input v-model.trim="dbInbound.remark"></a-input>
+ </a-form-item>
<a-form-item label='{{ i18n "protocol" }}'>
<a-select v-model="inbound.protocol" style="width: 160px;" :disabled="isEdit" :dropdown-class-name="themeSwitcher.darkCardClass">
<a-select-option v-for="p in Protocols" :key="p" :value="p">[[ p ]]</a-select-option>