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/inbound_info_modal.html | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'web/html/xui/inbound_info_modal.html') diff --git a/web/html/xui/inbound_info_modal.html b/web/html/xui/inbound_info_modal.html index f95461e2..1c561aa6 100644 --- a/web/html/xui/inbound_info_modal.html +++ b/web/html/xui/inbound_info_modal.html @@ -258,7 +258,7 @@ Subscription Link - + [[ infoModal.subLink ]] @@ -267,7 +267,7 @@ Json Link - + [[ infoModal.subJsonLink ]] @@ -279,7 +279,7 @@ [[ infoModal.clientSettings.tgId ]] - + @@ -290,7 +290,7 @@ [[ link.remark ]] - + [[ link.link ]] @@ -304,7 +304,7 @@ [[ link.remark ]] - + [[ link.link ]] @@ -431,7 +431,7 @@ Config - +
@@ -532,10 +532,12 @@ }, }, methods: { - copyToClipboard(content) { - return copyToClipboard(content).then(() => { - app.$message.success('{{ i18n "copied" }}') - }) + copy(content) { + ClipboardManager + .copyText(content) + .then(() => { + app.$message.success('{{ i18n "copied" }}') + }) }, statsColor(stats) { return usageColor(stats.up + stats.down, app.trafficDiff, stats.total); -- 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/inbound_info_modal.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'web/html/xui/inbound_info_modal.html') diff --git a/web/html/xui/inbound_info_modal.html b/web/html/xui/inbound_info_modal.html index 1c561aa6..5ac5e9ab 100644 --- a/web/html/xui/inbound_info_modal.html +++ b/web/html/xui/inbound_info_modal.html @@ -181,8 +181,8 @@ {{ i18n "usage" }} - [[ sizeFormat(infoModal.clientStats.up + infoModal.clientStats.down) ]] - ↑ [[ sizeFormat(infoModal.clientStats.up) ]] / [[ sizeFormat(infoModal.clientStats.down) ]] ↓ + [[ SizeFormatter.sizeFormat(infoModal.clientStats.up + infoModal.clientStats.down) ]] + ↑ [[ SizeFormatter.sizeFormat(infoModal.clientStats.up) ]] / [[ SizeFormatter.sizeFormat(infoModal.clientStats.down) ]] ↓ @@ -224,7 +224,7 @@ [[ getRemStats() ]] - [[ sizeFormat(infoModal.clientSettings.totalGB) ]] + [[ SizeFormatter.sizeFormat(infoModal.clientSettings.totalGB) ]] @@ -233,7 +233,7 @@