Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanaei <ho3ein.sanaei@gmail.com>2025-03-26 15:04:42 +0300
committerGitHub <noreply@github.com>2025-03-26 15:04:42 +0300
commitd376ce057c4e2de6071dfb2185b4fd9a3a4338b1 (patch)
treef349a170638f023f27f507ccbc1574bd50f4a164
parent6545d8b61df5ad03d89bd738dad84c5fc946a0b5 (diff)
parent5e6e900e64bb2da5c0146cafa75d1a7b7bafaed7 (diff)
Merge pull request #2823 from shishkevichd/refactor/refactor-5
Code refactoring
-rw-r--r--web/assets/element-ui/theme-chalk/display.css1
-rw-r--r--web/assets/js/util/index.js6
-rw-r--r--web/html/common/head.html5
-rw-r--r--web/html/xui/common_sider.html55
-rw-r--r--web/html/xui/component/aClientTable.html (renamed from web/html/xui/inbound_client_table.html)2
-rw-r--r--web/html/xui/component/aSidebar.html101
-rw-r--r--web/html/xui/inbounds.html24
-rw-r--r--web/html/xui/index.html13
-rw-r--r--web/html/xui/modals/client_bulk_modal.html (renamed from web/html/xui/client_bulk_modal.html)2
-rw-r--r--web/html/xui/modals/client_modal.html (renamed from web/html/xui/client_modal.html)2
-rw-r--r--web/html/xui/modals/dns_modal.html (renamed from web/html/xui/dns_modal.html)2
-rw-r--r--web/html/xui/modals/fakedns_modal.html (renamed from web/html/xui/fakedns_modal.html)2
-rw-r--r--web/html/xui/modals/inbound_info_modal.html (renamed from web/html/xui/inbound_info_modal.html)2
-rw-r--r--web/html/xui/modals/inbound_modal.html (renamed from web/html/xui/inbound_modal.html)2
-rw-r--r--web/html/xui/modals/prompt_modal.html (renamed from web/html/common/prompt_modal.html)2
-rw-r--r--web/html/xui/modals/qrcode_modal.html (renamed from web/html/common/qrcode_modal.html)5
-rw-r--r--web/html/xui/modals/text_modal.html (renamed from web/html/common/text_modal.html)2
-rw-r--r--web/html/xui/modals/warp_modal.html (renamed from web/html/xui/warp_modal.html)2
-rw-r--r--web/html/xui/modals/xray_balancer_modal.html (renamed from web/html/xui/xray_balancer_modal.html)2
-rw-r--r--web/html/xui/modals/xray_outbound_modal.html (renamed from web/html/xui/xray_outbound_modal.html)2
-rw-r--r--web/html/xui/modals/xray_reverse_modal.html (renamed from web/html/xui/xray_reverse_modal.html)2
-rw-r--r--web/html/xui/modals/xray_rule_modal.html (renamed from web/html/xui/xray_rule_modal.html)2
-rw-r--r--web/html/xui/settings.html560
-rw-r--r--web/html/xui/settings/panel/general.html149
-rw-r--r--web/html/xui/settings/panel/security.html60
-rw-r--r--web/html/xui/settings/panel/subscription/general.html98
-rw-r--r--web/html/xui/settings/panel/subscription/json.html180
-rw-r--r--web/html/xui/settings/panel/telegram.html87
-rw-r--r--web/html/xui/settings/xray/advanced.html14
-rw-r--r--web/html/xui/settings/xray/balancers.html53
-rw-r--r--web/html/xui/settings/xray/basics.html275
-rw-r--r--web/html/xui/settings/xray/dns.html149
-rw-r--r--web/html/xui/settings/xray/outbounds.html72
-rw-r--r--web/html/xui/settings/xray/reverse.html38
-rw-r--r--web/html/xui/settings/xray/routing.html119
-rw-r--r--web/html/xui/xray.html710
36 files changed, 1466 insertions, 1336 deletions
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 @@
<head>
<meta charset="UTF-8">
<meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="robots" content="noindex,nofollow">
<link rel="stylesheet" href="{{ .base_path }}assets/ant-design-vue/antd.min.css">
- <link rel="stylesheet" href="{{ .base_path }}assets/element-ui/theme-chalk/display.css">
<link rel="stylesheet" href="{{ .base_path }}assets/css/custom.min.css?{{ .cur_ver }}">
<style>
[v-cloak] {
@@ -26,7 +25,7 @@
'Segoe UI Emoji', 'Segoe UI Symbol';
}
</style>
- <title>{{ .host }}-{{ i18n .title}}</title>
+ <title>{{ .host }} – {{ i18n .title}}</title>
</head>
<div id="message"></div>
{{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"}}
-<a-menu-item key="{{ .base_path }}panel/">
- <a-icon type="dashboard"></a-icon>
- <span>{{ i18n "menu.dashboard"}}</span>
-</a-menu-item>
-<a-menu-item key="{{ .base_path }}panel/inbounds">
- <a-icon type="user"></a-icon>
- <span>{{ i18n "menu.inbounds"}}</span>
-</a-menu-item>
-<a-menu-item key="{{ .base_path }}panel/settings">
- <a-icon type="setting"></a-icon>
- <span>{{ i18n "menu.settings"}}</span>
-</a-menu-item>
-<a-menu-item key="{{ .base_path }}panel/xray">
- <a-icon type="tool"></a-icon>
- <span>{{ i18n "menu.xray"}}</span>
-</a-menu-item>
-<a-menu-item key="{{ .base_path }}logout">
- <a-icon type="logout"></a-icon>
- <span>{{ i18n "menu.logout"}}</span>
-</a-menu-item>
-{{end}}
-
-
-{{define "commonSider"}}
-<a-layout-sider :theme="themeSwitcher.currentTheme" id="sider" collapsible breakpoint="md">
- <a-theme-switch></a-theme-switch>
- <a-menu :theme="themeSwitcher.currentTheme" mode="inline" :selected-keys="['{{ .request_uri }}']" @click="({key}) => key.startsWith('http') ? window.open(key) : location.href = key">
- {{template "menuItems" .}}
- </a-menu>
-</a-layout-sider>
-<a-drawer id="sider-drawer" placement="left" :closable="false" @close="siderDrawer.close()" :visible="siderDrawer.visible" :wrap-class-name="themeSwitcher.currentTheme" :wrap-style="{ padding: 0 }">
- <div class="drawer-handle" @click="siderDrawer.change()" slot="handle">
- <a-icon :type="siderDrawer.visible ? 'close' : 'menu-fold'"></a-icon>
- </div>
- <a-theme-switch></a-theme-switch>
- <a-menu :theme="themeSwitcher.currentTheme" mode="inline" :selected-keys="['{{ .request_uri }}']" @click="({key}) => key.startsWith('http') ? window.open(key) : location.href = key">
- {{template "menuItems" .}}
- </a-menu>
-</a-drawer>
-<script>
- const siderDrawer = {
- visible: false,
- show() {
- this.visible = true;
- },
- close() {
- this.visible = false;
- },
- change() {
- this.visible = !this.visible;
- },
- };
-</script>
-{{end}}
diff --git a/web/html/xui/inbound_client_table.html b/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"}}
<template slot="actions" slot-scope="text, client, index">
<a-tooltip>
<template slot="title">{{ i18n "qrCode" }}</template>
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"}}
+<template>
+ <div class="ant-sidebar">
+ <a-layout-sider :theme="themeSwitcher.currentTheme" collapsible :collapsed="collapsed"
+ @collapse="(isCollapsed, type) => collapseHandle(isCollapsed, type)" breakpoint="md">
+ <a-theme-switch></a-theme-switch>
+ <a-menu :theme="themeSwitcher.currentTheme" mode="inline" :selected-keys="activeTab"
+ @click="({key}) => openLink(key)">
+ <a-menu-item v-for="tab in tabs" :key="tab.key">
+ <a-icon :type="tab.icon"></a-icon>
+ <span v-text="tab.title"></span>
+ </a-menu-item>
+ </a-menu>
+ </a-layout-sider>
+ <a-drawer placement="left" :closable="false" @close="closeDrawer" :visible="visible"
+ :wrap-class-name="themeSwitcher.currentTheme" :wrap-style="{ padding: 0 }" :style="{ height: '100%' }">
+ <div class="drawer-handle" @click="toggleDrawer" slot="handle">
+ <a-icon :type="visible ? 'close' : 'menu-fold'"></a-icon>
+ </div>
+ <a-theme-switch></a-theme-switch>
+ <a-menu :theme="themeSwitcher.currentTheme" mode="inline" :selected-keys="activeTab"
+ @click="({key}) => openLink(key)">
+ <a-menu-item v-for="tab in tabs" :key="tab.key">
+ <a-icon :type="tab.icon"></a-icon>
+ <span v-text="tab.title"></span>
+ </a-menu-item>
+ </a-menu>
+ </a-drawer>
+ </div>
+</template>
+{{end}}
+
+{{define "component/aSidebar"}}
+<style>
+ .ant-sidebar>.ant-layout-sider {
+ height: 100%;
+ }
+</style>
+
+<script>
+ const SIDEBAR_COLLAPSED_KEY = "isSidebarCollapsed"
+
+ Vue.component('a-sidebar', {
+ data() {
+ return {
+ tabs: [
+ {
+ key: '/panel/',
+ icon: 'dashboard',
+ title: '{{ i18n "menu.dashboard"}}'
+ },
+ {
+ key: '/panel/inbounds',
+ icon: 'user',
+ title: '{{ i18n "menu.inbounds"}}'
+ },
+ {
+ key: '/panel/settings',
+ icon: 'setting',
+ title: '{{ i18n "menu.settings"}}'
+ },
+ {
+ key: '/panel/xray',
+ icon: 'tool',
+ title: '{{ i18n "menu.xray"}}'
+ },
+ {
+ key: '/logout/',
+ icon: 'logout',
+ title: '{{ i18n "menu.logout"}}'
+ },
+ ],
+ activeTab: [
+ '{{ .request_uri }}'
+ ],
+ visible: false,
+ collapsed: JSON.parse(localStorage.getItem(SIDEBAR_COLLAPSED_KEY)),
+ }
+ },
+ methods: {
+ openLink(key) {
+ return key.startsWith('http') ? window.open(key) : location.href = key
+ },
+ closeDrawer() {
+ this.visible = false;
+ },
+ toggleDrawer() {
+ this.visible = !this.visible;
+ },
+ collapseHandle(collapsed, type) {
+ if (type === "clickTrigger") {
+ localStorage.setItem(SIDEBAR_COLLAPSED_KEY, collapsed);
+
+ this.collapsed = JSON.parse(localStorage.getItem(SIDEBAR_COLLAPSED_KEY));
+ }
+ }
+ },
+ template: `{{template "component/sidebar/content"}}`,
+ });
+</script>
+{{end}} \ No newline at end of file
diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html
index 758de9e8..6c16bfa7 100644
--- a/web/html/xui/inbounds.html
+++ b/web/html/xui/inbounds.html
@@ -133,7 +133,7 @@
<body>
<a-layout id="app" v-cloak :class="themeSwitcher.currentTheme">
- {{ template "commonSider" . }}
+ <a-sidebar></a-sidebar>
<a-layout id="content-layout">
<a-layout-content>
<a-spin :spinning="spinning" :delay="500" tip='{{ i18n "loading"}}'>
@@ -568,7 +568,7 @@
:data-source="getInboundClients(record)"
:pagination=pagination(getInboundClients(record))
:style="isMobile ? 'margin: -10px 2px -11px;' : 'margin: -10px 22px -11px;'">
- {{template "client_table"}}
+ {{template "component/aClientTable"}}
</a-table>
</template>
</a-table>
@@ -584,6 +584,7 @@
<script src="{{ .base_path }}assets/uri/URI.min.js?{{ .cur_ver }}"></script>
<script src="{{ .base_path }}assets/js/model/inbound.js?{{ .cur_ver }}"></script>
<script src="{{ .base_path }}assets/js/model/dbinbound.js?{{ .cur_ver }}"></script>
+{{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 @@
});
</script>
-{{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"}}
</body>
</html>
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 @@
<body>
<a-layout id="app" v-cloak :class="themeSwitcher.currentTheme">
- {{ template "commonSider" . }}
+ <a-sidebar></a-sidebar>
<a-layout id="content-layout">
<a-layout-content>
<a-spin :spinning="spinning" :delay="200" :tip="loadingTip">
@@ -417,9 +422,10 @@
</a-modal>
</a-layout>
{{template "js" .}}
+{{template "component/aSidebar" .}}
{{template "component/aThemeSwitch" .}}
{{template "component/aCustomStatistic" .}}
-{{template "textModal"}}
+{{template "modals/textModal"}}
<script>
const State = {
Running: "running",
@@ -591,7 +597,6 @@
delimiters: ['[[', ']]'],
el: '#app',
data: {
- siderDrawer,
themeSwitcher,
status: new Status(),
versionModal,
@@ -601,7 +606,7 @@
loadingTip: '{{ i18n "loading"}}',
showAlert: false,
showIp: false,
- isMobile: window.innerWidth <= 768
+ isMobile: DeviceUtils.isMobile()
},
methods: {
loading(spinning, tip = '{{ i18n "loading"}}') {
diff --git a/web/html/xui/client_bulk_modal.html b/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"}}
<a-modal id="client-bulk-modal" v-model="clientsBulkModal.visible" :title="clientsBulkModal.title"
@ok="clientsBulkModal.ok" :confirm-loading="clientsBulkModal.confirmLoading" :closable="true" :mask-closable="false"
:ok-text="clientsBulkModal.okText" cancel-text='{{ i18n "close" }}' :class="themeSwitcher.currentTheme">
diff --git a/web/html/xui/client_modal.html b/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"}}
<a-modal id="client-modal" v-model="clientModal.visible" :title="clientModal.title" @ok="clientModal.ok"
:confirm-loading="clientModal.confirmLoading" :closable="true" :mask-closable="false"
:class="themeSwitcher.currentTheme"
diff --git a/web/html/xui/dns_modal.html b/web/html/xui/modals/dns_modal.html
index f61cd8b2..a1ebaa9f 100644
--- a/web/html/xui/dns_modal.html
+++ b/web/html/xui/modals/dns_modal.html
@@ -1,4 +1,4 @@
-{{define "dnsModal"}}
+{{define "modals/dnsModal"}}
<a-modal id="dns-modal" v-model="dnsModal.visible" :title="dnsModal.title" @ok="dnsModal.ok" :closable="true"
:mask-closable="false" :ok-text="dnsModal.okText" cancel-text='{{ i18n "close" }}'
:class="themeSwitcher.currentTheme">
diff --git a/web/html/xui/fakedns_modal.html b/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"}}
<a-modal id="fakedns-modal" v-model="fakednsModal.visible" :title="fakednsModal.title" @ok="fakednsModal.ok"
:closable="true" :mask-closable="false"
:ok-text="fakednsModal.okText" cancel-text='{{ i18n "close" }}' :class="themeSwitcher.currentTheme">
diff --git a/web/html/xui/inbound_info_modal.html b/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"}}
<a-modal id="inbound-info-modal" v-model="infoModal.visible" title='{{ i18n "pages.inbounds.details"}}' :closable="true" :mask-closable="true" :footer="null" width="600px" :class="themeSwitcher.currentTheme">
<a-row>
<a-col :xs="24" :md="12">
diff --git a/web/html/xui/inbound_modal.html b/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"}}
<a-modal id="inbound-modal" v-model="inModal.visible" :title="inModal.title"
:dialog-style="{ top: '20px' }" @ok="inModal.ok"
:confirm-loading="inModal.confirmLoading" :closable="true" :mask-closable="false"
diff --git a/web/html/common/prompt_modal.html b/web/html/xui/modals/prompt_modal.html
index b91ede03..5073650f 100644
--- a/web/html/common/prompt_modal.html
+++ b/web/html/xui/modals/prompt_modal.html
@@ -1,4 +1,4 @@
-{{define "promptModal"}}
+{{define "modals/promptModal"}}
<a-modal id="prompt-modal" v-model="promptModal.visible" :title="promptModal.title"
:closable="true" @ok="promptModal.ok" :mask-closable="false"
:confirm-loading="promptModal.confirmLoading"
diff --git a/web/html/common/qrcode_modal.html b/web/html/xui/modals/qrcode_modal.html
index 5ea1ca95..7046ca9b 100644
--- a/web/html/common/qrcode_modal.html
+++ b/web/html/xui/modals/qrcode_modal.html
@@ -1,6 +1,6 @@
-{{define "qrcodeModal"}}
+{{define "modals/qrcodeModal"}}
<a-modal id="qrcode-modal" v-model="qrModal.visible" :title="qrModal.title"
- :dialog-style="isMobileQr ? { top: '18px' } : {}"
+ :dialog-style="DeviceUtils.isMobile() ? { top: '18px' } : {}"
:closable="true"
:class="themeSwitcher.currentTheme"
:footer="null" width="fit-content">
@@ -35,7 +35,6 @@
</a-modal>
<script>
- const isMobileQr = window.innerWidth <= 768;
const qrModal = {
title: '',
dbInbound: new DBInbound(),
diff --git a/web/html/common/text_modal.html b/web/html/xui/modals/text_modal.html
index c15282b9..77cb719e 100644
--- a/web/html/common/text_modal.html
+++ b/web/html/xui/modals/text_modal.html
@@ -1,4 +1,4 @@
-{{define "textModal"}}
+{{define "modals/textModal"}}
<a-modal id="text-modal" v-model="txtModal.visible" :title="txtModal.title"
:closable="true"
:class="themeSwitcher.currentTheme">
diff --git a/web/html/xui/warp_modal.html b/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"}}
<a-modal id="warp-modal" v-model="warpModal.visible" title="Cloudflare WARP"
:confirm-loading="warpModal.confirmLoading" :closable="true" :mask-closable="true"
:footer="null" :class="themeSwitcher.currentTheme">
diff --git a/web/html/xui/xray_balancer_modal.html b/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"}}
<a-modal
id="balancer-modal"
v-model="balancerModal.visible"
diff --git a/web/html/xui/xray_outbound_modal.html b/web/html/xui/modals/xray_outbound_modal.html
index fd9cf99c..b3c5d6b1 100644
--- a/web/html/xui/xray_outbound_modal.html
+++ b/web/html/xui/modals/xray_outbound_modal.html
@@ -1,4 +1,4 @@
-{{define "outModal"}}
+{{define "modals/outModal"}}
<a-modal id="out-modal" v-model="outModal.visible" :title="outModal.title" @ok="outModal.ok"
:confirm-loading="outModal.confirmLoading" :closable="true" :mask-closable="false"
:ok-button-props="{ props: { disabled: !outModal.isValid } }" style="overflow: hidden;"
diff --git a/web/html/xui/xray_reverse_modal.html b/web/html/xui/modals/xray_reverse_modal.html
index bb1e4bdf..22f04317 100644
--- a/web/html/xui/xray_reverse_modal.html
+++ b/web/html/xui/modals/xray_reverse_modal.html
@@ -1,4 +1,4 @@
-{{define "reverseModal"}}
+{{define "modals/reverseModal"}}
<a-modal id="reverse-modal" v-model="reverseModal.visible" :title="reverseModal.title" @ok="reverseModal.ok"
:confirm-loading="reverseModal.confirmLoading" :closable="true" :mask-closable="false"
:ok-text="reverseModal.okText" cancel-text='{{ i18n "close" }}' :class="themeSwitcher.currentTheme">
diff --git a/web/html/xui/xray_rule_modal.html b/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"}}
<a-modal id="rule-modal" v-model="ruleModal.visible" :title="ruleModal.title" @ok="ruleModal.ok" :confirm-loading="ruleModal.confirmLoading" :closable="true" :mask-closable="false" :ok-text="ruleModal.okText" cancel-text='{{ i18n "close" }}' :class="themeSwitcher.currentTheme">
<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
<a-form-item label='Domain Matcher'>
diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html
index febb26e8..cab41e5a 100644
--- a/web/html/xui/settings.html
+++ b/web/html/xui/settings.html
@@ -53,24 +53,10 @@
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;
- }
</style>
<body>
<a-layout id="app" v-cloak :class="themeSwitcher.currentTheme">
- {{ template "commonSider" . }}
+ <a-sidebar></a-sidebar>
<a-layout id="content-layout">
<a-layout-content>
<a-spin :spinning="spinning" :delay="500" tip='{{ i18n "loading"}}'>
@@ -109,551 +95,19 @@
</a-card>
<a-tabs default-active-key="1">
<a-tab-pane key="1" tab='{{ i18n "pages.settings.panelSettings" }}' style="padding-top: 20px;">
- <a-collapse>
- <a-collapse-panel header='{{ i18n "pages.xray.generalConfigs"}}'>
- <a-setting-list-item paddings="small">
- <template #title>
- {{ i18n "pages.settings.remarkModel"}}
- </template>
- <template #description>
- {{ i18n "pages.settings.sampleRemark"}}: <i>#[[ remarkSample ]]</i>
- </template>
- <template #control>
- <a-input-group style="width: 100%;">
- <a-select style="padding-right: .5rem; min-width: 80%; width: auto;"
- mode="multiple"
- v-model="remarkModel"
- :dropdown-class-name="themeSwitcher.currentTheme">
- <a-select-option v-for="(value, key) in remarkModels" :value="key">[[ value ]]</a-select-option>
- </a-select>
- <a-select style="width: 20%;" v-model="remarkSeparator" :dropdown-class-name="themeSwitcher.currentTheme">
- <a-select-option v-for="key in remarkSeparators" :value="key">[[ key ]]</a-select-option>
- </a-select>
- </a-input-group>
- </template>
- </a-setting-list-item>
- <a-setting-list-item paddings="small">
- <template #title>{{ i18n "pages.settings.panelListeningIP"}}</template>