mirror of
				https://github.com/MHSanaei/3x-ui.git
				synced 2025-10-27 02:24:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			71 lines
		
	
	
	
		
			2.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			71 lines
		
	
	
	
		
			2.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {{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/clients">-->
 | |
| <!--    <a-icon type="laptop"></a-icon>-->
 | |
| <!--    <span>Client</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" collapsed-width="0">
 | |
|     <a-menu :theme="themeSwitcher.currentTheme" mode="inline" selected-keys="">
 | |
|         <a-menu-item mode="inline">
 | |
|             <a-icon type="bg-colors"></a-icon>
 | |
|             <theme-switch />
 | |
|         </a-menu-item>
 | |
|     </a-menu>
 | |
|     <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.darkDrawerClass"
 | |
|           :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-menu :theme="themeSwitcher.currentTheme" mode="inline" selected-keys="">
 | |
|         <a-menu-item mode="inline">
 | |
|             <a-icon type="bg-colors"></a-icon>
 | |
|             <theme-switch />
 | |
|         </a-menu-item>
 | |
|     </a-menu>
 | |
|     <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}}
 | 
