diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2026-05-04 14:20:24 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2026-05-04 14:20:24 +0300 |
| commit | e19061d513b8c4fb2207b4a553a96ea086089612 (patch) | |
| tree | 8a05450f0f6d3e8a2a182976b1a38bf5cca824ea /web/html/modals/client_modal.html | |
| parent | 51e2fb6dbfb6f3f21b3f578c15c3dc0d47c4a66e (diff) | |
TLS: Remove ECH Force Query
Diffstat (limited to 'web/html/modals/client_modal.html')
| -rw-r--r-- | web/html/modals/client_modal.html | 69 |
1 files changed, 42 insertions, 27 deletions
diff --git a/web/html/modals/client_modal.html b/web/html/modals/client_modal.html index 8ce0e832..f66c01e6 100644 --- a/web/html/modals/client_modal.html +++ b/web/html/modals/client_modal.html @@ -1,10 +1,7 @@ {{define "modals/clientsModal"}} -<a-modal id="client-modal" v-model="clientModal.visible" - :title="clientModal.title" @ok="clientModal.ok" - :confirm-loading="clientModal.confirmLoading" :closable="true" - :mask-closable="false" - :class="themeSwitcher.currentTheme" - :ok-text="clientModal.okText" cancel-text='{{ i18n "close" }}'> +<a-modal id="client-modal" v-model="clientModal.visible" :title="clientModal.title" @ok="clientModal.ok" + :confirm-loading="clientModal.confirmLoading" :closable="true" :mask-closable="false" + :class="themeSwitcher.currentTheme" :ok-text="clientModal.okText" cancel-text='{{ i18n "close" }}'> <template v-if="isEdit"> <a-tag v-if="isExpiry || isTrafficExhausted" color="red" :style="{ marginBottom: '10px', display: 'block', textAlign: 'center' }">Account @@ -13,7 +10,6 @@ {{template "form/client"}} </a-modal> <script> - const clientModal = { visible: false, confirmLoading: false, @@ -30,12 +26,20 @@ delayedStart: false, ok() { if (clientModal.isEdit) { - ObjectUtil.execute(clientModal.confirm, clientModalApp.client, clientModal.dbInbound.id, clientModal.oldClientId); + ObjectUtil.execute(clientModal.confirm, clientModalApp.client, clientModal.dbInbound.id, clientModal + .oldClientId); } else { ObjectUtil.execute(clientModal.confirm, clientModalApp.client, clientModal.dbInbound.id); } }, - show({ title = '', okText = '{{ i18n "sure" }}', index = null, dbInbound = null, confirm = () => { }, isEdit = false }) { + show({ + title = '', + okText = '{{ i18n "sure" }}', + index = null, + dbInbound = null, + confirm = () => {}, + isEdit = false + }) { this.visible = true; this.title = title; this.okText = okText; @@ -55,30 +59,41 @@ } this.clientStats = this.dbInbound.clientStats.find(row => row.email === this.clients[this.index].email); this.confirm = confirm; - }, + }, getClientId(protocol, client) { switch (protocol) { - case Protocols.TROJAN: return client.password; - case Protocols.SHADOWSOCKS: return client.email; - case Protocols.HYSTERIA: return client.auth; - default: return client.id; + case Protocols.TROJAN: + return client.password; + case Protocols.SHADOWSOCKS: + return client.email; + case Protocols.HYSTERIA: + return client.auth; + default: + return client.id; } }, addClient(inbound, clients) { switch (inbound.protocol) { - case Protocols.VMESS: return clients.push(new Inbound.VmessSettings.VMESS()); - case Protocols.VLESS: return clients.push(new Inbound.VLESSSettings.VLESS()); - case Protocols.TROJAN: return clients.push(new Inbound.TrojanSettings.Trojan()); - case Protocols.SHADOWSOCKS: return clients.push(new Inbound.ShadowsocksSettings.Shadowsocks(clients[0].method, RandomUtil.randomShadowsocksPassword(inbound.settings.method))); - case Protocols.HYSTERIA: return clients.push(new Inbound.HysteriaSettings.Hysteria()); - default: return null; + case Protocols.VMESS: + return clients.push(new Inbound.VmessSettings.VMESS()); + case Protocols.VLESS: + return clients.push(new Inbound.VLESSSettings.VLESS()); + case Protocols.TROJAN: + return clients.push(new Inbound.TrojanSettings.Trojan()); + case Protocols.SHADOWSOCKS: + return clients.push(new Inbound.ShadowsocksSettings.Shadowsocks(clients[0].method, RandomUtil + .randomShadowsocksPassword(inbound.settings.method))); + case Protocols.HYSTERIA: + return clients.push(new Inbound.HysteriaSettings.Hysteria()); + default: + return null; } }, close() { clientModal.visible = false; clientModal.loading(false); }, - loading(loading=true) { + loading(loading = true) { clientModal.confirmLoading = loading; }, }; @@ -110,7 +125,8 @@ return true }, get isExpiry() { - return this.clientModal.isEdit && this.client.expiryTime >0 ? (this.client.expiryTime < new Date().getTime()) : false; + return this.clientModal.isEdit && this.client.expiryTime > 0 ? (this.client.expiryTime < + new Date().getTime()) : false; }, get delayedStart() { return this.clientModal.delayedStart; @@ -150,8 +166,7 @@ return; } document.getElementById("clientIPs").value = ""; - } catch (error) { - } + } catch (error) {} }, resetClientTraffic(email, dbInboundId, iconElement) { this.$confirm({ @@ -162,7 +177,8 @@ cancelText: '{{ i18n "cancel"}}', onOk: async () => { iconElement.disabled = true; - const msg = await HttpUtil.postWithModal('/panel/api/inbounds/' + dbInboundId + '/resetClientTraffic/' + email); + const msg = await HttpUtil.postWithModal('/panel/api/inbounds/' + + dbInboundId + '/resetClientTraffic/' + email); if (msg.success) { this.clientModal.clientStats.up = 0; this.clientModal.clientStats.down = 0; @@ -173,6 +189,5 @@ }, }, }); - </script> -{{end}} +{{end}}
\ No newline at end of file |
