From 7483fb2ec57055f5f4f0fb14e559a87a5c2106f9 Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Fri, 7 Mar 2025 07:11:03 +0000 Subject: refactor: delete `base64js` instead of base64 library you can use built-in JS functions `btoa()` and `atob()` --- web/html/xui/inbounds.html | 1 - 1 file changed, 1 deletion(-) (limited to 'web/html/xui/inbounds.html') diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index 86890926..93999e97 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -544,7 +544,6 @@ {{template "js" .}} - -- cgit v1.2.3 From 26bf693dbdc2db0222ee37615e353f7ca1fdd3c1 Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Fri, 7 Mar 2025 07:27:33 +0000 Subject: refactor: move copy function to utils.js --- web/html/xui/inbounds.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'web/html/xui/inbounds.html') diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index 93999e97..7dc5ff5f 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -883,7 +883,7 @@ this.exportSubs(dbInbound.id); break; case "clipboard": - this.copyToClipboard(dbInbound.id); + this.copy(dbInbound.id); break; case "resetTraffic": this.resetTraffic(dbInbound.id); @@ -1382,9 +1382,9 @@ } txtModal.show('{{ i18n "pages.inbounds.export"}}', copyText.join('\r\n'), 'All-Inbounds'); }, - copyToClipboard(dbInboundId) { - dbInbound = this.dbInbounds.find(row => row.id === dbInboundId); - txtModal.show('{{ i18n "pages.inbounds.inboundData" }}', JSON.stringify(dbInbound, null, 2)); + copy(dbInboundId) { + dbInbound = this.dbInbounds.find(row => row.id === dbInboundId); + txtModal.show('{{ i18n "pages.inbounds.inboundData" }}', JSON.stringify(dbInbound, null, 2)); }, async startDataRefreshLoop() { while (this.isRefreshEnabled) { -- cgit v1.2.3 From 0a207b8a2c0629b7f1996025a40a10fbe58d05d0 Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Fri, 7 Mar 2025 09:07:23 +0000 Subject: refactor: merging all util functions into classes --- web/html/xui/inbounds.html | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'web/html/xui/inbounds.html') diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index 7dc5ff5f..677a3074 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -141,11 +141,11 @@ {{ i18n "pages.inbounds.totalDownUp" }}: - [[ sizeFormat(total.up) ]] / [[ sizeFormat(total.down) ]] + [[ SizeFormatter.sizeFormat(total.up) ]] / [[ SizeFormatter.sizeFormat(total.down) ]] {{ i18n "pages.inbounds.totalUsage" }}: - [[ sizeFormat(total.up + total.down) ]] + [[ SizeFormatter.sizeFormat(total.up + total.down) ]] {{ i18n "pages.inbounds.inboundCount" }}: @@ -375,19 +375,19 @@ - - [[ sizeFormat(dbInbound.up + dbInbound.down) ]] / + + [[ SizeFormatter.sizeFormat(dbInbound.up + dbInbound.down) ]] / - - [[ sizeFormat(dbInbound.up + dbInbound.down) ]] / + + [[ SizeFormatter.sizeFormat(dbInbound.up + dbInbound.down) ]] /