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/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/head.html b/web/html/common/head.html index ca854a30..35901769 100644 --- a/web/html/common/head.html +++ b/web/html/common/head.html @@ -2,10 +2,9 @@ - + - - {{ .host }}-{{ i18n .title}} + {{ .host }} – {{ i18n .title}}
{{end}} \ No newline at end of file diff --git a/web/html/xui/common_sider.html b/web/html/xui/common_sider.html deleted file mode 100644 index 97114c15..00000000 --- a/web/html/xui/common_sider.html +++ /dev/null @@ -1,55 +0,0 @@ -{{define "menuItems"}} - - - {{ i18n "menu.dashboard"}} - - - - {{ i18n "menu.inbounds"}} - - - - {{ i18n "menu.settings"}} - - - - {{ i18n "menu.xray"}} - - - - {{ i18n "menu.logout"}} - -{{end}} - - -{{define "commonSider"}} - - - - {{template "menuItems" .}} - - - -
- -
- - - {{template "menuItems" .}} - -
- -{{end}} 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"}} @@ -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, @@ -709,7 +709,7 @@ showAlert: false, ipLimitEnable: false, pageSize: 50, - isMobile: window.innerWidth <= 768, + isMobile: DeviceUtils.isMobile(), }, methods: { loading(spinning = true) { @@ -1473,7 +1473,7 @@ return false }, onResize() { - this.isMobile = window.innerWidth <= 768; + this.isMobile = DeviceUtils.isMobile(); } }, watch: { @@ -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/index.html b/web/html/xui/index.html index 92b25d5c..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 { @@ -74,7 +79,7 @@ - {{ template "commonSider" . }} + @@ -417,9 +422,10 @@ {{template "js" .}} +{{template "component/aSidebar" .}} {{template "component/aThemeSwitch" .}} {{template "component/aCustomStatistic" .}} -{{template "textModal"}} +{{template "modals/textModal"}} +{{template "component/aSidebar" .}} {{template "component/aThemeSwitch" .}} {{template "component/aPasswordInput" .}} {{template "component/aSettingListItem" .}} @@ -671,7 +126,6 @@ delimiters: ['[[', ']]'], el: '#app', data: { - siderDrawer, themeSwitcher, spinning: false, changeSecret: false, diff --git a/web/html/xui/settings/panel/general.html b/web/html/xui/settings/panel/general.html new file mode 100644 index 00000000..04b29341 --- /dev/null +++ b/web/html/xui/settings/panel/general.html @@ -0,0 +1,149 @@ +{{define "settings/panel/general"}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{{end}} \ No newline at end of file diff --git a/web/html/xui/settings/panel/security.html b/web/html/xui/settings/panel/security.html new file mode 100644 index 00000000..7b53a959 --- /dev/null +++ b/web/html/xui/settings/panel/security.html @@ -0,0 +1,60 @@ +{{define "settings/panel/security"}} + + + + + + + + + + + + + + + + + + + + + {{ i18n "confirm" }} + + + + + + + + + + + + + + + + + + {{ i18n "confirm"}} + + + + + +{{end}} \ No newline at end of file diff --git a/web/html/xui/settings/panel/subscription/general.html b/web/html/xui/settings/panel/subscription/general.html new file mode 100644 index 00000000..c5577c88 --- /dev/null +++ b/web/html/xui/settings/panel/subscription/general.html @@ -0,0 +1,98 @@ +{{define "settings/panel/subscription/general"}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{{end}} \ No newline at end of file diff --git a/web/html/xui/settings/panel/subscription/json.html b/web/html/xui/settings/panel/subscription/json.html new file mode 100644 index 00000000..4f0ee302 --- /dev/null +++ b/web/html/xui/settings/panel/subscription/json.html @@ -0,0 +1,180 @@ +{{define "settings/panel/subscription/json"}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove + + + + Add Noise + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{{end}} \ No newline at end of file diff --git a/web/html/xui/settings/panel/telegram.html b/web/html/xui/settings/panel/telegram.html new file mode 100644 index 00000000..0f11fc86 --- /dev/null +++ b/web/html/xui/settings/panel/telegram.html @@ -0,0 +1,87 @@ +{{define "settings/panel/telegram"}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{{end}} \ No newline at end of file diff --git a/web/html/xui/settings/xray/advanced.html b/web/html/xui/settings/xray/advanced.html new file mode 100644 index 00000000..6b9cb87b --- /dev/null +++ b/web/html/xui/settings/xray/advanced.html @@ -0,0 +1,14 @@ +{{define "settings/xray/advanced"}} + + + + {{ i18n "pages.xray.completeTemplate"}} + {{ i18n "pages.xray.Inbounds" }} + {{ i18n "pages.xray.Outbounds" }} + {{ i18n "pages.xray.Routings" }} + + + +{{end}} \ No newline at end of file diff --git a/web/html/xui/settings/xray/balancers.html b/web/html/xui/settings/xray/balancers.html new file mode 100644 index 00000000..7e062ec0 --- /dev/null +++ b/web/html/xui/settings/xray/balancers.html @@ -0,0 +1,53 @@ +{{define "settings/xray/balancers"}} + + +{{end}} \ No newline at end of file diff --git a/web/html/xui/settings/xray/basics.html b/web/html/xui/settings/xray/basics.html new file mode 100644 index 00000000..3f78de77 --- /dev/null +++ b/web/html/xui/settings/xray/basics.html @@ -0,0 +1,275 @@ +{{define "settings/xray/basics"}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ i18n "pages.settings.resetDefaultConfig" }} + + + + +{{end}} \ No newline at end of file diff --git a/web/html/xui/settings/xray/dns.html b/web/html/xui/settings/xray/dns.html new file mode 100644 index 00000000..696f73e1 --- /dev/null +++ b/web/html/xui/settings/xray/dns.html @@ -0,0 +1,149 @@ +{{define "settings/xray/dns"}} + + + + + + + + + + + +{{end}} \ No newline at end of file diff --git a/web/html/xui/settings/xray/outbounds.html b/web/html/xui/settings/xray/outbounds.html new file mode 100644 index 00000000..45d07c4c --- /dev/null +++ b/web/html/xui/settings/xray/outbounds.html @@ -0,0 +1,72 @@ +{{define "settings/xray/outbounds"}} + + + + + + {{ i18n "pages.xray.outbound.addOutbound" }} + + WARP + + + + + + + + + + + + + + + + + +{{end}} \ No newline at end of file diff --git a/web/html/xui/settings/xray/reverse.html b/web/html/xui/settings/xray/reverse.html new file mode 100644 index 00000000..a8c93ea9 --- /dev/null +++ b/web/html/xui/settings/xray/reverse.html @@ -0,0 +1,38 @@ +{{define "settings/xray/reverse"}} + + +{{end}} \ No newline at end of file diff --git a/web/html/xui/settings/xray/routing.html b/web/html/xui/settings/xray/routing.html new file mode 100644 index 00000000..8c2502de --- /dev/null +++ b/web/html/xui/settings/xray/routing.html @@ -0,0 +1,119 @@ +{{define "settings/xray/routing"}} + + {{ i18n "pages.xray.rules.add" }} + + + + + + + + +{{end}} \ No newline at end of file diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html index 8ba14f7d..1abef018 100644 --- a/web/html/xui/xray.html +++ b/web/html/xui/xray.html @@ -6,7 +6,6 @@ - @@ -40,27 +39,13 @@ .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; } - {{ template "commonSider" . }} + @@ -104,682 +89,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" . }} @@ -788,16 +116,17 @@ {{template "js" .}} +{{template "component/aSidebar" .}} {{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"}}