From 00addb0dd9f6451124466fb7ab6cae9ab9a8a643 Mon Sep 17 00:00:00 2001
From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com>
Date: Fri, 21 Mar 2025 14:38:41 +0000
Subject: [PATCH 1/9] chore: delete `display.css` these styles are not used
anywhere
---
web/assets/element-ui/theme-chalk/display.css | 1 -
web/html/common/head.html | 1 -
2 files changed, 2 deletions(-)
delete mode 100644 web/assets/element-ui/theme-chalk/display.css
diff --git a/web/assets/element-ui/theme-chalk/display.css b/web/assets/element-ui/theme-chalk/display.css
deleted file mode 100644
index 1d8790ba..00000000
--- a/web/assets/element-ui/theme-chalk/display.css
+++ /dev/null
@@ -1 +0,0 @@
-@media only screen and (max-width:767px){.hidden-xs-only{display:none!important}}@media only screen and (min-width:768px){.hidden-sm-and-up{display:none!important}}@media only screen and (min-width:768px) and (max-width:991px){.hidden-sm-only{display:none!important}}@media only screen and (max-width:991px){.hidden-sm-and-down{display:none!important}}@media only screen and (min-width:992px){.hidden-md-and-up{display:none!important}}@media only screen and (min-width:992px) and (max-width:1199px){.hidden-md-only{display:none!important}}@media only screen and (max-width:1199px){.hidden-md-and-down{display:none!important}}@media only screen and (min-width:1200px){.hidden-lg-and-up{display:none!important}}@media only screen and (min-width:1200px) and (max-width:1919px){.hidden-lg-only{display:none!important}}@media only screen and (max-width:1919px){.hidden-lg-and-down{display:none!important}}@media only screen and (min-width:1920px){.hidden-xl-only{display:none!important}}
\ No newline at end of file
diff --git a/web/html/common/head.html b/web/html/common/head.html
index ca854a30..4c6bb4e2 100644
--- a/web/html/common/head.html
+++ b/web/html/common/head.html
@@ -5,7 +5,6 @@
-
-
{{ .host }}-{{ i18n .title}}
+ {{ .host }} – {{ i18n .title}}
{{end}}
\ No newline at end of file
From 6f4eefe60181a9913155ec8c1cc644bf78b23ea3 Mon Sep 17 00:00:00 2001
From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com>
Date: Fri, 21 Mar 2025 15:09:05 +0000
Subject: [PATCH 3/9] chore: make class to get the device form factor
---
web/assets/js/util/index.js | 6 ++++++
web/html/common/qrcode_modal.html | 3 +--
web/html/xui/inbounds.html | 4 ++--
web/html/xui/index.html | 2 +-
web/html/xui/xray.html | 2 +-
5 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/web/assets/js/util/index.js b/web/assets/js/util/index.js
index 85d53352..625af8b9 100644
--- a/web/assets/js/util/index.js
+++ b/web/assets/js/util/index.js
@@ -780,4 +780,10 @@ class LanguageManager {
return languageFilter.length > 0;
}
+}
+
+class DeviceUtils {
+ static isMobile() {
+ return window.innerWidth <= 768;
+ }
}
\ No newline at end of file
diff --git a/web/html/common/qrcode_modal.html b/web/html/common/qrcode_modal.html
index 5ea1ca95..93d66fc2 100644
--- a/web/html/common/qrcode_modal.html
+++ b/web/html/common/qrcode_modal.html
@@ -1,6 +1,6 @@
{{define "qrcodeModal"}}
@@ -35,7 +35,6 @@
@@ -104,682 +103,25 @@
@change="(activeKey) => { this.changePage(activeKey); }"
:class="themeSwitcher.currentTheme">
-
-
-
-
-
-
- {{ i18n "pages.xray.generalConfigsDesc" }}
-
-
-
-
- {{ i18n "pages.xray.FreedomStrategy" }}
- {{ i18n "pages.xray.FreedomStrategyDesc" }}
-
-
- [[ s ]]
-
-
-
-
- {{ i18n "pages.xray.RoutingStrategy" }}
- {{ i18n "pages.xray.RoutingStrategyDesc" }}
-
-
- [[ s ]]
-
-
-
-
-
-
- {{ i18n "pages.xray.statsInboundUplink" }}
- {{ i18n "pages.xray.statsInboundUplinkDesc" }}
-
-
-
-
-
- {{ i18n "pages.xray.statsInboundDownlink" }}
- {{ i18n "pages.xray.statsInboundDownlinkDesc" }}
-
-
-
-
-
- {{ i18n "pages.xray.statsOutboundUplink" }}
- {{ i18n "pages.xray.statsOutboundUplinkDesc" }}
-
-
-
-
-
- {{ i18n "pages.xray.statsOutboundDownlink" }}
- {{ i18n "pages.xray.statsOutboundDownlinkDesc" }}
-
-
-
-
-
-
-
-
-
-
- {{ i18n "pages.xray.logConfigsDesc" }}
-
-
-
-
- {{ i18n "pages.xray.logLevel" }}
- {{ i18n "pages.xray.logLevelDesc" }}
-
-
- [[ s ]]
-
-
-
-
- {{ i18n "pages.xray.accessLog" }}
- {{ i18n "pages.xray.accessLogDesc" }}
-
-
- Empty
- [[ s ]]
-
-
-
-
- {{ i18n "pages.xray.errorLog" }}
- {{ i18n "pages.xray.errorLogDesc" }}
-
-
- Empty
- [[ s ]]
-
-
-
-
- {{ i18n "pages.xray.maskAddress" }}
- {{ i18n "pages.xray.maskAddressDesc" }}
-
-
- Empty
- [[ s ]]
-
-
-
-
- {{ i18n "pages.xray.dnsLog"}}
- {{ i18n "pages.xray.dnsLogDesc"}}
-
-
-
-
-
-
-
-
-
-
- {{ i18n "pages.xray.blockConfigsDesc" }}
-
-
-
-
- {{ i18n "pages.xray.Torrent"}}
- {{ i18n "pages.xray.TorrentDesc"}}
-
-
-
-
-
- {{ i18n "pages.xray.Family"}}
- {{ i18n "pages.xray.FamilyDesc"}}
-
-
-
-
-
-
-
-
-
-
- {{ i18n "pages.xray.blockConnectionsConfigsDesc" }}
-
-
-
-
- {{ i18n "pages.xray.blockips" }}
-
-
- [[ p.label ]]
-
-
-
-
- {{ i18n "pages.xray.blockdomains" }}
-
-
- [[ p.label ]]
-
-
-
-
-
-
-
- {{ i18n "pages.xray.directConnectionsConfigsDesc" }}
-
-
-
-
- {{ i18n "pages.xray.directips" }}
-
-
- [[ p.label ]]
-
-
-
-
- {{ i18n "pages.xray.directdomains" }}
-
-
- [[ p.label ]]
-
-
-
-
-
-
-
- {{ i18n "pages.xray.ipv4RoutingDesc" }}
-
-
-
-
- {{ i18n "pages.xray.ipv4Routing" }}
-
-
- [[ p.label ]]
-
-
-
-
-
-
-
- {{ i18n "pages.xray.warpRoutingDesc" }}
-
-
-
-
- {{ i18n "pages.xray.warpRouting" }}
-
-
-
- [[ p.label ]]
-
-
-
- WARP
-
-
-
-
-
-
- {{ i18n "pages.settings.resetDefaultConfig" }}
-
-
-
+ {{ template "settings/xray/basics" . }}
-
- {{ i18n "pages.xray.rules.add" }}
-
-
-
- [[ index+1 ]]
-
- e.preventDefault()" type="more" style="font-size: 16px; text-decoration: bold;">
-
-
-
- {{ i18n "pages.xray.rules.first"}}
-
-
-
- {{ i18n "pages.xray.rules.up"}}
-
-
-
- {{ i18n "pages.xray.rules.down"}}
-
-
-
- {{ i18n "pages.xray.rules.last"}}
-
-
-
- {{ i18n "edit" }}
-
-
-
- {{ i18n "delete"}}
-
-
-
-
-
-
-
-
- Inbound Tag: [[ rule.inboundTag ]]
- User email: [[ rule.user ]]
-
- [[ [rule.inboundTag,rule.user].join('\n') ]]
-
-
-
-
-
- Outbound Tag: [[ rule.outboundTag ]]
-
- [[ rule.outboundTag ]]
-
-
-
-
-
- Balancer Tag: [[ rule.balancerTag ]]
-
- [[ rule.balancerTag ]]
-
-
-
-
-
-
-
- Source
- [[ r ]]
-
-
- Source Port
- [[ r ]]
-
-
- Network
- [[ r ]]
-
-
- Protocol
- [[ r ]]
-
-
- Attrs
- [[ r ]]
-
-
- IP
- [[ r ]]
-
-
- Domain
- [[ r ]]
-
-
- Port
- [[ r ]]
-
-
- Balancer Tag
- [[ rule.balancerTag ]]
-
-
-
-
-
-
-
-
-
-
+ {{ template "settings/xray/routing" . }}
-
-
-
-
-
- {{ i18n "pages.xray.outbound.addOutbound" }}
-
- WARP
-
-
-
-
-
-
-
-
-
-
-
-
- [[ index+1 ]]
-
- e.preventDefault()" type="more" style="font-size: 16px; text-decoration: bold;">
-
-
-
- {{ i18n "pages.xray.rules.first"}}
-
-
-
- {{ i18n "edit" }}
-
-
-
- {{ i18n "pages.inbounds.resetTraffic"}}
-
-
-
-
- {{ i18n "delete"}}
-
-
-
-
-
-
- [[ addr ]]
-
-
- [[ outbound.protocol ]]
-
- [[ outbound.streamSettings.network ]]
- tls
- reality
-
-
-
- [[ findOutboundTraffic(outbound) ]]
-
-
-
+ {{ template "settings/xray/outbounds" . }}
-
-
-
- {{ i18n "pages.xray.outbound.addReverse" }}
-
-
-
- [[ index+1 ]]
-
- e.preventDefault()" type="more" style="font-size: 16px; text-decoration: bold;">
-
-
-
- {{ i18n "edit" }}
-
-
-
- {{ i18n "delete"}}
-
-
-
-
-
-
-
-
-
-
-
- {{ i18n "pages.xray.outbound.addReverse" }}
-
-
-
+ {{ template "settings/xray/reverse" . }}
-
-
-
- {{ i18n "pages.xray.balancer.addBalancer"}}
-
-
-
- [[ index+1 ]]
-
- e.preventDefault()" type="more" style="font-size: 16px; text-decoration: bold;">
-
-
-
- {{ i18n "edit" }}
-
-
-
- {{ i18n "delete"}}
-
-
-
-
-
-
- Random
- Round Robin
- Least Load
- Least Ping
-
-
- [[ sel ]]
-
-
-
- Observatory
- Burst Observatory
-
-
-
-
-
-
-
- {{ i18n "pages.xray.balancer.addBalancer"}}
-
-
-
+ {{ template "settings/xray/balancers" . }}
+
+
+ {{ template "settings/xray/dns" . }}
-
-
-
-
- {{ i18n "pages.xray.dns.enable" }}
- {{ i18n "pages.xray.dns.enableDesc" }}
-
-
-
-
-
-
- {{ i18n "pages.xray.dns.tag" }}
- {{ i18n "pages.xray.dns.tagDesc" }}
-
-
-
-
-
- {{ i18n "pages.xray.dns.clientIp" }}
- {{ i18n "pages.xray.dns.clientIpDesc" }}
-
-
-
-
-
- {{ i18n "pages.xray.dns.strategy" }}
- {{ i18n "pages.xray.dns.strategyDesc" }}
-
-
-
- [[ l ]]
-
-
-
-
-
- {{ i18n "pages.xray.dns.disableCache" }}
- {{ i18n "pages.xray.dns.disableCacheDesc" }}
-
-
-
-
-
- {{ i18n "pages.xray.dns.disableFallback" }}
- {{ i18n "pages.xray.dns.disableFallbackDesc" }}
-
-
-
-
-
- {{ i18n "pages.xray.dns.disableFallbackIfMatch" }}
- {{ i18n "pages.xray.dns.disableFallbackIfMatchDesc" }}
-
-
-
-
-
-
-
-
-
-
- {{ i18n
- "pages.xray.dns.add" }}
-
-
- [[ index+1 ]]
-
- e.preventDefault()" type="more"
- style="font-size: 16px; text-decoration: bold;">
-
-
-
- {{ i18n "edit" }}
-
-
-
- {{ i18n "delete"}}
-
-
-
-
-
-
- [[ dns.address ]]
- [[ dns ]]
-
-
- [[ dns.domains.join(",") ]]
-
-
- [[ dns.expectIPs.join(",") ]]
-
-
-
-
-
-
- {{ i18n "pages.xray.dns.add" }}
-
-
-
-
-
-
- {{ i18n "pages.xray.fakedns.add" }}
-
-
- [[ index+1 ]]
-
- e.preventDefault()" type="more"
- style="font-size: 16px; text-decoration: bold;">
-
-
-
- {{ i18n "edit" }}
-
-
-
- {{ i18n "delete"}}
-
-
-
-
-
-
-
-
-
-
- {{ i18n "pages.xray.fakedns.add" }}
-
-
-
-
-
-
-
-
-
- {{ i18n "pages.xray.completeTemplate"}}
- {{ i18n "pages.xray.Inbounds" }}
- {{ i18n "pages.xray.Outbounds" }}
- {{ i18n "pages.xray.Routings" }}
-
-
-
+ {{ template "settings/xray/advanced" . }}
From 14253c35864828458ef3eeecb05591a7ae6e641e Mon Sep 17 00:00:00 2001
From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com>
Date: Mon, 24 Mar 2025 09:57:37 +0000
Subject: [PATCH 5/9] chore: moving the modals to a separate directory
---
web/html/xui/inbounds.html | 14 +++++++-------
web/html/xui/{ => modals}/client_bulk_modal.html | 2 +-
web/html/xui/{ => modals}/client_modal.html | 2 +-
web/html/xui/{ => modals}/dns_modal.html | 2 +-
web/html/xui/{ => modals}/fakedns_modal.html | 2 +-
web/html/xui/{ => modals}/inbound_info_modal.html | 2 +-
web/html/xui/{ => modals}/inbound_modal.html | 2 +-
web/html/{common => xui/modals}/prompt_modal.html | 2 +-
web/html/{common => xui/modals}/qrcode_modal.html | 2 +-
web/html/{common => xui/modals}/text_modal.html | 2 +-
web/html/xui/{ => modals}/warp_modal.html | 2 +-
web/html/xui/{ => modals}/xray_balancer_modal.html | 2 +-
web/html/xui/{ => modals}/xray_outbound_modal.html | 2 +-
web/html/xui/{ => modals}/xray_reverse_modal.html | 2 +-
web/html/xui/{ => modals}/xray_rule_modal.html | 2 +-
web/html/xui/xray.html | 14 +++++++-------
16 files changed, 28 insertions(+), 28 deletions(-)
rename web/html/xui/{ => modals}/client_bulk_modal.html (99%)
rename web/html/xui/{ => modals}/client_modal.html (99%)
rename web/html/xui/{ => modals}/dns_modal.html (99%)
rename web/html/xui/{ => modals}/fakedns_modal.html (98%)
rename web/html/xui/{ => modals}/inbound_info_modal.html (99%)
rename web/html/xui/{ => modals}/inbound_modal.html (99%)
rename web/html/{common => xui/modals}/prompt_modal.html (98%)
rename web/html/{common => xui/modals}/qrcode_modal.html (99%)
rename web/html/{common => xui/modals}/text_modal.html (98%)
rename web/html/xui/{ => modals}/warp_modal.html (99%)
rename web/html/xui/{ => modals}/xray_balancer_modal.html (99%)
rename web/html/xui/{ => modals}/xray_outbound_modal.html (99%)
rename web/html/xui/{ => modals}/xray_reverse_modal.html (99%)
rename web/html/xui/{ => modals}/xray_rule_modal.html (99%)
diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html
index 94333429..fd6ebe8d 100644
--- a/web/html/xui/inbounds.html
+++ b/web/html/xui/inbounds.html
@@ -1524,12 +1524,12 @@
});
-{{template "inboundModal"}}
-{{template "promptModal"}}
-{{template "qrcodeModal"}}
-{{template "textModal"}}
-{{template "inboundInfoModal"}}
-{{template "clientsModal"}}
-{{template "clientsBulkModal"}}
+{{template "modals/inboundModal"}}
+{{template "modals/promptModal"}}
+{{template "modals/qrcodeModal"}}
+{{template "modals/textModal"}}
+{{template "modals/inboundInfoModal"}}
+{{template "modals/clientsModal"}}
+{{template "modals/clientsBulkModal"}}