From 8176210b6772968d4c7b0fff571139201c51c6eb Mon Sep 17 00:00:00 2001
From: Shahin <115543613+shahin-io@users.noreply.github.com>
Date: Tue, 6 Feb 2024 17:56:05 +0000
Subject: [PATCH] Update index.html
---
web/html/xui/index.html | 144 +++++++++++++++++++---------------------
1 file changed, 67 insertions(+), 77 deletions(-)
diff --git a/web/html/xui/index.html b/web/html/xui/index.html
index 258d4154..f5bf601d 100644
--- a/web/html/xui/index.html
+++ b/web/html/xui/index.html
@@ -36,15 +36,15 @@
-
CPU: [[ cpuCoreFormat(status.cpuCores) ]]
- Speed: [[ cpuSpeedFormat(status.cpuSpeedMhz) ]]
+ CPU: [[ cpuCoreFormat(status.cpuCores) ]]
+ Speed: [[ cpuSpeedFormat(status.cpuSpeedMhz) ]]
- {{ i18n "pages.index.memory"}}: [[ sizeFormat(status.mem.current) ]] / [[ sizeFormat(status.mem.total) ]]
+ {{ i18n "pages.index.memory"}}: [[ sizeFormat(status.mem.current) ]] / [[ sizeFormat(status.mem.total) ]]
@@ -56,7 +56,7 @@
:stroke-color="status.swap.color"
:percent="status.swap.percent">
- Swap: [[ sizeFormat(status.swap.current) ]] / [[ sizeFormat(status.swap.total) ]]
+ Swap: [[ sizeFormat(status.swap.current) ]] / [[ sizeFormat(status.swap.total) ]]
@@ -64,7 +64,7 @@
:stroke-color="status.disk.color"
:percent="status.disk.percent">
- {{ i18n "pages.index.hard"}}: [[ sizeFormat(status.disk.current) ]] / [[ sizeFormat(status.disk.total) ]]
+ {{ i18n "pages.index.hard"}}: [[ sizeFormat(status.disk.current) ]] / [[ sizeFormat(status.disk.total) ]]
@@ -74,26 +74,39 @@
-
+
+
+
+
+ {{ i18n "pages.index.machineInfo" }}:
+
+ {{ i18n "pages.index.hostname" }}
+ [[ status.publicIP.hostname ]]
+
+
+
+ IPv4:
[[ status.publicIP.ipv4 ]]
IPv6:
[[ status.publicIP.ipv6 ]]
+
+ IPv4/v6
+
+
+ 3X-UI v{{ .cur_ver }}
+
+
+
- 3X-UI v{{ .cur_ver }}
- Xray v[[ status.xray.version ]]
- @panel3xui
-
-
-
-
- {{ i18n "menu.link" }}:
- {{ i18n "pages.index.logs" }}
- {{ i18n "pages.index.config" }}
+ {{ i18n "menu.link" }}:
+ {{ i18n "pages.index.logs" }}
+ {{ i18n "pages.index.config" }}
{{ i18n "pages.index.backup" }}
+
- {{ i18n "pages.index.xrayStatus" }}:
- [[ status.xray.state ]]
+ {{ i18n "pages.index.xrayStatus" }}:
+ [[ status.xray.state.toUpperCase() ]]
An error occurred while running Xray
@@ -102,140 +115,117 @@
[[ line ]]
-
+
- {{ i18n "pages.index.stopXray" }}
- {{ i18n "pages.index.restartXray" }}
- {{ i18n "pages.index.xraySwitch" }}
+ {{ i18n "pages.index.stopXray" }}
+ {{ i18n "pages.index.restartXray" }}
+ v[[ status.xray.version ]]
+
- {{ i18n "pages.index.operationHours" }}:
- Xray
- [[ formatSecond(status.appStats.uptime) ]]
- OS
- [[ formatSecond(status.uptime) ]]
+ {{ i18n "pages.index.operationHours" }}:
+ Xray [[ formatSecond(status.appStats.uptime) ]]
+ OS [[ formatSecond(status.uptime) ]]
+
- {{ i18n "pages.index.systemLoad" }}: [[ status.loads[0] ]] | [[ status.loads[1] ]] | [[ status.loads[2] ]]
+ {{ i18n "pages.index.systemLoad" }}:
{{ i18n "pages.index.systemLoadDesc" }}
-
+ [[ status.loads[0] ]] | [[ status.loads[1] ]] | [[ status.loads[2] ]]
+
- {{ i18n "usage"}}:
- RAM [[ sizeFormat(status.appStats.mem) ]] -
- Threads [[ status.appStats.threads ]]
+ {{ i18n "usage"}}:
+
+ RAM [[ sizeFormat(status.appStats.mem) ]]
+
+
+ Threads [[ status.appStats.threads ]]
-
-
-
-
-
- IPv4:
-
-
- [[ status.publicIP.ipv4 ]]
-
-
-
-
-
-
- IPv6:
-
-
- [[ status.publicIP.ipv6 ]]
-
-
-
-
-
-
-
+
- TCP: [[ status.tcpCount ]]
{{ i18n "pages.index.connectionTcpCountDesc" }}
-
+ TCP: [[ status.tcpCount ]]
+
-
- UDP: [[ status.udpCount ]]
+
{{ i18n "pages.index.connectionUdpCountDesc" }}
-
+ UDP: [[ status.udpCount ]]
+
- [[ sizeFormat(status.netIO.up) ]]/s
{{ i18n "pages.index.upSpeed" }}
-
+ Up: [[ sizeFormat(status.netIO.up) ]]/s
+
- [[ sizeFormat(status.netIO.down) ]]/s
{{ i18n "pages.index.downSpeed" }}
-
+ Dn: [[ sizeFormat(status.netIO.down) ]]/s
+
- [[ sizeFormat(status.netTraffic.sent) ]]
{{ i18n "pages.index.totalSent" }}
-
+ Out: [[ sizeFormat(status.netTraffic.sent) ]]
- [[ sizeFormat(status.netTraffic.recv) ]]
{{ i18n "pages.index.totalReceive" }}
-
+ In: [[ sizeFormat(status.netTraffic.recv) ]]
@@ -245,7 +235,7 @@
-
+
versionModal.visible = false"
:class="themeSwitcher.currentTheme"
@@ -374,7 +364,7 @@
this.mem = new CurTotal(0, 0);
this.netIO = { up: 0, down: 0 };
this.netTraffic = { sent: 0, recv: 0 };
- this.publicIP = { ipv4: 0, ipv6: 0 };
+ this.publicIP = {hostname:"", ipv4: 0, ipv6: 0};
this.swap = new CurTotal(0, 0);
this.tcpCount = 0;
this.udpCount = 0;
@@ -404,16 +394,16 @@
this.xray = data.xray;
switch (this.xray.state) {
case State.Running:
- this.xray.color = "green";
+ this.xray.color = '#3dbd7d'; //Apple Green
break;
case State.Stop:
- this.xray.color = "orange";
+ this.xray.color = '#FF8733'; //BurgerKing Orange
break;
case State.Error:
- this.xray.color = "red";
+ this.xray.color = '#D92906'; //NASA Red
break;
default:
- this.xray.color = "gray";
+ this.xray.color = '#A2AAAD'; //Apple Gray
}
}
}