From fc3ea2dd4bb81bd5a09fcae8bcc8d4958818eda4 Mon Sep 17 00:00:00 2001
From: Tara Rostami <132676256+TaraRostami@users.noreply.github.com>
Date: Thu, 22 Feb 2024 22:50:38 +0330
Subject: Ultra Dark Theme for 3X-UI (#1871)
---
web/html/common/qrcode_modal.html | 8 +-
web/html/common/text_modal.html | 4 +-
web/html/login.html | 179 ++++++++++++++++++++++++++++++++++++--
web/html/xui/fakedns_modal.html | 2 +-
web/html/xui/index.html | 36 ++++----
web/html/xui/settings.html | 8 +-
6 files changed, 202 insertions(+), 35 deletions(-)
(limited to 'web/html')
diff --git a/web/html/common/qrcode_modal.html b/web/html/common/qrcode_modal.html
index 7cc317ef..3fcfdfc1 100644
--- a/web/html/common/qrcode_modal.html
+++ b/web/html/common/qrcode_modal.html
@@ -11,7 +11,7 @@
{{ i18n "pages.settings.subSettings"}}
{{ i18n "pages.settings.subSettings"}} Json
@@ -110,4 +110,4 @@
});
-{{end}}
\ No newline at end of file
+{{end}}
diff --git a/web/html/common/text_modal.html b/web/html/common/text_modal.html
index 68387be2..d668c792 100644
--- a/web/html/common/text_modal.html
+++ b/web/html/common/text_modal.html
@@ -9,7 +9,7 @@
{{ i18n "copy" }}
-
@@ -53,4 +53,4 @@
});
-{{end}}
\ No newline at end of file
+{{end}}
diff --git a/web/html/login.html b/web/html/login.html
index b622a080..4605a4fd 100644
--- a/web/html/login.html
+++ b/web/html/login.html
@@ -2,9 +2,14 @@
{{template "head" .}}
@@ -269,8 +393,13 @@
-
- {{ i18n "pages.login.title" }}
+
+
+
+ {{ i18n "pages.login.title" }}
+ 3X-UI
+
+
@@ -377,6 +506,42 @@
},
},
});
+ document.addEventListener("DOMContentLoaded", function() {
+ var animationDelay = 2000;
+ initHeadline();
+
+ function initHeadline() {
+ animateHeadline(document.querySelectorAll('.headline'));
+ }
+
+ function animateHeadline(headlines) {
+ var duration = animationDelay;
+ headlines.forEach(function(headline) {
+ setTimeout(function() {
+ hideWord(headline.querySelector('.is-visible'));
+ }, duration);
+ });
+ }
+
+ function hideWord(word) {
+ var nextWord = takeNext(word);
+ switchWord(word, nextWord);
+ setTimeout(function() {
+ hideWord(nextWord);
+ }, animationDelay);
+ }
+
+ function takeNext(word) {
+ return (word.nextElementSibling) ? word.nextElementSibling : word.parentElement.firstElementChild;
+ }
+
+ function switchWord(oldWord, newWord) {
+ oldWord.classList.remove('is-visible');
+ oldWord.classList.add('is-hidden');
+ newWord.classList.remove('is-hidden');
+ newWord.classList.add('is-visible');
+ }
+ });
diff --git a/web/html/xui/fakedns_modal.html b/web/html/xui/fakedns_modal.html
index c830f44d..c3abe5d5 100644
--- a/web/html/xui/fakedns_modal.html
+++ b/web/html/xui/fakedns_modal.html
@@ -7,7 +7,7 @@
-
+
diff --git a/web/html/xui/index.html b/web/html/xui/index.html
index 86dbf6b8..1c3132d6 100644
--- a/web/html/xui/index.html
+++ b/web/html/xui/index.html
@@ -19,12 +19,14 @@
color: hsla(0, 0%, 100%, .65);
}
- .ant-tag-df {
- color: rgb(0 0 0 / 80%);
+ .dark .ant-card-hoverable:hover,
+ .dark .ant-space-item > .ant-tabs:hover {
+ transform: scale(0.987);
+ outline-color: #40434d;
}
- .dark .ant-tag-df {
- color: rgb(255 255 255 / 80%);
+ .dark .ant-card-bordered {
+ outline: 2px solid var(--dark-color-background);
}
@@ -102,8 +104,8 @@
{{ i18n "pages.index.operationHours" }}:
- Xray [[ formatSecond(status.appStats.uptime) ]]
- OS [[ formatSecond(status.uptime) ]]
+ Xray [[ formatSecond(status.appStats.uptime) ]]
+ OS [[ formatSecond(status.uptime) ]]
@@ -137,7 +139,7 @@
{{ i18n "pages.index.systemLoad" }}:
-
+
[[ status.loads[0] ]] | [[ status.loads[1] ]] | [[ status.loads[2] ]]
@@ -150,10 +152,10 @@
{{ i18n "usage"}}:
-
+
RAM [[ sizeFormat(status.appStats.mem) ]]
-
+
Threads [[ status.appStats.threads ]]
@@ -162,7 +164,7 @@
-
+
IPv4
@@ -172,7 +174,7 @@
-
+
IPv6
@@ -188,7 +190,7 @@
-
+
TCP: [[ status.tcpCount ]]
@@ -198,7 +200,7 @@
-
+
UDP: [[ status.udpCount ]]
@@ -214,7 +216,7 @@
-
+
Up: [[ sizeFormat(status.netIO.up) ]]/s
@@ -225,7 +227,7 @@
-
+
Down: [[ sizeFormat(status.netIO.down) ]]/s
@@ -242,7 +244,7 @@
-
+
@@ -252,7 +254,7 @@
-
+
diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html
index 62c53379..adc199a9 100644
--- a/web/html/xui/settings.html
+++ b/web/html/xui/settings.html
@@ -95,15 +95,15 @@
-
-
-
+
+
+
{{ i18n "pages.settings.save" }}
{{ i18n "pages.settings.restartPanel" }}
-
+