From b9307c6c9c26c7d87819ef60c18eccce134f09ea Mon Sep 17 00:00:00 2001
From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com>
Date: Sat, 15 Mar 2025 18:15:46 +0700
Subject: [PATCH] chore: pretty 'Overview' page (#2772)
* chore: pretty 'Overview' page
* chore: some improvements in 'overview page'
- reduced font size
- added caption to buttons
- fixed display of xray state
- xray version display returned
---
web/html/xui/index.html | 389 +++++++++++++++------------
web/translation/translate.en_US.toml | 16 +-
web/translation/translate.es_ES.toml | 14 +-
web/translation/translate.fa_IR.toml | 12 +-
web/translation/translate.id_ID.toml | 14 +-
web/translation/translate.ja_JP.toml | 14 +-
web/translation/translate.pt_BR.toml | 14 +-
web/translation/translate.ru_RU.toml | 14 +-
web/translation/translate.tr_TR.toml | 14 +-
web/translation/translate.uk_UA.toml | 14 +-
web/translation/translate.vi_VN.toml | 14 +-
web/translation/translate.zh_CN.toml | 14 +-
web/translation/translate.zh_TW.toml | 12 +-
13 files changed, 323 insertions(+), 232 deletions(-)
diff --git a/web/html/xui/index.html b/web/html/xui/index.html
index e78940fd..bd7d3878 100644
--- a/web/html/xui/index.html
+++ b/web/html/xui/index.html
@@ -24,13 +24,35 @@
user-select: none;
cursor: pointer;
}
- .dark .ant-backup-list-item svg {
- color: var(--dark-color-text-primary);
+ .dark .ant-backup-list-item svg,
+ .dark .ant-card-actions>li>*,
+ .dark .ant-badge-status-text,
+ .dark .ant-statistic-title,
+ .dark .ant-statistic-content,
+ .dark .ant-card-extra {
+ color: var(--dark-color-text-primary) !important;
+ }
+ .dark .ant-card-actions>li>*:hover {
+ color: var(--color-primary-100) !important;
}
.dark .ant-backup-list,
- .dark .ant-xray-version-list {
+ .dark .ant-xray-version-list,
+ .dark .ant-card-actions,
+ .dark .ant-card-actions>li:not(:last-child) {
border-color: var(--dark-color-stroke);
}
+ .ant-card-actions {
+ background: transparent !important;
+ }
+ .ant-statistic-content-prefix {
+ font-size: 20px;
+ }
+ .ant-statistic-content-value {
+ font-size: 18px;
+ }
+ .ip-hidden {
+ filter: blur(10px);
+ }
@@ -47,7 +69,7 @@
show-icon closable>
-
+
@@ -100,172 +122,191 @@
-
-
-
- 3X-UI:
- v{{ .cur_ver }}
- @XrayUI
-
-
-
-
- {{ i18n "pages.index.operationHours" }}:
- Xray: [[ TimeFormatter.formatSecond(status.appStats.uptime) ]]
- OS: [[ TimeFormatter.formatSecond(status.uptime) ]]
-
-
-
-
- {{ i18n "pages.index.xrayStatus" }}:
- [[ status.xray.state ]]
-
- An error occurred while running Xray
- {{ i18n "pages.index.logs" }}
-
-
- [[ line ]]
-
-
-
- {{ i18n "pages.index.stopXray" }}
- {{ i18n "pages.index.restartXray" }}
- v[[ status.xray.version ]]
-
-
-
-
- {{ i18n "menu.link" }}:
- {{ i18n "pages.index.logs" }}
- {{ i18n "pages.index.config" }}
- {{ i18n "pages.index.backup" }}
-
-
-
-
- {{ i18n "pages.index.systemLoad" }}:
-
-
- [[ status.loads[0] ]] | [[ status.loads[1] ]] | [[ status.loads[2] ]]
-
- {{ i18n "pages.index.systemLoadDesc" }}
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
- {{ i18n "usage"}}:
- RAM: [[ SizeFormatter.sizeFormat(status.appStats.mem) ]]
- Threads: [[ status.appStats.threads ]]
-
-
-
-
-
-
-
-
- IPv4
-
- [[ status.publicIP.ipv4 ]]
+
+
+ An error occurred while running Xray
+ {{ i18n "pages.index.logs" }}
+
+
+ [[ line ]]
-
-
-
-
-
-
- IPv6
-
- [[ status.publicIP.ipv6 ]]
+
+
+
+
+
+
+
+ {{ i18n "pages.index.stopXray" }}
+
+
+
+ {{ i18n "pages.index.restartXray" }}
+
+
+
+ v[[ status.xray.version ]]
+
+
+
+
+
+
+
+
+
+ {{ i18n "pages.index.logs" }}
+
+
+
+ {{ i18n "pages.index.config" }}
+
+
+
+ {{ i18n "pages.index.backup" }}
+
+
+
+
+
+
+ v{{ .cur_ver }}
+ @XrayUI
+
+
+
+
+ Xray: [[ TimeFormatter.formatSecond(status.appStats.uptime) ]]
+ OS: [[ TimeFormatter.formatSecond(status.uptime) ]]
+
+
+
+
+
+
+ [[ status.loads[0] ]] | [[ status.loads[1] ]] | [[ status.loads[2] ]]
+
+ {{ i18n "pages.index.systemLoadDesc" }}
+
+
+
+
+
+
+
+ RAM: [[ SizeFormatter.sizeFormat(status.appStats.mem) ]]
+ Threads: [[ status.appStats.threads ]]
+
+
+
+
+
+
+
+ {{ i18n "pages.index.toggleIpVisibility" }}
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
- TCP: [[ status.tcpCount ]]
-
- {{ i18n "pages.index.connectionTcpCountDesc" }}
+
+
+
+
+
+
-
-
-
-
-
-
- UDP: [[ status.udpCount ]]
-
- {{ i18n "pages.index.connectionUdpCountDesc" }}
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
- Up: [[ SizeFormatter.sizeFormat(status.netIO.up) ]]/s
-
- {{ i18n "pages.index.upSpeed" }}
+
+
+
+
+
+
-
-
-
-
-
-
- Down: [[ SizeFormatter.sizeFormat(status.netIO.down) ]]/s
-
- {{ i18n "pages.index.downSpeed" }}
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ i18n "pages.index.totalSent" }}
- Out: [[ SizeFormatter.sizeFormat(status.netTraffic.sent) ]]
-
-
-
-
-
-
-
-
- {{ i18n "pages.index.totalReceive" }}
- In: [[ SizeFormatter.sizeFormat(status.netTraffic.recv) ]]
-
-
-
-
-
-
-
+
+ /s
+
+
+
+
+
+
+
+
+
+ /s
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -279,7 +320,7 @@
[[ version ]]
-
+
@@ -360,9 +401,9 @@
{{template "textModal"}}