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.settings.resetDefaultConfig" }} - - - + {{ template "settings/xray/basics" . }} - - {{ i18n "pages.xray.rules.add" }} - - - - - - - - + {{ template "settings/xray/routing" . }} - - - - - - {{ i18n "pages.xray.outbound.addOutbound" }} - - WARP - - - - - - - - - - - - - - - - - + {{ template "settings/xray/outbounds" . }} - - + {{ template "settings/xray/reverse" . }} - - + {{ template "settings/xray/balancers" . }} + + + {{ template "settings/xray/dns" . }} - - - - - - - - - - - - - - - - - {{ 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"}} diff --git a/web/html/xui/client_bulk_modal.html b/web/html/xui/modals/client_bulk_modal.html similarity index 99% rename from web/html/xui/client_bulk_modal.html rename to web/html/xui/modals/client_bulk_modal.html index 82e68c74..88e8e645 100644 --- a/web/html/xui/client_bulk_modal.html +++ b/web/html/xui/modals/client_bulk_modal.html @@ -1,4 +1,4 @@ -{{define "clientsBulkModal"}} +{{define "modals/clientsBulkModal"}} diff --git a/web/html/xui/client_modal.html b/web/html/xui/modals/client_modal.html similarity index 99% rename from web/html/xui/client_modal.html rename to web/html/xui/modals/client_modal.html index aa62e02a..b6d2a554 100644 --- a/web/html/xui/client_modal.html +++ b/web/html/xui/modals/client_modal.html @@ -1,4 +1,4 @@ -{{define "clientsModal"}} +{{define "modals/clientsModal"}} diff --git a/web/html/xui/fakedns_modal.html b/web/html/xui/modals/fakedns_modal.html similarity index 98% rename from web/html/xui/fakedns_modal.html rename to web/html/xui/modals/fakedns_modal.html index 1b4dbe77..8e554ac0 100644 --- a/web/html/xui/fakedns_modal.html +++ b/web/html/xui/modals/fakedns_modal.html @@ -1,4 +1,4 @@ -{{define "fakednsModal"}} +{{define "modals/fakednsModal"}} diff --git a/web/html/xui/inbound_info_modal.html b/web/html/xui/modals/inbound_info_modal.html similarity index 99% rename from web/html/xui/inbound_info_modal.html rename to web/html/xui/modals/inbound_info_modal.html index 5ac5e9ab..50a52190 100644 --- a/web/html/xui/inbound_info_modal.html +++ b/web/html/xui/modals/inbound_info_modal.html @@ -1,4 +1,4 @@ -{{define "inboundInfoModal"}} +{{define "modals/inboundInfoModal"}} diff --git a/web/html/xui/inbound_modal.html b/web/html/xui/modals/inbound_modal.html similarity index 99% rename from web/html/xui/inbound_modal.html rename to web/html/xui/modals/inbound_modal.html index 4de3518c..99d182b9 100644 --- a/web/html/xui/inbound_modal.html +++ b/web/html/xui/modals/inbound_modal.html @@ -1,4 +1,4 @@ -{{define "inboundModal"}} +{{define "modals/inboundModal"}} diff --git a/web/html/xui/warp_modal.html b/web/html/xui/modals/warp_modal.html similarity index 99% rename from web/html/xui/warp_modal.html rename to web/html/xui/modals/warp_modal.html index 20ce8139..7fb55847 100644 --- a/web/html/xui/warp_modal.html +++ b/web/html/xui/modals/warp_modal.html @@ -1,4 +1,4 @@ -{{define "warpModal"}} +{{define "modals/warpModal"}} diff --git a/web/html/xui/xray_balancer_modal.html b/web/html/xui/modals/xray_balancer_modal.html similarity index 99% rename from web/html/xui/xray_balancer_modal.html rename to web/html/xui/modals/xray_balancer_modal.html index de2a0acb..fea4019a 100644 --- a/web/html/xui/xray_balancer_modal.html +++ b/web/html/xui/modals/xray_balancer_modal.html @@ -1,4 +1,4 @@ -{{define "balancerModal"}} +{{define "modals/balancerModal"}} diff --git a/web/html/xui/xray_rule_modal.html b/web/html/xui/modals/xray_rule_modal.html similarity index 99% rename from web/html/xui/xray_rule_modal.html rename to web/html/xui/modals/xray_rule_modal.html index aba5ba9e..4be74a8f 100644 --- a/web/html/xui/xray_rule_modal.html +++ b/web/html/xui/modals/xray_rule_modal.html @@ -1,4 +1,4 @@ -{{define "ruleModal"}} +{{define "modals/ruleModal"}} diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html index 07737509..8eb8239a 100644 --- a/web/html/xui/xray.html +++ b/web/html/xui/xray.html @@ -133,13 +133,13 @@ {{template "component/aThemeSwitch" .}} {{template "component/aTableSortable" .}} {{template "component/aSettingListItem" .}} -{{template "ruleModal"}} -{{template "outModal"}} -{{template "reverseModal"}} -{{template "balancerModal"}} -{{template "dnsModal"}} -{{template "fakednsModal"}} -{{template "warpModal"}} +{{template "modals/ruleModal"}} +{{template "modals/outModal"}} +{{template "modals/reverseModal"}} +{{template "modals/balancerModal"}} +{{template "modals/dnsModal"}} +{{template "modals/fakednsModal"}} +{{template "modals/warpModal"}} -{{end}} diff --git a/web/html/xui/component/aSidebar.html b/web/html/xui/component/aSidebar.html new file mode 100644 index 00000000..0ddaa176 --- /dev/null +++ b/web/html/xui/component/aSidebar.html @@ -0,0 +1,101 @@ +{{define "component/sidebar/content"}} + +{{end}} + +{{define "component/aSidebar"}} + + + +{{end}} \ No newline at end of file diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index fd6ebe8d..4a0d2c8f 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -133,7 +133,7 @@ - {{ template "commonSider" . }} + @@ -584,6 +584,7 @@ +{{template "component/aSidebar" .}} {{template "component/aThemeSwitch" .}} {{template "component/aCustomStatistic" .}} {{template "component/aPersianDatepicker" .}} @@ -678,7 +679,6 @@ delimiters: ['[[', ']]'], el: '#app', data: { - siderDrawer, themeSwitcher, persianDatepicker, spinning: false, diff --git a/web/html/xui/index.html b/web/html/xui/index.html index 073564c3..6c398b4b 100644 --- a/web/html/xui/index.html +++ b/web/html/xui/index.html @@ -74,7 +74,7 @@ - {{ template "commonSider" . }} + @@ -417,6 +417,7 @@ {{template "js" .}} +{{template "component/aSidebar" .}} {{template "component/aThemeSwitch" .}} {{template "component/aCustomStatistic" .}} {{template "modals/textModal"}} @@ -591,7 +592,6 @@ delimiters: ['[[', ']]'], el: '#app', data: { - siderDrawer, themeSwitcher, status: new Status(), versionModal, diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index 1bf5dab8..336a44c3 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -70,7 +70,7 @@ - {{ template "commonSider" . }} + @@ -131,6 +131,7 @@ {{template "js" .}} +{{template "component/aSidebar" .}} {{template "component/aThemeSwitch" .}} {{template "component/aPasswordInput" .}} {{template "component/aSettingListItem" .}} @@ -139,7 +140,6 @@ delimiters: ['[[', ']]'], el: '#app', data: { - siderDrawer, themeSwitcher, spinning: false, changeSecret: false, diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html index 8eb8239a..82f4bfd7 100644 --- a/web/html/xui/xray.html +++ b/web/html/xui/xray.html @@ -59,7 +59,7 @@ - {{ template "commonSider" . }} + @@ -130,6 +130,7 @@ {{template "js" .}} +{{template "component/aSidebar" .}} {{template "component/aThemeSwitch" .}} {{template "component/aTableSortable" .}} {{template "component/aSettingListItem" .}} @@ -207,7 +208,6 @@ delimiters: ['[[', ']]'], el: '#app', data: { - siderDrawer, themeSwitcher, isDarkTheme: themeSwitcher.isDarkTheme, spinning: false, From a02bf3195d9549dcf58e00e8c1eb2be295cdbe23 Mon Sep 17 00:00:00 2001 From: danilshishkevich Date: Mon, 24 Mar 2025 12:22:12 +0000 Subject: [PATCH 8/9] chore: improve styles - elements with class `.collapse-title` are missing - changed paddings in `.ant-xray-version-list-item` element --- web/html/xui/index.html | 5 +++++ web/html/xui/settings.html | 14 -------------- web/html/xui/xray.html | 14 -------------- 3 files changed, 5 insertions(+), 28 deletions(-) diff --git a/web/html/xui/index.html b/web/html/xui/index.html index 6c398b4b..20b44bd8 100644 --- a/web/html/xui/index.html +++ b/web/html/xui/index.html @@ -22,6 +22,11 @@ .ant-backup-list-item { gap: 10px; } + .ant-xray-version-list-item { + --padding: 12px; + padding: var(--padding) !important; + gap: var(--padding); + } .dark .ant-backup-list-item svg, .dark .ant-badge-status-text, .dark .ant-card-extra { diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index 336a44c3..cab41e5a 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -53,20 +53,6 @@ color: inherit; font-size: 24px; } - .collapse-title { - color: inherit; - font-weight: bold; - font-size: 18px; - padding: 10px 20px; - border-bottom: 2px solid; - } - .collapse-title>i { - color: inherit; - font-size: 24px; - } - .ant-collapse-content-box .ant-list-item { - border-bottom: none !important; - } diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html index 82f4bfd7..1abef018 100644 --- a/web/html/xui/xray.html +++ b/web/html/xui/xray.html @@ -39,20 +39,6 @@ .ant-list-item { display: block; } - .collapse-title { - color: inherit; - font-weight: bold; - font-size: 18px; - padding: 10px 20px; - border-bottom: 2px solid; - } - .collapse-title>i { - color: inherit; - font-size: 24px; - } - .ant-collapse-content-box>li { - padding: 12px 0 0 !important; - } .ant-list-item>li { padding: 10px 20px !important; } From fe791b6e998472b2aca85fba386071ffc880897e Mon Sep 17 00:00:00 2001 From: danilshishkevich Date: Mon, 24 Mar 2025 15:17:45 +0000 Subject: [PATCH 9/9] chore: move client table into components --- .../{inbound_client_table.html => component/aClientTable.html} | 2 +- web/html/xui/inbounds.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename web/html/xui/{inbound_client_table.html => component/aClientTable.html} (99%) diff --git a/web/html/xui/inbound_client_table.html b/web/html/xui/component/aClientTable.html similarity index 99% rename from web/html/xui/inbound_client_table.html rename to web/html/xui/component/aClientTable.html index fbf0699a..2bea96e8 100644 --- a/web/html/xui/inbound_client_table.html +++ b/web/html/xui/component/aClientTable.html @@ -1,4 +1,4 @@ -{{define "client_table"}} +{{define "component/aClientTable"}}