From 2b80b9174cb2f286b960655968053cd428057de8 Mon Sep 17 00:00:00 2001 From: ali rahimi Date: Mon, 13 Jan 2025 18:09:04 +0100 Subject: [PATCH] code format compare --- web/html/common/qrcode_modal.html | 6 ++- web/html/xui/client_modal.html | 29 +++++--------- web/html/xui/inbounds.html | 66 +++++++++++++++---------------- 3 files changed, 46 insertions(+), 55 deletions(-) diff --git a/web/html/common/qrcode_modal.html b/web/html/common/qrcode_modal.html index db07c2b2..6558c347 100644 --- a/web/html/common/qrcode_modal.html +++ b/web/html/common/qrcode_modal.html @@ -45,13 +45,15 @@ qrcodes: [], clipboard: null, visible: false, - isJustSub: false,subId: '', + isJustSub: false, + subId: '', show: function(title = '', dbInbound, client, isJustSub = false) { this.title = title; this.dbInbound = dbInbound; this.inbound = dbInbound.toInbound(); this.client = client; - this.isJustSub = isJustSub;this.subId = ''; + this.isJustSub = isJustSub; + this.subId = ''; this.qrcodes = []; if (this.inbound.protocol == Protocols.WIREGUARD) { this.inbound.genInboundLinks(dbInbound.remark).split('\r\n').forEach((l, index) => { diff --git a/web/html/xui/client_modal.html b/web/html/xui/client_modal.html index b1187187..fc3ea1e1 100644 --- a/web/html/xui/client_modal.html +++ b/web/html/xui/client_modal.html @@ -4,10 +4,7 @@ :class="themeSwitcher.currentTheme" :ok-text="clientModal.okText" cancel-text='{{ i18n "close" }}'> {{template "form/client"}} @@ -154,26 +151,18 @@ }, getClientId(protocol, client) { switch (protocol) { - case Protocols.TROJAN: - return client.password; - case Protocols.SHADOWSOCKS: - return client.email; - default: - return client.id; + case Protocols.TROJAN: return client.password; + case Protocols.SHADOWSOCKS: return client.email; + default: return client.id; } }, addClient(protocol, clients) { switch (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)); - 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)); + default: return null; } }, close() { diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index 330a9e6b..739dc932 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -15,14 +15,14 @@ overflow-y: hidden; } .ant-table .ant-table-content .ant-table-tbody tr:last-child .ant-table-wrapper { - margin:-10px 22px !important; + margin:-10px 22px !important; } .ant-table .ant-table-content .ant-table-tbody tr:last-child .ant-table-wrapper .ant-table { border-bottom-left-radius: 1rem; border-bottom-right-radius: 1rem; } .ant-table .ant-table-content .ant-table-tbody tr:last-child tr:last-child td { - border-bottom-color: transparent; + border-bottom-color: transparent; } .ant-table .ant-table-tbody tr:last-child.ant-table-expanded-row .ant-table-wrapper .ant-table-tbody>tr:last-child>td:first-child { border-bottom-left-radius: 6px; @@ -40,7 +40,7 @@ padding: .5rem; } .ant-table .ant-table-content .ant-table-tbody tr:last-child .ant-table-wrapper { - margin:-10px 2px !important; + margin:-10px 2px !important; } } .ant-col-sm-24 { @@ -130,10 +130,10 @@ + message='{{ i18n "secAlertTitle" }}' + color="red" + description='{{ i18n "secAlertSsl" }}' + show-icon closable> @@ -233,10 +233,10 @@ + style="width: 65px;" + v-if="isRefreshEnabled" + @change="changeRefreshInterval" + :dropdown-class-name="themeSwitcher.currentTheme"> [[ key ]]s @@ -246,8 +246,8 @@
+ :style="isMobile ? 'margin-bottom: .5rem; display: flex;' : 'margin-right: .5rem;'" + @change="toggleFilter"> @@ -262,15 +262,15 @@
+ :data-source="searchedInbounds" + :scroll="isMobile ? {} : { x: 1000 }" + :pagination=pagination(searchedInbounds) + :expand-icon-as-cell="false" + :expand-row-by-click="false" + :expand-icon-column-index="0" + :indent-size="0" + :row-class-name="dbInbound => (dbInbound.isMultiUser() ? '' : 'hideExpandIcon')" + style="margin-top: 10px">